query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
/ bindResults() Binds the input variables to the result set row values
public function bindResults(array $bind_results);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resultset($bind_array=array());", "private static function bindResultRow(&$stmt, &$out)\n {\n $result = $stmt->result_metadata();\n $fields = array();\n $out = array();\n \n while($field = $result->fetch_field())\n {\n $out[$field->name] = \"\";\n $fields[] = &$out[$field->name];\n }\n \n $return = call_user_func_array(array($stmt,'bind_result'), $fields);\n }", "protected function bind_results($stmt) {\n\t\t\t$fields_var = array();\n\t\t\t$results = null;\n\t\t\t\n\t\t\t$meta = $stmt->result_metadata();\n\n\t\t\t//check if it's INSERT, if so return ID;\n\t\t\tif($meta) {\n\t\t\t\twhile ($field = $meta->fetch_field()) {\n\t\t\t\t\t$field_name = $field->name;\n\t\t\t\t\t$$field_name = null;\n\t\t\t\t\t$fields_var[$field_name] = &$$field_name;\n\t\t\t\t}\n\t\t\t\tcall_user_func_array(array($stmt,'bind_result'),$fields_var);\n\t\t\t\t$results = array();\n\t\t\t\t\n\t\t\t\tif($stmt->num_rows == 1) {\n\t\t\t\t\t$stmt->fetch();\n\t\t\t\t\tforeach($fields_var as $k => $v) {\n\t\t\t\t\t\t$results[$k] = $v;\n\t\t\t\t\t\t$this->{$k} = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($stmt->num_rows > 1) {\n\t\t\t\t\t$i = 0;\n\t\t\t\t\twhile($stmt->fetch()) {\n\t\t\t\t\t\t$results[$i] = array();\n\t\t\t\t\t\tforeach($fields_var as $k => $v) {\n\t\t\t\t\t\t\t$results[$i][$k] = $v;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $results;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $stmt->insert_id;\n\t\t\t}\n\n\t\t}", "protected function fetchPreparedResults($stmt, $columns){\n // Array that accepts the data\n $data = array() ;\n // Parameter array passed to 'bind_result()'\n $params = array() ; \n foreach($columns as $col_name){\n // 'fetch()' will assign fetched value to the variable '$data[$col_name]'\n $params[] =& $data[$col_name] ;\n }\n $res = call_user_func_array( array(&$stmt, \"bind_result\"), $params);\n // if success fetch results\n if(!$res){\n $query_result = \"bind_result() failed: \" . $this->con->error . \"\\n\" ;\n $query_status = false;\n } else {\n $i = 0;\n // fetch all rows of result and store in $query_result\n while($stmt->fetch()){\n foreach($data as $key => $value){\n $query_result[$i][$key] = $value;\n }\n $i++;\n }\n $query_status = true;\n }\n // close open connections\n $stmt->close();\n $this->con->close();\n\n // prepare and return results\n $results = array('results' => $query_result, 'status' => $query_status);\n return $results;\n }", "function bind_array($stmt, &$row) {\n\t$md = $stmt->result_metadata();\n\t$params = array();\n\twhile($field = $md->fetch_field()) {\n\t\t$params[] = &$row[$field->name];\n\t}\n\n\tcall_user_func_array(array($stmt, 'bind_result'), $params);\n}", "public function processBind()\n {\n $bind = [];\n\n foreach ($this->fields as $field)\n {\n\n if($field == $this->tablePK)\n {\n $bind[\":id\"] = $this->data[$field];\n }\n else\n {\n $bind[\":$field\"] = $this->data[$field];\n }\n }\n $this->bind = $bind;\n }", "public function bindAndExecute()\n\t{\n\n\t\t//$params = func_get_args();\n\n\t\t// The only way to get the parameters by reference is to use the debug_backtrace functions rather than\n\t\t// func_get_args. I'm not a fan of this but it works.\n\n $params = array();\n\n\t\t$stack = debug_backtrace();\n\t\tif(isset($stack[0][\"args\"]))\n\t\t\tfor($i=0; $i < count($stack[0][\"args\"]); $i++)\n\t\t\t\t$params[$i] = & $stack[0][\"args\"][$i];\n\n\n\n\n\n\n\t\tMysqlBase::$queryCount++;\n\n\t\t$arrayIndex = $this->myQuery . ' ' . implode('::', $params);\n\t\tif(isset(MysqlBase::$queryArray[$arrayIndex]))\n\t\t{\n\t\t\tMysqlBase::$queryArray[$arrayIndex]++;\n\t\t}else{\n\t\t\tMysqlBase::$queryArray[$arrayIndex] = 1;\n\t\t}\n\n\n\t\tif(!call_user_func_array(array($this, 'bind_param'), $params))\n\t\t\t$this->throwError();\n\n\t\tif($this->execute())\n\t\t{\n\t\t\t$this->store_result();\n\t\t\treturn true;\n\t\t}else{\n\t\t\tif($this->errno > 0)\n\t\t\t\t$this->throwError();\n\t\t\treturn false;\n\t\t}\n\n\t}", "abstract protected function setresults();", "public function bind()\n {\n foreach ($this->columns as $column) {\n $column->bind();\n }\n }", "function resultSet($results) {\n $this->map = array();\n $numFields = $results->columnCount();\n $index = 0;\n $j = 0;\n\n while ($j < $numFields) {\n $column = $results->getColumnMeta($index);\n if (!empty($column['table'])) {\n $this->map[$index++] = array($column['table'], $column['name']);\n } else {\n if (strpos($column['name'], '__')) {\n $parts = explode('__', $column['name']);\n $this->map[$index++] = array($parts[0], $parts[1]);\n } else {\n $this->map[$index++] = array(0, $column['name']);\n }\n }\n $j++;\n }\n\n }", "private function bindValues() {\n\t\tforeach ($this->builder->bindings as $key => $value) {\n\t\t\t$this->statement->bindValue(\n\t\t\t\t(is_string($key) ? $key : $key + 1),\n\t\t\t\t$value,\n\t\t\t\t(is_int($value) || is_float($value) ? PDO::PARAM_INT : PDO::PARAM_STR)\n\t\t\t);\n\t\t}\n\n\t\t// Reset Builder - ready for next statement\n\t\t$this->builder->bindings = [];\n\t\t$this->builder->wheres = [];\n\t}", "public function bindVariables() {\n foreach($this->response as $key => $val) {\n $this->response_source->bindVariable($key, $val);\n }\n }", "public function bindValues(array $bind_values);", "function LoadRowValues(&$rs) {\n\t\tglobal $conn;\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->spec_id->setDbValue($rs->fields('spec_id'));\n\t\t$this->model_id->setDbValue($rs->fields('model_id'));\n\t\t$this->title->setDbValue($rs->fields('title'));\n\t\t$this->description->setDbValue($rs->fields('description'));\n\t\t$this->s_order->setDbValue($rs->fields('s_order'));\n\t\t$this->status->setDbValue($rs->fields('status'));\n\t}", "function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->row_id->setDbValue($row['row_id']);\n\t\t$this->master_id->setDbValue($row['master_id']);\n\t\t$this->lot_number->setDbValue($row['lot_number']);\n\t\t$this->chop->setDbValue($row['chop']);\n\t\t$this->estate->setDbValue($row['estate']);\n\t\t$this->grade->setDbValue($row['grade']);\n\t\t$this->jenis->setDbValue($row['jenis']);\n\t\t$this->sack->setDbValue($row['sack']);\n\t\t$this->netto->setDbValue($row['netto']);\n\t\t$this->gross->setDbValue($row['gross']);\n\t\t$this->open_bid->setDbValue($row['open_bid']);\n\t\t$this->currency->setDbValue($row['currency']);\n\t\t$this->bid_step->setDbValue($row['bid_step']);\n\t\t$this->rate->setDbValue($row['rate']);\n\t\t$this->winner_id->setDbValue($row['winner_id']);\n\t\t$this->sold_bid->setDbValue($row['sold_bid']);\n\t\t$this->proforma_number->setDbValue($row['proforma_number']);\n\t\t$this->proforma_amount->setDbValue($row['proforma_amount']);\n\t\t$this->proforma_status->setDbValue($row['proforma_status']);\n\t\t$this->auction_status->setDbValue($row['auction_status']);\n\t\t$this->enter_bid->setDbValue($row['enter_bid']);\n\t\t$this->last_bid->setDbValue($row['last_bid']);\n\t\t$this->highest_bid->setDbValue($row['highest_bid']);\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->row_id->DbValue = $row['row_id'];\n\t\t$this->master_id->DbValue = $row['master_id'];\n\t\t$this->lot_number->DbValue = $row['lot_number'];\n\t\t$this->chop->DbValue = $row['chop'];\n\t\t$this->estate->DbValue = $row['estate'];\n\t\t$this->grade->DbValue = $row['grade'];\n\t\t$this->jenis->DbValue = $row['jenis'];\n\t\t$this->sack->DbValue = $row['sack'];\n\t\t$this->netto->DbValue = $row['netto'];\n\t\t$this->gross->DbValue = $row['gross'];\n\t\t$this->open_bid->DbValue = $row['open_bid'];\n\t\t$this->currency->DbValue = $row['currency'];\n\t\t$this->bid_step->DbValue = $row['bid_step'];\n\t\t$this->rate->DbValue = $row['rate'];\n\t\t$this->winner_id->DbValue = $row['winner_id'];\n\t\t$this->sold_bid->DbValue = $row['sold_bid'];\n\t\t$this->proforma_number->DbValue = $row['proforma_number'];\n\t\t$this->proforma_amount->DbValue = $row['proforma_amount'];\n\t\t$this->proforma_status->DbValue = $row['proforma_status'];\n\t\t$this->auction_status->DbValue = $row['auction_status'];\n\t\t$this->enter_bid->DbValue = $row['enter_bid'];\n\t\t$this->last_bid->DbValue = $row['last_bid'];\n\t\t$this->highest_bid->DbValue = $row['highest_bid'];\n\t}", "public function getBindValues();", "public static function bindValues($statement, $bindings)\n {\n }", "function stmt_bind_assoc (&$stmt, &$out) {\n //$resultrow = array();\n //stmt_bind_assoc($stmt, $resultrow);\n\n $data = mysqli_stmt_result_metadata($stmt);\n $fields = array();\n $out = array();\n\n $fields[0] = $stmt;\n $count = 1;\n\n while($field = mysqli_fetch_field($data)) {\n $fields[$count] = &$out[$field->name];\n $count++;\n }\n call_user_func_array(mysqli_stmt_bind_result, $fields);\n}", "function execute_prepared_query($prep_q, $bound_vars, $bound_var_types, $result_expected = false)\n{\n\tglobal $spebs_db;\n\t$pstmt = $spebs_db -> prepare($prep_q);\t\n\tif($spebs_db->errno != 0)\n\t{\n\t\terror_log(\"PREPARE STATEMENT error \".$spebs_db->errno.\": \".$spebs_db->error.\" (Q = \\\"$prep_q\\\")\");\n\t\treturn false;\n\t}\n\t\n\t$bound_varrefs = array();\n\t$bound_varrefs[0] = $bound_var_types;\n\t$i=1;\n\tforeach($bound_vars AS $thisvar)\n\t{\t\n\t\t${\"x$i\"} = $thisvar;\n\t\t$bound_varrefs[$i] = &${\"x$i\"};\n\t\t$i++;\n\t}\n\t$bind_action = call_user_func_array(array($pstmt, 'bind_param'), $bound_varrefs);\n\tif(!$bind_action)\n\t{\t\n\t\terror_log(\"CALL_USER_FUNC_ARRAY error \");\n\t\treturn false;\n\t}\n\tif($pstmt->errno != 0)\n\t{\n\t\terror_log(\"PREPARED QUERY BIND error \".$pstmt->errno.\": \".$pstmt->error);\n\t\treturn false;\n\t}\t\n\tif($pstmt -> execute())\n\t{\n\t\tif(!$result_expected)\n\t\t{\n\t\t\tif(isset($pstmt -> insert_id) && is_int($pstmt -> insert_id) && $pstmt -> insert_id > 0)\n\t\t\t\t$res = $pstmt -> insert_id;\n\t\t\telse\n\t\t\t\t$res = true;\n\t\t\t\t\n\t\t\t$pstmt -> close();\n\t\t\treturn $res;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$results = array();\n\t\t\t$row = array();\n\t\t\t$metadata = $pstmt -> result_metadata();\n\t\t\tforeach($metadata -> fetch_fields() AS $field)\n\t\t\t{\t\n\t\t\t\t$row[$field -> name] = NULL;\n\t\t\t\t$bound_resrefs[] = &$row[$field -> name];\n\t\t\t}\n\t\t\t$bind_action = call_user_func_array(array($pstmt, 'bind_result'), $bound_resrefs);\n\t\t\t$i = 0;\n\t\t\twhile($pstmt -> fetch())\n\t\t\t{\t\n\t\t\t\tforeach($row AS $k => $v)\n\t\t\t\t$results[$i][$k] = $v;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$pstmt -> close();\n\t\t\treturn $results;\n\t\t}\n\t\t\n\t}\n\telse\n\t{\n\t\terror_log($pstmt->errno.\": \".$pstmt->error);\n\t\t$pstmt -> close();\t\n\t\treturn false;\n\t}\n}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->row_id->DbValue = $row['row_id'];\n\t\t$this->auc_date->DbValue = $row['auc_date'];\n\t\t$this->auc_number->DbValue = $row['auc_number'];\n\t\t$this->auc_place->DbValue = $row['auc_place'];\n\t\t$this->start_bid->DbValue = $row['start_bid'];\n\t\t$this->close_bid->DbValue = $row['close_bid'];\n\t\t$this->auc_notes->DbValue = $row['auc_notes'];\n\t\t$this->total_sack->DbValue = $row['total_sack'];\n\t\t$this->total_netto->DbValue = $row['total_netto'];\n\t\t$this->total_gross->DbValue = $row['total_gross'];\n\t\t$this->auc_status->DbValue = $row['auc_status'];\n\t\t$this->rate->DbValue = $row['rate'];\n\t}", "function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->id->setDbValue($rs->fields('id'));\r\n\t\t$this->datetime->setDbValue($rs->fields('datetime'));\r\n\t\t$this->script->setDbValue($rs->fields('script'));\r\n\t\t$this->user->setDbValue($rs->fields('user'));\r\n\t\t$this->action->setDbValue($rs->fields('action'));\r\n\t\t$this->_table->setDbValue($rs->fields('table'));\r\n\t\t$this->_field->setDbValue($rs->fields('field'));\r\n\t\t$this->keyvalue->setDbValue($rs->fields('keyvalue'));\r\n\t\t$this->oldvalue->setDbValue($rs->fields('oldvalue'));\r\n\t\t$this->newvalue->setDbValue($rs->fields('newvalue'));\r\n\t}", "public function run_sql($bindVars = FALSE, $outvar = NULL);", "function LoadRowValues(&$rs) {\n\t\tglobal $conn;\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id->setDbValue($rs->fields('id'));\n\t\t$this->fbid->setDbValue($rs->fields('fbid'));\n\t\t$this->name->setDbValue($rs->fields('name'));\n\t\t$this->_email->setDbValue($rs->fields('email'));\n\t\t$this->password->setDbValue($rs->fields('password'));\n\t\t$this->validated_mobile->setDbValue($rs->fields('validated_mobile'));\n\t\t$this->role_id->setDbValue($rs->fields('role_id'));\n\t\t$this->image->setDbValue($rs->fields('image'));\n\t\t$this->newsletter->setDbValue($rs->fields('newsletter'));\n\t\t$this->points->setDbValue($rs->fields('points'));\n\t\t$this->last_modified->setDbValue($rs->fields('last_modified'));\n\t\t$this->p2->setDbValue($rs->fields('p2'));\n\t}", "function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->row_id->setDbValue($row['row_id']);\n\t\t$this->auc_date->setDbValue($row['auc_date']);\n\t\t$this->auc_number->setDbValue($row['auc_number']);\n\t\t$this->auc_place->setDbValue($row['auc_place']);\n\t\t$this->start_bid->setDbValue($row['start_bid']);\n\t\t$this->close_bid->setDbValue($row['close_bid']);\n\t\t$this->auc_notes->setDbValue($row['auc_notes']);\n\t\t$this->total_sack->setDbValue($row['total_sack']);\n\t\t$this->total_netto->setDbValue($row['total_netto']);\n\t\t$this->total_gross->setDbValue($row['total_gross']);\n\t\t$this->auc_status->setDbValue($row['auc_status']);\n\t\t$this->rate->setDbValue($row['rate']);\n\t}", "function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->unid->setDbValue($row['unid']);\n\t\t$this->u_id->setDbValue($row['u_id']);\n\t\t$this->acl_id->setDbValue($row['acl_id']);\n\t\t$this->Title->setDbValue($row['Title']);\n\t\t$this->LV->setDbValue($row['LV']);\n\t\t$this->Type->setDbValue($row['Type']);\n\t\t$this->ResetTime->setDbValue($row['ResetTime']);\n\t\t$this->ResetType->setDbValue($row['ResetType']);\n\t\t$this->CompleteTask->setDbValue($row['CompleteTask']);\n\t\t$this->Occupation->setDbValue($row['Occupation']);\n\t\t$this->Target->setDbValue($row['Target']);\n\t\t$this->Data->setDbValue($row['Data']);\n\t\t$this->Reward_Gold->setDbValue($row['Reward_Gold']);\n\t\t$this->Reward_Diamonds->setDbValue($row['Reward_Diamonds']);\n\t\t$this->Reward_EXP->setDbValue($row['Reward_EXP']);\n\t\t$this->Reward_Goods->setDbValue($row['Reward_Goods']);\n\t\t$this->Info->setDbValue($row['Info']);\n\t\t$this->DATETIME->setDbValue($row['DATETIME']);\n\t}", "function LoadRowValues(&$rs) {\n\t\tglobal $conn, $scholarship_package;\n\t\t$scholarship_package->scholarship_package_id->setDbValue($rs->fields('scholarship_package_id'));\n\t\t$scholarship_package->start_date->setDbValue($rs->fields('start_date'));\n\t\t$scholarship_package->end_date->setDbValue($rs->fields('end_date'));\n\t\t$scholarship_package->status->setDbValue($rs->fields('status'));\n\t\t$scholarship_package->annual_amount->setDbValue($rs->fields('annual_amount'));\n\t\t$scholarship_package->grant_package_grant_package_id->setDbValue($rs->fields('grant_package_grant_package_id'));\n\t\t$scholarship_package->sponsored_student_sponsored_student_id->setDbValue($rs->fields('sponsored_student_sponsored_student_id'));\n\t\t$scholarship_package->scholarship_type->setDbValue($rs->fields('scholarship_type'));\n\t\t$scholarship_package->scholarship_type_scholarship_type->setDbValue($rs->fields('scholarship_type_scholarship_type'));\n\t\t$scholarship_package->group_id->setDbValue($rs->fields('group_id'));\n\t}", "function LoadRowValues(&$rs) {\n\t\tglobal $conn, $scholarship_package;\n\t\t$scholarship_package->scholarship_package_id->setDbValue($rs->fields('scholarship_package_id'));\n\t\t$scholarship_package->start_date->setDbValue($rs->fields('start_date'));\n\t\t$scholarship_package->end_date->setDbValue($rs->fields('end_date'));\n\t\t$scholarship_package->status->setDbValue($rs->fields('status'));\n\t\t$scholarship_package->annual_amount->setDbValue($rs->fields('annual_amount'));\n\t\t$scholarship_package->grant_package_grant_package_id->setDbValue($rs->fields('grant_package_grant_package_id'));\n\t\t$scholarship_package->sponsored_student_sponsored_student_id->setDbValue($rs->fields('sponsored_student_sponsored_student_id'));\n\t\t$scholarship_package->scholarship_type->setDbValue($rs->fields('scholarship_type'));\n\t\t$scholarship_package->scholarship_type_scholarship_type->setDbValue($rs->fields('scholarship_type_scholarship_type'));\n\t\t$scholarship_package->group_id->setDbValue($rs->fields('group_id'));\n\t}", "function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->tanggal->setDbValue($row['tanggal']);\n\t\t$this->auc_number->setDbValue($row['auc_number']);\n\t\t$this->start_bid->setDbValue($row['start_bid']);\n\t\t$this->close_bid->setDbValue($row['close_bid']);\n\t\t$this->lot_number->setDbValue($row['lot_number']);\n\t\t$this->chop->setDbValue($row['chop']);\n\t\t$this->grade->setDbValue($row['grade']);\n\t\t$this->estate->setDbValue($row['estate']);\n\t\t$this->sack->setDbValue($row['sack']);\n\t\t$this->netto->setDbValue($row['netto']);\n\t\t$this->open_bid->setDbValue($row['open_bid']);\n\t\t$this->last_bid->setDbValue($row['last_bid']);\n\t\t$this->highest_bid->setDbValue($row['highest_bid']);\n\t\t$this->enter_bid->setDbValue($row['enter_bid']);\n\t\t$this->auction_status->setDbValue($row['auction_status']);\n\t\t$this->gross->setDbValue($row['gross']);\n\t\t$this->row_id->setDbValue($row['row_id']);\n\t\tif (!isset($GLOBALS[\"v_bid_histories_admin_grid\"])) $GLOBALS[\"v_bid_histories_admin_grid\"] = new cv_bid_histories_admin_grid;\n\t\t$sDetailFilter = $GLOBALS[\"v_bid_histories_admin\"]->SqlDetailFilter_v_auction_list_admin();\n\t\t$sDetailFilter = str_replace(\"@master_id@\", ew_AdjustSql($this->row_id->DbValue, \"DB\"), $sDetailFilter);\n\t\t$GLOBALS[\"v_bid_histories_admin\"]->setCurrentMasterTable(\"v_auction_list_admin\");\n\t\t$sDetailFilter = $GLOBALS[\"v_bid_histories_admin\"]->ApplyUserIDFilters($sDetailFilter);\n\t\t$this->v_bid_histories_admin_Count = $GLOBALS[\"v_bid_histories_admin\"]->LoadRecordCount($sDetailFilter);\n\t}", "function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->Id_Venta_Eq->setDbValue($rs->fields('Id_Venta_Eq'));\r\n\t\t$this->CLIENTE->setDbValue($rs->fields('CLIENTE'));\r\n\t\t$this->Id_Articulo->setDbValue($rs->fields('Id_Articulo'));\r\n\t\t$this->Acabado_eq->setDbValue($rs->fields('Acabado_eq'));\r\n\t\t$this->Num_IMEI->setDbValue($rs->fields('Num_IMEI'));\r\n\t\t$this->Num_ICCID->setDbValue($rs->fields('Num_ICCID'));\r\n\t\t$this->Num_CEL->setDbValue($rs->fields('Num_CEL'));\r\n\t\t$this->Causa->setDbValue($rs->fields('Causa'));\r\n\t\t$this->Con_SIM->setDbValue($rs->fields('Con_SIM'));\r\n\t\t$this->Observaciones->setDbValue($rs->fields('Observaciones'));\r\n\t\t$this->PrecioUnitario->setDbValue($rs->fields('PrecioUnitario'));\r\n\t\t$this->MontoDescuento->setDbValue($rs->fields('MontoDescuento'));\r\n\t\t$this->Precio_SIM->setDbValue($rs->fields('Precio_SIM'));\r\n\t\t$this->Monto->setDbValue($rs->fields('Monto'));\r\n\t}" ]
[ "0.68196523", "0.66728026", "0.64769924", "0.6208242", "0.61962444", "0.5888165", "0.5857166", "0.58563656", "0.58476716", "0.5818572", "0.57589954", "0.5693269", "0.5661475", "0.56513906", "0.563987", "0.56388116", "0.5633599", "0.5631542", "0.56267804", "0.56225955", "0.56097347", "0.5592321", "0.55877286", "0.5544098", "0.55323935", "0.55319816", "0.5527142", "0.5527142", "0.55244136", "0.5519862" ]
0.8244629
0
Returns the path from the url.
public function getPath(string $url): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function path() {\n\t\t/* Note that it is necessary to pass the full URL to\n\t\t * `parse_url`, because `parse_url` can be tricked into\n\t\t * thinking that part of the path is a domain name. */\n\t\treturn parse_url($this->fullUrl(), PHP_URL_PATH);\n\t}", "static function getPath(string $url): ?string;", "public function getPathInfo(): string\r\n {\r\n return $_GET['url'] ?? '/';\r\n }", "function url( $url ) {\n\t\treturn $this->path( $url, true );\n\t}", "public function getUrl(string $path): string;", "function get_path($url) {\n preg_match('/^([^?]+)(\\?path.*?)?(&content.*)?$/', $url, $matches);\n if (isset($matches[2])) {\n\t\tparse_str(substr($matches[2], 1), $path);\n\t\t$parse_path = preg_split(\"/[-]+/\", $path['path']);\n\t} else {\n\t\t$parse_path[0] = '';\n\t\t$parse_path[1] = '';\n\t\t$parse_path[2] = '';\n\t\t$parse_path[3] = '';\n\t}\n return $parse_path;\n}", "function getpath() {\n\t\n\t$parseurl = parse_url(\"http://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\n\t$path = explode('/', $parseurl['path']); \n\n\treturn $path;\n}", "function getPathFromUrl($url)\n{\n $path = UrlHelper::getPathAndQueryFromUrl($url);\n if (empty($path)) {\n return 'index';\n }\n return $path;\n}", "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 url(): string\n {\n return strtok($this->getUri(), '?');\n }", "public function getUrl(){\r\n if(isset($_GET['url'])){\r\n $url = rtrim($_GET['url'], '/');\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n $url = explode('/', $url);\r\n return $url;\r\n }\r\n }", "public function getPath()\n {\n return isset($this->urlParts['path']) ? $this->urlParts['path'] : NULL;\n }", "public function getPathByPostUrl() {\n\t\t\n\t\t$url = Request::post('url');\n\n\t\tif ($url && ($Page = $this->Automad->getPage($url))) {\n\t\t\treturn FileSystem::fullPagePath($Page->path);\n\t\t} else {\n\t\t\treturn AM_BASE_DIR . AM_DIR_SHARED . '/';\n\t\t}\n\t\t\n\t}", "public static function getPath() {\n\t\treturn isset(self::$path)\n\t\t ? self::$path\n\t\t : (self::$path = substr(\n\t\t\t\t\tparse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH),\n\t\t\t\t\tstrlen(self::getBasePath())));\n\t}", "public function getUrl()\r\n {\r\n if (isset($_GET['url'])) {\r\n\r\n // remove the ending slash\r\n $url = rtrim($_GET['url'], '/');\r\n\r\n // removing any none url characters\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n\r\n // get url characters as an array using explode function\r\n $url = explode('/',$url);\r\n\r\n return $url;\r\n }\r\n }", "public function url(): string\n {\n return rtrim($this->request->getUriForPath('/'), '/');\n }", "public function getPath()\n {\n $path = $_SERVER['REQUEST_URI']??'/';\n $position = stripos($path, '?');\n if ($position) {\n return substr($path, 0, $position);\n }\n return $path;\n }", "public function getUrl()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/');\n\n $url = filter_var($url, FILTER_SANITIZE_URL);\n\n $url = explode('/', $url);\n return $url;\n \n }\n }", "public function url()\n {\n return explode('?' ,$this->uri)[0];\n }", "public function urlToPath($url): string\n {\n // strip the root URL\n $path = str_replace($this->rootUrl, '', $url);\n return $path;\n }", "public function get_url( $path = '' ) {\n\t\treturn $this->url . ltrim( $path, '/' );\n\t}", "public function path(): string\n {\n return $this->path ??= trim(\n $this->api->stripBasePath($this->request->getUri()->getPath()),\n '/',\n );\n }", "public function getCurrentPath() {\n $url = $this->getSession()->getCurrentUrl();\n $parsed_url = parse_url($url);\n $path = trim($parsed_url['path'], '/');\n\n return $path;\n }", "public function getURL ($path) {\n return $this->webBaseURL .\"/\". $path;\n }", "function getFilenameFromUrl($url) {\n $path = parseUrl($url);\n $parts = explode('/', $path['path']);\n $filename = end($parts);\n return $filename;\n}", "public function getPath() {\n return str_replace(Storage::disk('public')->url(''), '', $this->url);\n }", "public function getUrl(){\n if(isset($_REQUEST['url'])){\n $url = $_REQUEST['url'];\n $url = rtrim($url,'/');\n $url = filter_var($url,FILTER_SANITIZE_URL);\n $url = explode('/',$url);\n return $url;\n }\n }", "public function getPath() {\n if (empty($this->uriParts['path'])) {\n return '';\n }\n return implode('/', array_map(\"rawurlencode\", explode('/', $this->uriParts['path'])));\n }", "public function getUrl(){\n $url = $_GET;\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = FW_Security::cleanUrl($url);\n $url = filter_var($url, FILTER_SANITIZE_URL);\n \n $url = explode('/', $url);\n \n return $url;\n }", "public function getUrl()\n {\n return trim(implode('/', $this->path), '/').$this->getParams();\n }" ]
[ "0.78550035", "0.7276822", "0.721952", "0.7083807", "0.7077316", "0.7054212", "0.6987927", "0.69697154", "0.6919363", "0.6915285", "0.68937767", "0.6884224", "0.6835985", "0.681761", "0.6810118", "0.6784716", "0.6775908", "0.6730109", "0.6724978", "0.67213696", "0.6694089", "0.66733235", "0.665888", "0.66577965", "0.6628409", "0.66096455", "0.6595024", "0.65776914", "0.65675145", "0.65277106" ]
0.80770767
0
Gets visible moderation queue entries for specified user.
public function getVisibleModerationQueueEntriesForUser(array $contentIds, array $viewingUser) { $socialForumModel = ThemeHouse_SocialGroups_SocialForum::getSocialForumModel(); $socialForums = $socialForumModel->getSocialForumsByIds($contentIds, array( 'join' => ThemeHouse_SocialGroups_Model_SocialForum::FETCH_FORUM | ThemeHouse_SocialGroups_Model_SocialForum::FETCH_USER, 'permissionCombinationId' => $viewingUser['permission_combination_id'] )); $output = array(); foreach ($socialForums as $socialForum) { $socialForum['permissions'] = XenForo_Permission::unserializePermissions( $socialForum['node_permission_cache']); $canManage = true; if (!$socialForumModel->canViewSocialForum($socialForum, $null, $socialForum['permissions'], $viewingUser)) { $canManage = false; } elseif (!XenForo_Permission::hasContentPermission($socialForum['permissions'], 'editSocialForum') || !XenForo_Permission::hasContentPermission($socialForum['permissions'], 'deleteSocialForum')) { $canManage = false; } if ($canManage) { $output[$socialForum['social_forum_id']] = array( 'message' => $socialForum['description'], 'user' => array( 'user_id' => $socialForum['user_id'], 'username' => $socialForum['username'] ), 'title' => $socialForum['title'], 'link' => XenForo_Link::buildPublicLink('social-forums', $socialForum), 'contentTypeTitle' => new XenForo_Phrase('th_social_forum_socialgroups'), 'titleEdit' => true ); } } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModerations($user_id) {\n return $this->find('list', array(\n 'conditions' => array('Moderator.user_id' => $user_id),\n 'fields' => array('Moderator.forum_id')\n ));\n }", "public function getList($user);", "public function getEntries($user) {\n\t\t$db = $this->db;\n\t\t$user = $db->quote($user);\n\t\t$query = \"SELECT value FROM entries WHERE user=$user\";\n\t\t$result = $db->query($query);\n\t\treturn $result->fetchAll(PDO::FETCH_ASSOC);\n\t}", "public function findInboxByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n JOIN m.recipientUsers r\n WHERE r = :user\n ORDER BY m.createdAt DESC\n '\n )\n ->setParameter('user', $user)\n ->getResult();\n }", "public function getAllPublications($user)\n {\n return $this->getByUser($user);\n }", "function query_module_access_list(&$user)\n{\n\trequire_once('modules/MySettings/TabController.php');\n\t$controller = new TabController();\n\t$tabArray = $controller->get_tabs($user); \n\n\treturn $tabArray[0];\n\t\t\n}", "public function allUnreadForUser($userId);", "public function allUnreadForUser($userId);", "public function findByUser() {\n try \n {\n $params = $this->app->request()->params();\n $fields = array_to_json($params);\n\n //get request url parmameters\n $offset = isset($fields->offset) ? $fields->offset : 0;\n $limit = isset($fields->limit) ? $fields->limit : 7; \n $receiver = isset($fields->receiver) ? $fields->receiver : 'none'; \n\n $messages = Message::findByUser($offset, $limit, $receiver);\n\n //return finded users\n response_json_data($messages);\n }\n catch(Exception $e) \n {\n response_json_error($this->app, 500, $e->getMessage());\n }\n }", "public function getAnnouncesByUser($user)\n {\n $em = $this->getEntityManager();\n \n $query = $em->createQuery('\n SELECT a \n FROM AnnounceBundle:Announce a JOIN a.user u \n WHERE a.user = :user\n ORDER BY a.post ASC\n ');\n $query->setParameter('user', $user);\n return $query->getResult();\n }", "private function get_modification_links($user)\r\n {\r\n $toolbar = new Toolbar(Toolbar :: TYPE_HORIZONTAL);\r\n return $toolbar->as_html();\r\n }", "public function publishedBy($user_id)\n {\n return $this->model->where(compact('user_id'))->get();\n }", "function dialogue_get_user_entries($dialogue, $user) {\n global $DB, $CFG;\n $sqlparams = array('dialogueid' => $dialogue->id, 'userid' => $user->id);\n return $DB->get_records_select('dialogue_entries', \"dialogueid = :dialogueid AND userid = :userid\",\n 'timecreated DESC', $sqlparams);\n}", "function getRanks($userId, $moderator = false)\n\t{\n\t\t$e107 = e107::getInstance();\n\t\tif(!$userId && USER) { $userId = USERID; }\n\t\tif(isset($this->userRanks[$userId]))\n\t\t{\n\t\t\treturn $this->userRanks[$userId];\n\t\t}\n\n\t\t$ret = array();\n\t\tif(is_array($userId))\n\t\t{\n\t\t\t$userData = $userId;\n\t\t\t$userId = $userData['user_id'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$userData = e107::getSystemUser($userId)->getData(); //get_user_data($userId);\n\t\t}\n\n\t\tif($userData['user_admin'])\n\t\t{\n\t\t\tif($userData['user_perms'] == '0')\n\t\t\t{\n\t\t\t\t//Main Site Admin\n\t\t\t\t$data['special'] = \"<img src='\".$this->_getImage($this->ranks['special'][1]).\"' alt='\".$this->_getName($this->ranks['special'][1]).\"' title='\".$this->_getName($this->ranks['special'][1]).\"' />\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Site Admin\n\t\t\t\t$data['special'] = \"<img src='\".$this->_getImage($this->ranks['special'][2]).\"' alt='\".$this->_getName($this->ranks['special'][2]).\"' title='\".$this->_getName($this->ranks['special'][2]).\"' />\";\n\t\t\t}\n\t\t}\n\t\telseif($moderator)\n\t\t{\n\t\t\t$data['special'] = \"<img src='\".$this->_getImage($this->ranks['special'][3]).\"' alt='\".$this->_getName($this->ranks['special'][3]).\"' title='\".$this->_getName($this->ranks['special'][3]).\"' />\";\n\t\t}\n\n\t\t$userData['user_daysregged'] = max(1, round((time() - $userData['user_join']) / 86400));\n\t\t$level = $this->_calcLevel($userData);\n\n\t\t$lastRank = count($this->ranks['data']);\n\t\t$rank = false;\n\t\tif($level <= $this->ranks['data'][0]['thresh'])\n\t\t{\n\t\t\t$rank = 1;\n\t\t}\n\t\telseif($level >= $this->ranks['data'][$lastRank]['thresh'])\n\t\t{\n\t\t\t$rank = $lastRank;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor($i=0; $i < $lastRank; $i++)\n\t\t\t{\n\t\t\t\tif($level >= $this->ranks['data'][$i]['thresh'] && $level < $this->ranks['data'][($i+1)]['thresh'])\n\t\t\t\t{\n\t\t\t\t\t$rank = $i + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($rank !== false)\n\t\t{\n\t\t\t$data['name'] = $this->_getName($this->ranks['data'][$rank]);\n\t\t\t$img_title = ($this->ranks['data'][$rank]['name'] ? \" alt='{$data['name']}' title='{$data['name']}'\" : ' alt = \"\"');\n\t\t\t$data['pic'] = \"<img {$img_title} src='\".$this->_getImage($this->ranks['data'][$rank]).\"'{$img_title} />\";\n\t\t}\n\t\t$this->userRanks[$userId] = $data;\n\n\t\treturn $data;\n\t}", "public function getAuthenticatedEmotes($user) { \r\n return $this->makeRequest('get', \"/users/{$user}/emotes\");\r\n }", "private function getByUser($user)\n {\n $q = $this\n ->getUserPublicationQueryBuilder($user)\n ->orderBy('p.publishedAt', 'desc')\n ->getQuery()\n ;\n\n return $q->getResult();\n }", "function getAllowedModules( $user_id = 0 )\n\t{\n\t\tif ( !$user_id )\n\t\t{\n\t\t\t$user_id = $this->user_id;\n\t\t}\n\t\t\n\t\t$sql = \"SELECT `permission_grant_on`\n\t\t\t\tFROM `permissions`\n\t\t\t\tWHERE (`permission_user` = $user_id)\n\t\t\t\tAND (`permission_value` != 0 )\";\n\t\t\t\t\n\t\treturn db_loadList( $sql );\t\t\t\t\n\t}", "public function getUserBoards($user) {\n return $this->findBy(['user' => $user, 'isDeleted' => 0]);\n }", "public function findSubmissionsForMod($modUserId)\n {\n $query = '\n SELECT submitted_at, first_name, last_name, topic, mark, s.id\n FROM submissions s\n LEFT JOIN users u ON s.user_id = u.id\n LEFT JOIN projects p ON s.project_id = p.id\n WHERE mod_user_id = :mod_user_id\n ORDER BY submitted_at DESC\n ';\n $statement = $this->db->prepare($query);\n $statement->bindValue('mod_user_id', $modUserId, \\PDO::PARAM_INT);\n $statement->execute();\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $result;\n }", "public function findNotDisplayedMessagesByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m.id, m.subject, a.id as answerId, u.surname, u.name, u.username,\n s.id as messageStatusId, ast.id as answerStatusId\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n JOIN m.statuses s\n JOIN m.sender u\n LEFT JOIN m.answers a\n LEFT JOIN a.statuses ast\n WHERE (s.user = :user AND s.isDisplayed = 0) OR\n (ast.user = :user AND ast.isDisplayed = 0)\n '\n )\n ->setParameter('user', $user)\n ->getResult();\n }", "public function getAllByUserId($user_id)\n\t{\n\t\t$sql = sprintf('SELECT *\n\t\t\t\t\t\tFROM ats_jobs\n\t\t\t\t\t\tWHERE created_by = %d\n\t\t\t\t\t\tAND deleted = 0\n\t\t\t\t\t\tORDER BY modified_ts DESC',\n\t\t\t\t\t\t$user_id);\n\n\t\treturn $this->_db->query($sql)->fetchAll();\n\t}", "public function findSentByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n WHERE m.sender = :user\n ORDER BY m.createdAt DESC\n '\n )\n ->setParameter('user', $user)\n ->getResult();\n }", "public function allForUser($userId);", "public function allForUser($userId);", "public function getEditable(User $user) {\n if ($user->isAdmin()) {\n return $this->getAll();\n }\n\n $qb = $this->repository->createQueryBuilder(self::ALIAS);\n\n return $qb->join('site.roles', 'roles')\n ->where('roles.user = :user')\n ->andWhere('roles.readOnly = false')\n ->setParameter('user', $user)\n ->getQuery()\n ->getResult();\n }", "public static function notifactions_for_users($user_id){\n\t\t\tglobal $database;\n\n\t\t\t$sql = \"SELECT * FROM \" . self::$db_table . \" WHERE \";\n\t\t\t$sql .= \"user_id = {$user_id}\";\n $the_result_array = self::find_by_query($sql);\n return !empty($the_result_array) ? array_shift($the_result_array) : false;\n\t\t}", "function getByUserID($user_id) {\n return $this->find('list', array(\n 'conditions' => array(\n 'Wishlist.user_id' => $user_id\n ),\n 'fields' => array(\n 'Wishlist.product_entity_id'\n )\n ));\n }", "public static function returnRecipientRequests(Database $db, $user)\n {\n $user_id = $user->getUserId();\n try\n {\n $query = \"SELECT request.request_id, item.*\nFROM request \nLEFT JOIN item on request.item_id = item.item_id \nWHERE request.user_id = '$user_id'\";\n\n\n $db->runQuery($query);\n $requestsList = array();\n\n foreach ($db->results as $row)\n {\n $item = new Item($row[1], $row[2], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9]);\n $request = new Request($item, $user);\n $request->setRequestId($row[0]);\n\n array_push($requestsList, $request);\n }\n return $requestsList;\n }\n catch (DatabaseException $e)\n {\n $e->echoDetails();\n }\n catch (Exception $e)\n {\n echo \"Exception in method \". __METHOD__;\n }\n }", "public function get_sup_requests($user_id){\r\n\t\r\n\t$req = $this->data_client->get_sup_requests($user_id);\r\n\treturn $req;\r\n\t}", "function feed_access_feeds($user = NULL) {\r\n if (!$user) {\r\n global $user;\r\n }\r\n $fids = &drupal_static(__FUNCTION__);\r\n \r\n if (!isset($user->uid)) {\r\n return array();\r\n }\r\n if (!isset($fids[$user->uid])) {\r\n $fids[$user->uid] = db_select('feed', 'f')\r\n ->fields('f', array('fid'))\r\n ->condition('f.uid', $user->uid)\r\n ->execute()->fetchAllKeyed(0, 0);\r\n }\r\n return $fids[$user->uid];\r\n}" ]
[ "0.6819937", "0.5871076", "0.58633876", "0.5839053", "0.5688335", "0.566845", "0.56257945", "0.56257945", "0.557775", "0.55749166", "0.55535257", "0.55429524", "0.55196077", "0.55073524", "0.55054307", "0.54891276", "0.54758906", "0.5470687", "0.5460929", "0.5448789", "0.54349494", "0.5428", "0.54264855", "0.54264855", "0.5425096", "0.540112", "0.53988427", "0.53644526", "0.534613", "0.5341682" ]
0.6751271
1
Deletes the specified moderation queue entry.
public function deleteModerationQueueEntry($contentId) { $dw = XenForo_DataWriter::create('ThemeHouse_SocialGroups_DataWriter_SocialForum', XenForo_DataWriter::ERROR_SILENT); $dw->setExistingData($contentId); $dw->delete(); if ($dw->save()) { XenForo_Model_Log::logModeratorAction('socialForum', $dw->getMergedData(), 'delete', array( 'reason' => '' )); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n $this->queue->delete($this);\n }", "public function deleteQueue();", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gou_Service_ForumReply::getForumReply($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$ret = Gou_Service_ForumReply::deleteForumReply($id);\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\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 deleteMessage(Zend_Queue_Message $message)\n {\n \treturn $this->_pheanstalk->delete($message->handle);\n }", "public function delete()\n {\n parent::delete();\n\n $this->sqs->deleteMessage([\n 'QueueUrl' => $this->queue, 'ReceiptHandle' => $this->job->getReceiptHandle(),\n ]);\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "public static function delete()\n {\n if ( empty($_REQUEST['mgb_rating_id']) ) return;\n $id = (int) $_REQUEST['mgb_rating_id'];\n\n Database::query(\n \"DELETE FROM ?\n WHERE id=${id}\"\n );\n }", "protected function forum_queue_hard_delete()\n\t{\n\t\tif (!$this->phpbb_post_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tphpbb::_include('functions_posting', 'delete_post');\n\n\t\t$sql = 'SELECT t.*, p.*\n\t\t\tFROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p\n\t\t\tWHERE p.post_id = ' . $this->phpbb_post_id . '\n\t\t\t\tAND t.topic_id = p.topic_id';\n\t\t$result = phpbb::$db->sql_query($sql);\n\t\t$post_data = phpbb::$db->sql_fetchrow($result);\n\t\tphpbb::$db->sql_freeresult($result);\n\n\t\tdelete_post($post_data['forum_id'], $post_data['topic_id'], $post_data['post_id'], $post_data);\n\t}", "public function deleteQueueExtern($params = null);", "function edithistory_delete_thread($tid)\n{\n\tglobal $db, $mybb;\n\t$db->delete_query(\"edithistory\", \"tid='{$tid}'\");\n}", "public function adminDelComm()\n {\n $commID = $_POST['commID'];\n $del = \"DELETE FROM comment_section WHERE comm_id = ?\";\n $do = $this->connect()->prepare($del);\n $do->execute([$commID]);\n }", "public function deleteQueue($strName)\n {\n if(!$this->isAllowed('moderator')) return $this->returnText(self::ERR_NO_MOD);\n if(trim($strName) == \"\") return $this->returnText('No queue name specified to delete');\n if(strtolower(trim($strName)) == 'default') return $this->returnText('Cannot delete the \\'default\\' queue');\n\n $oQueue = Queue::where([\n ['channel_id', '=', $this->c->id],\n ['name', '=', $strName]\n ])->first();\n\n if($oQueue)\n {\n if($this->c->active == $oQueue->id)\n {\n // were deleting the current active queue so we have to set the default queue active again\n $oDefaultQueue = Queue::where([\n ['channel_id', '=', $this->c->id],\n ['name', '=', 'default']\n ])->first();\n\n if($oDefaultQueue)\n {\n $this->c->active = $oDefaultQueue->id;\n $this->c->save();\n }\n }\n\n $this->clearQueue($oQueue->id);\n $oQueue->forceDelete();\n return $this->returnText('Successfully deleted queue \"'. $strName.'\"');\n }\n else\n {\n return $this->returnText('Unable to delete queue \"'. $strName .'\", queue doesn\\'t exist');\n }\n }", "public function delete()\n {\n parent::delete();\n $receiptHandle = $this->job->getReceiptHandle();\n $this->mns->deleteMessage($receiptHandle);\n }", "public function delete($queue, $id)\n {\n $this->db->createCommand()->delete($this->table, ['id' => $id])->execute();\n }", "public function delete() {\n\t\t$query = new WP_Query( array(\n\t\t\t'name' => $this->params['post_name'],\n\t\t\t'post_type' => $this->params['post_type']\n\t\t) );\n\n\t\t$post = array_shift( $query->posts );\n\n\t\t// die('<pre>'.var_export($post,true).'</pre>');\n\n\t\tif ( $post ) {\n\t\t\t$current_action = $this->get_current_action();\n\t\t\t$this->action_results[ 'status' ] = 'success';\n\t\t\t$this->action_results[ 'messages' ][ $post->post_type ][ $post->ID ][ 'note' ] = __( 'The information has been deleted', 'kickpress' );\n\t\t\t$this->action_results[ 'data' ][ 'post_id' ] = $post->ID;\n\n\t\t\twp_trash_post( $post->ID );\n\t\t}\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM umgroup\n\t\t\t\tWHERE GpID=?\";\n\t\t\n\t\t \n\t\t$this->ums->query($sql, array($this->GpID));\n\n\t}", "function spamhurdles_db_remove($key)\n{\n global $PHORUM;\n\n phorum_db_interact(\n DB_RETURN_RES,\n \"DELETE FROM {$PHORUM['spamhurdles_table']}\n WHERE id='\".phorum_db_interact(DB_RETURN_QUOTED, $key).\"'\",\n NULL, DB_MASTERQUERY\n );\n}", "public function deleteTask()\n {\n if (User::isGuest())\n {\n $rtrn = Request::getVar('REQUEST_URI', Route::url('index.php?option=' . $this->_option, false, true), 'server');\n App::redirect(\n Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn)),\n Lang::txt('COM_RADIAM_LOGIN_NOTICE'),\n 'warning'\n );\n return;\n }\n\n if (!$this->config->get('access-delete-entry')\n && !$this->config->get('access-manage-entry'))\n {\n App::abort(403, Lang::txt('COM_RADIAM_NOT_AUTH'));\n }\n\n // Incoming\n $id = Request::getInt('entry', 0);\n\n if (!$id)\n {\n return $this->displayTask();\n }\n\n $process = Request::getVar('process', '');\n $confirmdel = Request::getVar('confirmdel', '');\n\n // Initiate a blog entry object\n $entry = Entry::oneOrFail($id);\n\n // Did they confirm delete?\n if (!$process || !$confirmdel)\n {\n if ($process && !$confirmdel)\n {\n $this->setError(Lang::txt('COM_RADIAM_ERROR_CONFIRM_DELETION'));\n }\n\n foreach ($this->getErrors() as $error)\n {\n $this->view->setError($error);\n }\n\n $this->view\n ->set('config', $this->config)\n ->set('entry', $entry)\n ->display();\n return;\n }\n\n // Check for request forgeries\n Request::checkToken();\n\n // Delete the entry itself\n $entry->set('state', 2);\n\n if (!$entry->save())\n {\n Notify::error($entry->getError());\n }\n\n // Log the activity\n Event::trigger('system.logActivity', [\n 'activity' => [\n 'action' => 'deleted',\n 'scope' => 'radiam.entry',\n 'scope_id' => $id,\n 'description' => Lang::txt('COM_RADIAM_ACTIVITY_ENTRY_DELETED', '<a href=\"' . Route::url($entry->link()) . '\">' . $entry->get('title') . '</a>'),\n 'details' => array(\n 'title' => $entry->get('title'),\n 'url' => Route::url($entry->link())\n )\n ],\n 'recipients' => [\n $entry->get('created_by')\n ]\n ]);\n\n // Return the entries lsit\n App::redirect(\n Route::url('index.php?option=' . $this->_option)\n );\n }", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function threadRemove(){\n\n\t$threadId\t\t\t \t= strip_tags($_GET['ThreadId']);\t\t\t\t #int - primaryKey\n\n\t$db = pdo(); # pdo() creates and returns a PDO object\n\t#dumpDie($_POST);\n\n\t$sql = \"DELETE FROM ma_Threads WHERE `ThreadID` = :ThreadID\";\n\n\t$stmt = $db->prepare($sql);\n\t//INTEGER EXAMPLE $stmt->bindValue(1, $id, PDO::PARAM_INT);\n\t$stmt->bindValue(':ThreadID', $threadId, PDO::PARAM_INT);\n\n\ttry {$stmt->execute();} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\t#feedback success or failure of update\n\n\tif ($stmt->rowCount() > 0)\n\t{//success! provide feedback, chance to change another!\n\t\tfeedback(\"Thread Removed Successfully From Timeline!\",\"success\");\n\t}else{//Problem! Provide feedback!\n\t\tfeedback(\"Thread Not Removed!\",\"warning\");\n\t}\n\tmyRedirect(THIS_PAGE);\n}", "public function delete()\n {\n $query = $this->db->getQuery(true);\n\n $query\n ->delete($this->db->quoteName(\"#__crowdf_intentions\"))\n ->where($this->db->quoteName(\"id\") .\"=\". (int)$this->id);\n\n $this->db->setQuery($query);\n $this->db->execute();\n\n $this->reset();\n }", "public function delete_gallery_item() {\n\t\n\t\t\t// Delete attachment\n\t\t\twp_delete_attachment( intval( $_POST[ 'attachment_id' ] ) );\n\t\n\t\t\t// Return the updated gallery\n\t\t\t$this->draw_gallery_items( intval( $_POST[ 'gallery_id' ] ) );\n\t\n\t\t\texit;\n\t\t}", "public function removeAction()\n {\n $modules = $this->module->fetchAll(\" groupmodule_id = \".$this->_getParam('id'));\n foreach($modules as $key=>$row)\n { \n $this->module->removemodule(APPLICATION_PATH.\"/modules/\".$row->module_name);\n }\n \n $current = $this->gmodule->find($this->_getParam('id'))->current();\n $current->delete(); \n \n $message = \"Data Deleted Successfully\";\n \n $this->_helper->flashMessenger->addMessage($message);\n die;\n }", "public function delete()\n {\n $data = Comment::where(\"reply\", $this->id)->get();\n foreach ($data as $comment) {\n $comment->delete();\n }\n\n /**\n * Delete self\n */\n parent::delete();\n }", "function messageDelete(Message $message);", "public function deleteMessage($queueId, $message, $options = null);", "Public Function RemoveFrombevomedia_queue($jobId)\n {\n \t$this->jobId = $jobId;\n \t\n \t$DatabaseObj = Zend_Registry::get('Instance/DatabaseObj');\n \t\t\n \t$UpdateArray = array(\n \t\t\t'Deleted' => 1,\t\t\t\t\t\t \t\t\t\n \t\t);\n \t\t\n \t\t$DatabaseObj->update('bevomedia_queue', $UpdateArray, \"jobId = '{$jobId}'\");\n \t\t\n \t\t$this->status = 'Deleted';\n \t\n }", "function delete()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $res[] = $db->query( \"DELETE FROM eZTodo_Priority WHERE ID='$this->ID'\" );\r\n eZDB::finish( $res, $db );\r\n }", "function deleteEntry() \n { \n \n // before removing entry, make sure associated linkGroups & linkViewers\n // are removed as well\n $linkID = $this->getID();\n \n $linkMgr = new RowManager_NavLinkAccessGroupManager();\n $linkMgr->setLinkID( $linkID );\n $list = $linkMgr->getListIterator();\n \n $list->setFirst();\n while( $entry = $list->getNext() ) {\n $entry->deleteEntry();\n }\n \n $linkViewerMgr = new RowManager_NavLinkViewerManager();\n $linkViewerMgr->setLinkID( $linkID );\n $list = $linkViewerMgr->getListIterator();\n \n $list->setFirst();\n while( $entry = $list->getNext() ) {\n $entry->deleteEntry();\n }\n \n parent::deleteEntry();\n \n }" ]
[ "0.63789564", "0.6115766", "0.587", "0.5846722", "0.5756148", "0.57462096", "0.5731161", "0.568626", "0.56332344", "0.56241536", "0.5604138", "0.55754596", "0.5557331", "0.5530397", "0.55224276", "0.55197376", "0.5517672", "0.5516031", "0.5497648", "0.54797095", "0.5468505", "0.54581904", "0.545706", "0.54371005", "0.54223096", "0.54216075", "0.5407531", "0.538591", "0.5378771", "0.5373104" ]
0.6302791
1
Show a graphical display of the campaign's Synced state.
public function displaySynced() { if ($this->is_synced) { return '<i style="font-size:25px;color:#449D44;" class="fa fa-check" aria-hidden="true"></i>'; } else { return '<i style="font-size:25px;color:#C9302C;" class="fa fa-times" aria-hidden="true"></i>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getSyncStatusText()\n {\n if ($this->_getSchedule()->getLastRunningJob()) {\n $html = 'Running';\n if (strlen($this->_getSchedule()->getLastRunningJob()->getExecutedAt())) {\n $html .= ' (Started at: ';\n $html .= Mage::helper('core')->formatDate($this->_getSchedule()->getLastRunningJob()->getExecutedAt(), 'medium', true);\n $html .= ') ';\n\n /**\n * Show stop sync button\n */\n $html .= $this->_getStopSyncButton();\n }\n } elseif ($this->_getSchedule()->getLastPendingJob()) {\n $html = 'Pending';\n if (strlen($this->_getSchedule()->getLastPendingJob()->getScheduledAt())) {\n $html .= ' (Scheduled at: ';\n $html .= Mage::helper('core')->formatDate($this->_getSchedule()->getLastPendingJob()->getScheduledAt(), 'medium', true);\n $html .= ')';\n }\n } else {\n $html = 'Not scheduled';\n /**\n * Show reset sync customers button\n */\n }\n\n return $html;\n }", "public function getGraphicStateSync() {}", "public function renderWaiting()\n\t{\n\t\tif (!$this->configuration->isRunned())\n\t\t{\n\t\t\t$this->events->triggerListener('onRendererWaitingStart');\n\t\t\t$uri = $this->link->createLink($this->configuration, array(\n\t\t\t\t'setRunned' => true,\n\t\t\t));\n\t\t\techo Html::el('h2')->add(Html::el('a', 'START')->href($uri));\n\t\t\techo '<p style=\"display: none;\" id=\"sentence\" data-state=\"waiting\">Waiting for start</p>';\n\t\t\t$this->events->triggerListener('onRendererWaitingEnd');\n\t\t}\n\t}", "function printState() {\n\t\t$state = $this->getState();\n\t\techo $state;\n\n\t\n\t}", "public function show(NRCState $nRCState)\n {\n //\n }", "public function setGraphicStateSync($graphicStateSync) {}", "public function display_status() {\n\t\t$banner_status = get_option( 'cookieproCCPASettingsPreview' );\n\t\t$banner_behavior_status = get_option( 'cookieproCCPABehaviorSettingsPreview' );\n\t\t$this->settings_status = 'Draft';\n\t\t$this->settings_publish_time = '';\n\t\tif( ! empty( $banner_status ) && ! empty( $banner_behavior_status ) ){\n\t\t\tif ( 'Published' === $banner_status['publishStatus'] && 'Published' === $banner_behavior_status['publishStatus'] ) {\n\t\t\t\t$this->settings_status = 'Published';\n\t\t\t}\n\t\t\t$this->settings_publish_time = $banner_status['lastPublished'];\n\t\t}\n\t\treturn array(\n\t\t\t'status' => $this->settings_status,\n\t\t\t'lastpublished' => $this->settings_publish_time,\n\t\t);\n\t}", "public function standings()\n {\n return view('standings.realtime');\n }", "public function render() {\n\t\t$supportUrl = 'https://wpml.org/forums/forum/english-support/?utm_source=plugin&utm_medium=gui&utm_campaign=wpmltm';\n\t\t$supportLink = '<a target=\"_blank\" rel=\"nofollow\" href=\"' . esc_url( $supportUrl ) . '\">'\n\t\t . esc_html__( 'contact our support team', 'wpml-translation-management' )\n\t\t . '</a>';\n\n\n\t\t?>\n\t\t<div id=\"ams-ate-console\">\n\t\t\t<div class=\"notice inline notice-error\" style=\"display:none; padding:20px\">\n\t\t\t\t<?php echo sprintf(\n\t\t\t\t// translators: %s is a link with 'contact our support team'\n\t\t\t\t\tesc_html(\n\t\t\t\t\t\t__( 'There is a problem connecting to automatic translation. Please check your internet connection and try again in a few minutes. If you continue to see this message, please %s.', 'wpml-translation-management' )\n\t\t\t\t\t),\n\t\t\t\t\t$supportLink\n\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<span class=\"spinner is-active\" style=\"float:left\"></span>\n\t\t</div>\n\t\t<script type=\"text/javascript\">\n\t\t\tsetTimeout(function () {\n\t\t\t\tjQuery('#ams-ate-console .notice').show();\n\t\t\t\tjQuery(\"#ams-ate-console .spinner\").removeClass('is-active');\n\t\t\t}, 20000);\n\t\t</script>\n\t\t<?php\n\t}", "public function run()\n {\n return view('microboard::state', [\n 'config' => $this->config,\n 'title' => 'إعلانات قادمة',\n 'info' => 'لم يأتي وقت بداية ظهور هذه الإعلانات',\n 'icon' => 'fa fa-images',\n 'count' => Advertisement::whereDate('started_at', '>', now()->toDateString())->count(),\n ]);\n }", "public function draw_toggle ()\n {\n echo $this->toggle_as_html ();\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "function dashboard_widget_display() {\n\t\techo '<div class=\"escalate-dashboard-loading\">Loading Stats</div>';\n\t}", "public function scheduler() {\n\n\t\t$user = \\Auth::User();\n\n\t\t$station_id = $user->station->id;\n//\t\t$talk_shows = \\App\\ConnectContent::where('content_type_id', ContentType::GetTalkContentTypeID())\n//\t\t\t->orderBy('start_date')\n//\t\t\t->where('station_id', $station_id)\n//\t\t\t->get();\n\n\t\treturn view('airshrconnect.scheduler')\n\t\t\t->with('WebSocketURL', \\Config::get('app.WebSocketURL'))\n\t\t\t->with('content_type_list', ContentType::$CONTENT_TYPES)\n\t\t\t->with('content_type_list_for_connect', ContentType::$CONTENT_TYPES_FOR_CONNECT)\n\t\t\t->with('content_type_id_for_talkshow', ContentType::GetTalkShowContentTypeID());\n//\t\t\t->with('talk_shows', $talk_shows);\n\n\t}", "function ghactivity_sync_settings_callback() {\n\techo '<p>';\n\tesc_html_e( 'By default, Ghactivity only gathers data about the last 100 issues in your watched repositories, and then automatically logs all future issues. This section will allow you to perform a full synchronization of all the issues, at once.', 'ghactivity' );\n\techo '</p>';\n}", "public function showUpdateNotification(){\n\t\techo $this->getUpdateNotification();\n\t}", "function debug_output() {\n\t\tglobal $ac_tos_response, $ac_status_response;\n\t\t$response = 'tos' == $_GET['ac_debug'] ? $ac_tos_response : $ac_status_response;\n\t\tif ( empty( $response ) ) {\n\t\t\t$response = 'No response from API :(';\n\t\t} else {\n\t\t\t$response = print_r( $response, 1 );\n\t\t}\n\n\t\t$tos = $this->get_option( 'tos' ) ?\n\t\t\t'<span style=\"color:green;\">Yes</span>' :\n\t\t\t'<span style=\"color:red;\">No</span>';\n\t\t$status = $this->get_option( 'wordads_approved' ) ?\n\t\t\t'<span style=\"color:green;\">Yes</span>' :\n\t\t\t'<span style=\"color:red;\">No</span>';\n\t\t$house = $this->get_option( 'wordads_house' ) ? 'Yes' : 'No';\n\n\t\t$type = $this->get_option( 'tos' ) && $this->get_option( 'wordads_approved' ) ?\n\t\t\t'updated' :\n\t\t\t'error';\n\n\t\techo <<<HTML\n\t\t<div class=\"notice $type is-dismissible\">\n\t\t\t<p>TOS: $tos | Status: $status | House: $house</p>\n\t\t\t<pre>$response</pre>\n\t\t</div>\nHTML;\n\t}", "public function setSyncTime(): void\n {\n }", "public function toggleShowTimer(): void\n {\n $this->showTimer = !$this->showTimer;\n }", "public function getStateText()\n {\n $options = $this->getStateOptions();\n return isset($options[$this->state]) ? $options[$this->state] : '';\n }", "public function actionStatewiseevaluation()\n {\n return $this->render('statewise-evaluation-report');\n }", "function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}", "public function Render() {\r\n\t\t\treturn $this->RenderOnOff();\r\n\t\t}", "public function display() {\n $actions = array();\n $html = '';\n if ( !$this->get_client_id() || !$this->get_client_secret() ) {\n $html .= $this->get_client_secret_form_view();\n } else {\n $this->oauth_access();\n\n if ( $this->is_connected() ) {\n $html .= $this->get_profile_details_view();\n\n $html .= $this->get_timezone_info_view();\n\n $html .= $this->get_options_form_view();\n\n $actions[] = 'logout';\n } else {\n $html .= $this->get_access_form_view();\n }\n\n $actions[] = 'delete-secret';\n }\n\n if ( !!$actions ) {\n $args = array(\n 'actions' => $actions,\n 'google_calendar' => $this,\n );\n\n $html .= $this->get_view( 'actions.php', $args );\n }\n\n echo $html;\n }", "public function getShowTime()\n\t{\n\t\treturn $this->showtime;\n\t}", "function dashboard_widget() {\n\t\tif(!empty($this->options['stats_last_cache'])):\n\t\t\t$last_cache = '<em>Last Updated ' . date(\"m/d/y @ h:i:s\", $this->options['stats_last_cache']) . '</em>';\n\t\telse:\n\t\t\t$last_cache = '';\n\t\tendif;\n\t\twp_add_dashboard_widget('escalate_network_stats', 'Escalate Network Stats'.$last_cache, array($this,'dashboard_widget_display'));\t\n\t}", "private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function displayAjaxChangeBlockStatus()\n {\n $now = new DateTime();\n $psreassuranceId = (int) Tools::getValue('idpsr');\n $newStatus = ((int) Tools::getValue('status') == 1) ? 0 : 1;\n\n $dataToUpdate = [\n 'status' => $newStatus,\n 'date_upd' => $now->format('Y-m-d H:i:s'),\n ];\n $whereCondition = 'id_psreassurance = ' . $psreassuranceId;\n\n $updateResult = Db::getInstance()->update('psreassurance', $dataToUpdate, $whereCondition);\n\n // Response\n $this->ajaxRenderJson($updateResult ? 'success' : 'error');\n }", "public function getStateTime();", "public function form( $instance ) {\n\t\t$useServerTime = $instance['useServerTime'];\n\t\t?>\n <p>\n <label for=\"<?php echo esc_attr( $this->get_field_id( 'useServerTime' ) ); ?>\">Use Server Time</label>\n <input type=\"checkbox\" id=\"<?php echo esc_attr( $this->get_field_id( 'useServerTime' ) ); ?>\"\n name=\"<?php echo esc_attr( $this->get_field_name( 'useServerTime' ) ); ?>\"\n value=\"1\" <?php if ( $useServerTime ) {\n\t\t\t\techo \" checked=\\\"checked\\\"\";\n\t\t\t} ?>>\n </p>\n\t<?php }" ]
[ "0.5789514", "0.55504507", "0.53793603", "0.5314324", "0.5283319", "0.52776283", "0.5197936", "0.5181183", "0.5074544", "0.49626473", "0.49572572", "0.49523664", "0.49149606", "0.48868504", "0.48550218", "0.48493296", "0.484689", "0.48463127", "0.48404253", "0.48368922", "0.48353377", "0.4833897", "0.48249936", "0.4798942", "0.47786406", "0.47744918", "0.47687358", "0.47652134", "0.47644308", "0.47641984" ]
0.6605943
0
Show a graphical display of the campaign's finished state.
public function displayFinished() { if ($this->has_finished) { return '<i style="font-size:25px;color:#449D44;" class="fa fa-check" aria-hidden="true"></i>'; } else { return '<i style="font-size:25px;color:#C9302C;" class="fa fa-times" aria-hidden="true"></i>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_completed_page(&$infos)\n\t\t{\n\t\t\t$this->t->set_file('activity_completed', 'activity_completed.tpl');\n\t\t\t$this->t->set_block('activity_completed', 'report_row', 'rowreport');\n\t\t\t//build an icon array for show_engine_infos\n\t\t\t$icon_array = Array();\n\t\t\t\n\t\t\t$icon_array['ok'] \t\t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'check').'\">';\n\t\t\t$icon_array['failure'] \t\t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'stop').'\">';\n\t\t\t$icon_array['transition'] \t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'transition').'\">';\n\t\t\t$icon_array['transition_human'] = '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'transition_human').'\">';\n\t\t\t$icon_array['activity'] \t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'auto_activity').'\">';\n\t\t\t$icon_array['dot'] \t\t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'puce').'\">&nbsp;';\n\t\t\t$this->show_engine_infos($infos, $icon_array);\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'wf_procname'\t=> $this->process_name,\n\t\t\t\t'procversion'\t=> $this->process_version,\n\t\t\t\t'actname'\t=> $this->activity_name,\n\t\t\t\t'rowreport'\t=> '',\n\t\t\t));\n\n\t\t\t$this->translate_template('activity_completed');\n\t\t\t$this->t->pparse('output', 'activity_completed');\n\t\t\t$this->show_after_running_page();\n\t\t}", "public function renderWaiting()\n\t{\n\t\tif (!$this->configuration->isRunned())\n\t\t{\n\t\t\t$this->events->triggerListener('onRendererWaitingStart');\n\t\t\t$uri = $this->link->createLink($this->configuration, array(\n\t\t\t\t'setRunned' => true,\n\t\t\t));\n\t\t\techo Html::el('h2')->add(Html::el('a', 'START')->href($uri));\n\t\t\techo '<p style=\"display: none;\" id=\"sentence\" data-state=\"waiting\">Waiting for start</p>';\n\t\t\t$this->events->triggerListener('onRendererWaitingEnd');\n\t\t}\n\t}", "abstract protected function renderComplete();", "public function completed()\r\n {\r\n set_meta('title', 'Done');\r\n $progress = app()->make(Progress::class);\r\n $progress->reset();\r\n\r\n return view('antares/installer::installation.completed');\r\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function isComplete() {\n return $this->getDescription() == 'Done';\n }", "public function done()\n {\n $this->setStatus(self::STATUS_DONE);\n }", "static function add_eb_finished(): void {\r\n\t\tself::add_acf_inner_field(self::ebs, self::eb_finished, [\r\n\t\t\t'label' => 'Finished',\r\n\t\t\t'type' => 'true_false',\r\n\t\t\t'instructions' => 'Is the election finished?',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'message' => '',\r\n\t\t\t'default_value' => 0,\r\n\t\t\t'ui' => 1,\r\n\t\t]);\r\n\t}", "public function finished()\n {\n }", "public function display($finish = false) {\n\t\t$msg = $this->_message;\n\t\t$idx = $this->_iteration++ % strlen($this->_chars);\n\t\t$char = $this->_chars[$idx];\n\t\t$speed = number_format(round($this->speed()));\n\t\t$elapsed = $this->formatTime($this->elapsed());\n\n\t\tStreams::out_padded($this->_format, compact('msg', 'char', 'elapsed', 'speed'));\n\t}", "protected function renderGameFinished(Game $game)\r\n {\r\n $viewFlashMessage = new ViewFlashMessage();\r\n $view = new MainView();\r\n $flashMessage = $game->getFlashMessage();\r\n\r\n $message = \"Well done! You complete the game in {$game->getShots()} shots\";\r\n\r\n $flashMessage->customNotification($message);\r\n $viewFlashMessage->prepare($flashMessage);\r\n $view->addViewObject($viewFlashMessage);\r\n\r\n $view->render();\r\n }", "protected function _showFinalMessages()\n {\n if ($this->_errors) {\n $this->_output->writeln(\n \"<fg=red>There was some errors on setting configuration: \\n{$this->_errors}</fg=red>\"\n );\n }\n\n if ($this->_warnings) {\n $this->_output->writeln(\n \"<comment>There was some warnings on setting configuration: \\n{$this->_warnings}</comment>\"\n );\n }\n\n if ($this->_configurationCounter > 0) {\n $this->_output->writeln(\n \"<info>Configuration has been applied</info>\"\n );\n\n $this->_output->writeln(\n \"<info>Total changed configurations: {$this->_configurationCounter}</info>\"\n );\n } else {\n $this->_output->writeln(\n \"<error>There was no configuration applied.</error>\"\n );\n }\n }", "function dashboard_widget_display() {\n\t\techo '<div class=\"escalate-dashboard-loading\">Loading Stats</div>';\n\t}", "public function finishedAction()\n {\n }", "public function showComplete(){\n\t\t\n\t\t//our tasks\n\t\t$this->set('tasks', $this->Task->find('all', array(\n\t\t\t'conditions' => array('Task.status_id' => '2'),\n\t\t\t'order' => array('Task.completed_on'),\n\t\t)));\n\t\t\n\t\t//our statuses\n\t\t$this->set('statuses', $this->Task->Status->find('list'));\n\t\t\n\t\t//our locations\n\t\t$this->set('locations', $this->Task->Location->find('list'));\n\t\t\n\t\t//our keywords\n\t\t$this->set('keywords', $this->Task->Keyword->find('list'));\n\t\t\n\t\t//our link locations\n\t\t$linkLocation['/foundersFactory/tasks/'] = \"Show by Location\";\n\t\tforeach($this->Task->Location->find('list') as $key => $location){\n\t\t\t$linkLocation['/foundersFactory/tasks/showByLocation/'.$key] = $location;\n\t\t}\n\t\t$this->set('linkLocations', $linkLocation);\n\t}", "public function display() {\n return false;\n }", "public function display() {\n return false;\n }", "static function add_bod_finished(): void {\r\n\t\tself::add_acf_inner_field(self::bods, self::bod_finished, [\r\n\t\t\t'label' => 'Finished',\r\n\t\t\t'type' => 'true_false',\r\n\t\t\t'instructions' => 'Is the election finished?',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\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' => 0,\r\n\t\t\t'ui' => 1,\r\n\t\t]);\r\n\t}", "public function done() {\n ncurses_refresh();\n ncurses_end();\n usleep(300000);\n }", "public function completed() {\n\t}", "function show_after_running_page()\n\t\t{\n\t\t\t$this->t->set_file('after_running', 'after_running.tpl');\n\t\t\t\n\t\t\t//prepare the links form\n\t\t\t$link_data_proc = array(\n\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t'filter_process'\t=> $this->process_id,\n\t\t\t);\n\t\t\t$link_data_inst = array(\n\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t'filter_instance'\t=> $this->instance_id,\n\t\t\t);\n\t\t\tif ($this->activity_type == 'start')\n\t\t\t{\n\t\t\t\t$activitytxt = lang('get back to instance creation');\n\t\t\t\t$act_button_name = lang('New instance');\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_useropeninstance.form',\n\t\t\t\t);\n\t\t\t}\n\t\t\telseif ($this->activity_type == 'standalone')\n\t\t\t{\n\t\t\t\t$activitytxt = lang('get back to global activities');\n\t\t\t\t$act_button_name = lang('Global activities');\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_useractivities.form',\n\t\t\t\t\t'show_globals'\t\t=> true,\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$activitytxt = lang('go to same activities for other instances of this process');\n\t\t\t\t$act_button_name = lang('activity %1', $this->activity_name);\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t\t'filter_process' => $this->process_id,\n\t\t\t\t\t'filter_activity_name'\t=> $this->activity_name,\n\t\t\t\t);\n\t\t\t}\n\t\t\t$button='<img src=\"'. $GLOBALS['egw']->common->image('workflow', 'next')\n\t\t\t\t.'\" alt=\"'.lang('go').'\" title=\"'.lang('go').'\" width=\"16\" >';\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'same_instance_text'\t=> ($this->activity_type=='standalone')? '-' : lang('go to the actual state of this instance'),\n\t\t\t\t'same_activities_text'\t=> $activitytxt,\n\t\t\t\t'same_process_text'\t=> lang('go to same process activities'),\n\t\t\t\t'same_instance_button'\t=> ($this->activity_type=='standalone')? '-' : '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_inst).'\">'\n\t\t\t\t\t.$button.lang('instance %1', ($this->instance_name=='')? $this->instance_id: $this->instance_name).'</a>',\n\t\t\t\t'same_activities_button'=> '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_act).'\">'\n\t\t\t\t\t.$button.$act_button_name.'</a>',\n\t\t\t\t'same_process_button'\t=> '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_proc).'\">'\n\t\t\t\t\t.$button.lang('process %1', $this->process_name).'</a>',\n\t\t\t));\n\t\t\t$this->translate_template('after_running');\n\t\t\t$this->t->pparse('output', 'after_running');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function complete();", "public function complete();", "public function finish_display ()\n {\n $this->_finish_body ();\n?>\n </body>\n</html>\n<?php\n }", "public static function onMonacoFooter() {\n\t\tglobal $wgAdConfig;\n\t\tif (\n\t\t\tisset( $wgAdConfig['monaco']['leaderboard'] ) &&\n\t\t\t$wgAdConfig['monaco']['leaderboard']\n\t\t) {\n\t\t\techo self::loadAd( 'leaderboard' );\n\t\t}\n\t\treturn true;\n\t}", "private function showProgress()\n {\n $allQuestions = $this->questionRepository->list(['id', 'question']);\n $this->transformProgressList($allQuestions);\n\n $this->console->info( ' ************ Your progress is ************');\n\n foreach ($this->progress as $option) {\n $validate = $option['is_true'] ? __('True') : __('False');\n $this->console->info( ' Question: ' . $option['question']);\n if(null !== $option['is_true'])\n $this->console->info( ' Answer: ' . $option['answer'] . '('.$validate .')');\n $this->console->info( ' ');\n }\n $this->console->info( ' *******************************************');\n }", "public function isFinished();", "function displayFinishSetup()\n\t{\n\t\t$this->checkDisplayMode(\"finish_setup\");\n\t\t$this->no_second_nav = true;\n//echo \"<b>1</b>\";\n\t\tif ($this->validateSetup())\n\t\t{\n\t\t\t$txt_info = $this->lng->txt(\"info_text_finish1\").\"<br /><br />\".\n\t\t\t\t\"<p>\".$this->lng->txt(\"user\").\": <b>root</b><br />\".\n\t\t\t\t$this->lng->txt(\"password\").\": <b>homer</b></p>\";\n\t\t\t$this->setButtonNext(\"login_new\",\"login\");\n//echo \"<b>2</b>\";\n\t\t\t$this->setup->getClient()->reconnect();\t\t// if this is not done, the writing of\n\t\t\t\t\t\t\t\t\t\t\t// the setup_ok fails (with MDB2 and a larger\n\t\t\t\t\t\t\t\t\t\t\t// client list), alex 17.1.2008\n\t\t\t$this->setup->getClient()->setSetting(\"setup_ok\",1);\n//$this->setup->getClient()->setSetting(\"zzz\", \"Z\");\n//echo \"<b>3</b>\";\n\t\t\t$this->setup->getClient()->status[\"finish\"][\"status\"] = true;\n//echo \"<b>4</b>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$txt_info = $this->lng->txt(\"info_text_finish2\");\n\t\t}\n\n//echo \"<b>5</b>\";\n\t\t// output\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.clientsetup_finish.html\", \"setup\");\n\t\t$this->tpl->setVariable(\"TXT_INFO\",$txt_info);\n\n\t\t$this->setButtonPrev(\"nic\");\n//echo \"<b>6</b>\";\n\t\t$this->checkPanelMode();\n//echo \"<b>7</b>\";\n\t}", "function finished() {\n\t\t$referrer = isset($_GET['referrer']) ? urldecode($_GET['referrer']) : null;\n\t\t\n\t\treturn $this->customise(array(\n\t\t\t'Content' => $this->customise(\n\t\t\t\tarray(\n\t\t\t\t\t'Link' => $referrer\n\t\t\t\t))->renderWith('ReceivedFormSubmission'),\n\t\t\t'Form' => ' ',\n\t\t));\n\t}", "public function isFinished() {\n\t\treturn $this->workflowActivitySpecification->isFinished();\n\t}" ]
[ "0.59758365", "0.58604485", "0.58453715", "0.56397945", "0.56151646", "0.560581", "0.5501625", "0.5483747", "0.5460936", "0.5434394", "0.53893274", "0.53715736", "0.5363716", "0.5359528", "0.53544766", "0.53520316", "0.53520316", "0.53229994", "0.53203005", "0.52722734", "0.526943", "0.5268596", "0.5268596", "0.5267328", "0.5262372", "0.52568924", "0.5255674", "0.5243738", "0.5241718", "0.52123976" ]
0.70984656
0
Set a token marker for the worker to start after being resumed.
public function setResumeToken(Token $token) { $this->update(['resume_token' => $token->id]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPreviousToken() {\n\t\t$this->_token = $this->_previousToken;\n\t\t$this->_session->key = $this->_previousToken;\n\t}", "public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }", "public function markTokenAsUsed()\n {\n $this->status = self::SUCCESSFULLY_USED_TOKEN;\n }", "public function setToken(string $token): void;", "public function setToken(string $token): void\n {\n $this->token = $token;\n }", "public function resume();", "public function setToken($token): void\n {\n $this->token = $token;\n }", "public function setToken($token);", "function setToken($token)\n {\n $this->token = $token;\n }", "public function start()\n {\n $this->_marks = array();\n $this->mark('__start');\n }", "public function resume () {\n if ($this->started) {\n $this->run = true;\n $this->lapTmstmp = now();\n\n } else {\n $this->restart();\n }\n }", "abstract protected function doResume();", "protected function storeInitialMark()\n {\n $this->storeMark(\n 'Init',\n 'main',\n static::initialTime(),\n $this->trackMemory ? memory_get_usage(true) : 0,\n 0\n );\n }", "public function setToken($token){\n $this->token = $token;\n }", "abstract public function setNextAuthToken($token);", "public function setToken($token)\n {\n $this->token = $token;\n }", "public function setToken($token)\n {\n $this->token = $token;\n }", "public function setPreWebAccessToken($token)\n {\n // First, remove previous (no longer valid) WebAccessToken from session if it exists\n if (session()->has('api_consumer_token')) {\n session()->pull('api_consumer_token');\n }\n // Set the PreWebAccessToken in the session\n session()->put('consumer_token', $token);\n }", "public function markExecution() {}", "public function set() {\n\t\t$this->token = uniqid(rand(), true);\n\n\t\t$this->time = time();\n\n\t\t$this->$referer = $_SERVER['HTTP_REFERER'];\n\n\t\tif ($this->isEnable()) {\n\t\t\t$_SESSION['token'] = $this->token;\n\t\t\t$_SESSION['token_time'] = $this->time;\n\t\t\t$_SESSION['token_referer'] = $this->$referer;\n\t\t}\n\t}", "public function setInitialMarking($initialMarking, $setTokens = false) {\n\t\t$this->initialMarking = (int) $initialMarking;\n\t\tif($setTokens) {\n\t\t\t$this->resetTokens();\n\t\t}\n\t}", "private function setCurrentInstruction($param) {\r\n $this->_currentInstruction = $param;\r\n }", "public function setCache($token){\n \n $this->cacheStack->push($token);\n }", "public function enterToken(string $token): void;", "public function setRememberToken($value){\n $this->token=$value;\n }", "private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n /* valid login */\n $this->post('/v1/login', [\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n }", "protected function setMark() {\n echo $this->promptMessage('choose_mark');\n $mark = $this->limitInput(array(self::X_MARK, self::O_MARK, self::QUIT_BUTTON));\n switch ($mark) {\n case self::X_MARK:\n $this->_userMark = self::X_MARK;\n $this->_botMark = self::O_MARK;\n break;\n case self::O_MARK:\n $this->_userMark = self::O_MARK;\n $this->_botMark = self::X_MARK;\n break;\n case self::QUIT_BUTTON:\n $this->quit();\n }\n echo \"You will be Player \" . $this->_userMark . \".\" . PHP_EOL;\n echo $this->promptMessage('start_game') . PHP_EOL;\n }", "function set_checkpoint()\n\t{\n\t\t$this->guardar();\n\t}", "private function markCurrentPage() {\n $this->pageReloadMarker = $this->randomMachineName();\n $this->getSession()->executeScript('document.body.appendChild(document.createTextNode(\"' . $this->pageReloadMarker . '\"));');\n }", "public function set($token);" ]
[ "0.5683218", "0.5387644", "0.537441", "0.5281512", "0.5227127", "0.5222539", "0.5146465", "0.5128549", "0.51089925", "0.51024145", "0.50398046", "0.49909082", "0.4986468", "0.49840638", "0.49751338", "0.49731547", "0.49731547", "0.49608636", "0.49259508", "0.4920733", "0.49190456", "0.49065852", "0.4872462", "0.48724255", "0.48558658", "0.4847325", "0.4845676", "0.48328447", "0.48217106", "0.48150793" ]
0.65170866
0
Check if this token has already been processed by this worker.
public function processedToken(Token $token) { return $this->resume_token > $token->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function existsRequestToken()\n {\n // load token\n $store = $this->getStore();\n $type = $store->loadToken($this);\n\n // get consumer\n $this->_consumer = call_user_func($this->_get_consumer_handler, $store->getConsumerKey());\n\n // return result\n if ($type=='request') {\n return true;\n }\n return false;\n }", "public function hasToken(){\n return ( $this->token and $this->token->isValid() );\n }", "public function isProcessed() {}", "public function hasToken ()\n {\n return $this->peekAtToken() !== NULL;\n }", "public function hasToken(){\n return $this->_has(2);\n }", "public function hasToken(){\n return $this->_has(2);\n }", "public function hasQueueingCookie(): bool;", "public function valid()\n {\n return count($this->result_queue) !== 0;\n }", "public function isProcessed(): bool;", "public function hasToken();", "public function processToken()\n {\n if (!$this->_token) {\n return false;\n }\n\n if ($this->_isPasswordRecoveryToken) {\n $this->_processPasswordRecoveryToken();\n } else {\n $this->_processAuthToken();\n }\n\n /**\n * just for case. e.g. some chosen page not exist anymore etc.\n * Lead should not stay on page with token, so move lead to 404\n */\n if (!$this->_redirectUrl) {\n $this->_redirectUrl = '/404';\n }\n\n return true;\n }", "protected function _isNewToken()\n {\n $info = $this->_quote->getPayment();\n Mage::helper('ewayrapid')->unserializeInfoInstace($info);\n if ($token = Mage::getSingleton('core/session')->getData('newToken')) {\n Mage::getSingleton('core/session')->unsetData('newToken');\n return true;\n }\n return false;\n }", "public function checkToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return false;\n }\n if (!isset($this->data['access_token'])) {\n return false;\n }\n return $this->requestToken->getToken() === $this->data['access_token'];\n }", "public function isRunningSchedulerWorker()\n {\n $pids = $this->redis->hKeys(self::$workerKey);\n $schedulerPid = $this->redis->get(self::$schedulerWorkerKey);\n\n if ($schedulerPid !== false && is_array($pids)) {\n if (in_array($schedulerPid, $pids)) {\n return true;\n }\n // Pid is outdated, remove it\n $this->unregisterSchedulerWorker();\n return false;\n }\n return false;\n }", "public function valid()\n {\n // don't process more than the max messages\n if ($this->currentKey >= $this->maxMessages) {\n return false;\n }\n // if a payload already exists for the current key, we'll be able to return that\n if (isset($this->messages[$this->currentKey])) {\n return true;\n }\n // if no payload exists for the current key yet, try to get the next one\n $message = $this->api->getNextMessage();\n if ($message) {\n $this->messages[$this->currentKey] = $message;\n return true;\n }\n // if no message exists and no new messages could be received,\n // end the iterable\n return false;\n }", "public function hasToken()\n {\n return $this->tokenFlag;\n }", "public function hasToken()\n {\n return $this->tokenFlag;\n }", "public function ssoTokenExists() {\n if ($this->httpSession != null && array_key_exists('maestrano', $this->httpSession)) {\n return true;\n }\n\n return false;\n }", "public function valid()\n {\n return !is_null(key($this->requests));\n }", "public function processing() {\n return $this->bulkRunning() || count($this->get());\n }", "public function isTokenValid() {\n if (!isset($_SESSION['token']) || $this->_token != $_SESSION['token'])\n \n\t\t\t$this->_errors[] = 'invalid submission';\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }", "public function hasPendingInsertions()\n {\n return ! empty($this->documentInsertions);\n }", "public function checkToken( )\n {\n\n $this->getTokenPost();\n if ( $this->token_post && $this->is_active() ) {\n if (empty($this->project_id) || $this->project_id != $this->token_post['meta_data']['pr-projekt'][0]) {\n $this->set_result_error('notfound');\n return false;\n }\n return $this->result;\n } else {\n return false;\n }\n\n }", "public static function OrderProcessHasBeenMarkedAsCompleted()\n {\n return array_key_exists(self::SESSION_KEY_NAME_ORDER_SUCCESS, $_SESSION) && true == $_SESSION[self::SESSION_KEY_NAME_ORDER_SUCCESS];\n }", "public function hasJob(): bool;", "protected function hasStarted()\r\n {\r\n return isset($this->_session[$this->_stepsKey]);\r\n }", "function Check() {\n\t\t// Check if the token has been sent.\n\t\tif(isset($_REQUEST['spack_token'])) {\n\t\t\t// Check if the token exists\n\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t// Check if the token isn't empty\n\t\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t\t$age = time()-$_SESSION[\"spackt_\".$_REQUEST['spack_token']];\n\t\t\t\t\t// Check if the token did not timeout\n\t\t\t\t\tif($age > $this->timeout*60) $this->error = 4;\n\t\t\t\t}\n\t\t\t\telse $this->error = 3;\n\t\t\t}\n\t\t\telse $this->error = 2;\n\t\t}\n\t\telse $this->error = 1;\n\t\t// Anyway, destroys the old token.\n\t\t$this->tokenDelAll();\n\t\tif($this->error==0) return true;\n\t\telse return false;\n\t}", "public function hasRunning()\n {\n return $this->running !== null;\n }", "private function isTokenUsed($validationToken = null)\n\t{\n\t\tif (null === $validationToken) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$valoration = $this->validationFactory->create()\n\t\t\t\t\t\t->getCollection()\n\t\t\t\t\t\t->addFieldToFilter('customerloyalty_sent_entity_id', ['eq' => $validationToken->getEntityId()])\n\t\t\t\t\t\t->getFirstItem();\n\n\t\treturn empty($valoration->getData());\n\t}", "protected function _checkToken(KCommandContext $context)\n {\n //Check the token\n if($context->caller->isDispatched())\n { \n $method = KRequest::method();\n \n //Only check the token for PUT, DELETE and POST requests (AND if the view is not 'ipn')\n if(($method != KHttpRequest::GET) && ($method != KHttpRequest::OPTIONS) && (KRequest::get('get.view', 'string') != 'ipn')) \n { \n if( KRequest::token() !== JUtility::getToken()) { \n return false;\n }\n }\n }\n \n return true;\n }" ]
[ "0.6482249", "0.62763935", "0.625363", "0.61815286", "0.616132", "0.616132", "0.61007345", "0.6089041", "0.60735035", "0.6066239", "0.6061072", "0.6032619", "0.6005189", "0.5986701", "0.5925701", "0.58916473", "0.58916473", "0.5890091", "0.58862287", "0.57972044", "0.5795179", "0.5775556", "0.5768129", "0.5744417", "0.57437885", "0.57337594", "0.5715767", "0.56992555", "0.569602", "0.56934637" ]
0.6495519
0
Shows voltages in the nodes
static public function showVoltages($circuit, $return = false) { $text = "Operating point:\n\n"; foreach ($circuit->V as $k => $v) { $text .= 'V(' . $circuit->getNodeName($k) . ") \t\t = " . number_format($v, 6) . " V\n"; } return $return ? $text : print($text); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(RedVelvetData $redVelvetData)\n {\n //\n }", "public function tocar(){\n echo \"Tocando no volume: \" . $this->volume . \" decibéis. <br>\";\n }", "public function vreme()\n {\n return view('mladenovac.vreme');\n }", "public function show()\n {\n echo 'Value: ' . $this->value . '<br>';\n }", "public function show(Vaksin $vaksin)\n {\n //\n }", "public function display()\n {\n echo \"temperature:{$this->_subject->getTemperature()},humidity:{$this->_subject->getHumidity()},pressure:{$this->_subject->getPressure()}\" . PHP_EOL;\n }", "function table_voltooid($conn)\n\t{\n\t\t$data=prepare_data_volt($conn);\n\t\t\n\t\tfor ($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\tforeach($data[$i] as $best)\n\t\t\t{\n\t\t\t\techo \"<td>$best</td>\";\n\t\t\t}\n\t\t\techo \"</tr>\";\n\t\t}\n\t}", "public function show(Vat $vat)\n {\n //\n }", "public function index()\n {\n $vids = Vid::all();\n return view('all.vid', ['vid' => $vids]);\n }", "function printStatsKv() {\n\n\t\t$this->printStatsTableKv($this->table);\n\t\t$this->printStatsPlayersKv($this->table, $this->players);\n\n\t}", "public function vxvAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ArmensaViajesBundle:Viaje')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function hasVoltage()\n {\n return $this->voltage !== null;\n }", "public function mostrarVentas() {\n //String $retorno\n //Array Venta $col\n $retorno = \"\";\n $col = $this->getColVentas();\n for ($i = 0; $i < count($col); $i++) {\n $retorno .= $col[$i] . \"\\n\";\n $retorno .= \"-------------------------\\n\";\n }\n return $retorno;\n }", "public function getVendas()\n {\n return $this->vendas;\n }", "public function show(Ledgers $ledgers)\n {\n //\n }", "public function index() {\r\n $this->genererVue();\r\n }", "public function getShow()\n {\n echo \"Show TV!!!\";\n }", "public function vitimas() {\n $this->validaAutenticacao();\n $vitimas = Container::getModel('Vitimas');\n $this->view->vitimas = $vitimas->getAllDashboard();\n $vitimas->__set('id', '1');\n $this->view->vtm = $vitimas->getVitima();\n $this->menu();\n $this->render('vitimas', 'layout-dashboard');\n }", "public function show(Visitor $visitor)\n {\n //\n }", "public function getVat()\n {\n return $this->_dVat;\n }", "public function show(vendorequipment $vendorequipment)\n {\n //\n }", "public function verDVDEnPlasma( ) {\n\n $respuesta=self::$plasma->verEntradaPantallaAV2();\n return $this->isError($respuesta,\"ver el lector de dvd en\");\n }", "public function dvehicles(){\n\n\t\t\t$vehicles = DB::table('logistics_vehicles')\n\t\t\t\t->join('vehicle_types','logistics_vehicles.type', '=', 'vehicle_types.id')\n\t\t\t\t//->where('logistics_vehicles.tenant_id', Auth::user()->tenant_id)\n\t\t\t\t->where('logistics_vehicles.status', '=', 0)\n\t\t\t\t->orderBy('logistics_vehicles.status', 'DESC')\n\t\t\t\t->orderBy('logistics_vehicles.id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\treturn view('backend.logistics.vehicles', ['vehicles' => $vehicles]);\n\t\t}", "public function actionView($id)\n {\n return $this->render('variant/view', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function index()\n {\n $dati_verdura = Vegetable::all();\n $data = [\n 'verdure' => $dati_verdura\n ];\n return view('vegetables.index', $data);\n }", "public function getVout()\n {\n return $this->vout;\n }", "public function videoconferenciaSubirVolumen( ) {\n $this->subirVolumen();\n //$this->setComando(\"SUBIR_VOLUMEN\");\n }", "public function show(VTPassLogs $vTPassLogs)\n {\n //\n }", "function __construct($valores, $volver) {\n $this->valores = $valores;\n $this->volver = $volver;\n $this->render();\n }", "public function show(Vente $vente)\n {\n //\n }" ]
[ "0.608324", "0.5731048", "0.56518805", "0.56453073", "0.5288346", "0.52365226", "0.52140284", "0.5105469", "0.5098585", "0.5083675", "0.50833577", "0.5075399", "0.50057584", "0.5004259", "0.49965352", "0.4953418", "0.4925365", "0.4925169", "0.49231127", "0.4910553", "0.48859286", "0.48733833", "0.48671958", "0.48608637", "0.4848896", "0.4847833", "0.48331943", "0.48309475", "0.4828153", "0.48232946" ]
0.6228776
0
Construct object string $pattern regular expression pattern string $extension file extension which is ignored in pattern matching.
public function __construct( $pattern, $extension = NULL ) { // Charcoal_ParamTrait::validateString( 1, $pattern ); // Charcoal_ParamTrait::validateString( 2, $extension, TRUE ); $this->pattern = $pattern; $this->extension = $extension; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create($extensions, $ignorePatterns);", "public function __construct($pattern) {\n $pattern = preg_quote($pattern, self::DELIMITER);\n $pattern = preg_replace_callback('/([\\\\\\\\]{1,3})\\*/', function($matches) {\n $length = strlen($matches[1]);\n if ($length === 1) {\n return '.*';\n }\n\n return '\\*';\n }, $pattern);\n\n $this->regexp = self::DELIMITER.'^'.$pattern.'$'.self::DELIMITER;\n }", "public static function fromExtension(string $extension):string;", "private static function convertPattern($pattern) {\n\t\tif (preg_match('/^glob:(.+)$/', $pattern, $m)) {\n\t\t\t// TODO real glob support\n\t\t\treturn Files::regex($m[1]);\n\t\t} else if (preg_match('/^(?:re|regex):(.+)$/', $pattern, $m)) {\n\t\t\tif (preg_match('@^/.+/[imsxeADSUXJu]*$@', $m[1])) {\n\t\t\t\treturn $m[1];\n\t\t\t} else {\n\t\t\t\treturn '/' . addcslashes($m[1], '/') . '/i';\n\t\t\t}\n\t\t\treturn $m[1];\n\t\t} else {\n\t\t\treturn $pattern;\n\t\t}\n\t}", "public function __construct($pattern = null, $limit = 0, $count = 1, $append = false) {\n\t\tif ($limit < 0 || $count < 1 || (!empty( $pattern ) && strlen( $pattern ) < 1)) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t$this->configure();\n\t\tif ($pattern !== null) {\n\t\t\t$this->pattern = (string) $pattern;\n\t\t}\n\t\t$this->limit = (int) $limit;\n\t\t$this->count = (int) $count;\n\t\t$this->append = (boolean) $append;\n\t\t$this->openFiles();\n\t}", "public function getPattern() {}", "public function getPattern();", "public function getPattern();", "public function extension(string $extension): static\n {\n return $this->setAssetProperty('extension', $extension);\n }", "public function extension(string $extension = \"\"): string|static\n {\n if ($extension) {\n $this->extension = (string) str($extension)->ensureStart(\".\");\n\n return $this;\n }\n\n return \".\" . ltrim($this->extension, \".\");\n }", "public function setPattern($pattern) {}", "function preg($pattern){\n return new Parser(['_call_preg', [$pattern]]);\n}", "public function setPattern($pattern) {\n $this->pattern = $pattern;\n return $this;\n }", "protected function init()\n {\n if ($this->regex) {\n return;\n }\n\n $this->regex = $this->path;\n $matches = [];\n\n if ($count = preg_match_all('@{([^A-Za-z]*([A-Za-z]+))([?]?)(?::([^}]+))?}@', $this->regex, $matches)) {\n $this->tokens = new \\SplFixedArray($count);\n\n foreach ($matches[1] as $index => $token) {\n $fullString = $matches[1][$index];\n $name = $matches[2][$index];\n $optional = !empty($matches[3][$index]);\n $constraint = empty($matches[4][$index]) ? '.*' : $matches[4][$index];\n\n if ($optional) {\n $replace = sprintf('(?:%s(?<%s>%s))?', str_replace($name, '', $fullString), $name, $constraint);\n } else {\n $replace = sprintf('(?<%s>%s)', $name, $constraint);\n }\n\n $this->regex = str_replace($matches[0][$index], $replace, $this->regex);\n\n $this->tokens[$index] = [$name, $optional];\n }\n }\n }", "public function replaceExtension(Stringable|string $extension): static\n {\n return new static($this->uri->withPath(HierarchicalPath::fromUri($this->uri)->withExtension($extension)->toString()));\n }", "public static function pattern(string $pattern, string $exceptionMessage = self::DEFAULT_PATTERN_EXCEPTION_MESSAGE): self\n {\n return (new self())->setPattern($pattern, $exceptionMessage);\n }", "public function prepare(string $pattern): string\n {\n $pattern = preg_replace_callback(\n /**\n * Detecting AnyInstanceOfClass meta characters (<\\Namespace\\Klass>)\n * @see https://secure.php.net/manual/en/language.oop5.basic.php\n */\n \"/<([a-zA-Z_\\x7f-\\xff\\\\\\\\][a-zA-Z0-9_\\x7f-\\xff\\\\\\\\]*)>/\",\n function ($matches) {\n // Replace namespace separater because `\\` is invalid as a variable name\n $klass = preg_replace(\"/\\\\\\\\/\", self::T_NS, $matches[1]);\n return '$'.self::T_ANY_INSTANCE_OF.$klass;\n },\n $pattern\n );\n\n // Adding T_OPEN_TAG for valid PHP syntax\n return \"<?php \".$pattern;\n }", "public function matching($pattern)\n {\n $matches = [];\n\n /**\n * Break up our pattern into components we can match up\n * with our available extensions.\n */\n list($namespace, $extension) = explode('::', $pattern);\n list($addonType, $addonSlug) = explode('.', $namespace);\n\n if ($extension !== '*') {\n\n list($extensionType, $extensionSlug) = explode('.', $extension);\n } else {\n\n $extensionSlug = '*';\n $extensionType = '*';\n }\n\n $pattern = \"{$addonType}_{$addonSlug}_{$extensionType}_{$extensionSlug}\";\n\n foreach ($this->items as $item) {\n if ($this->extensionSlugIsPattern($item, $pattern)) {\n $matches[] = $item;\n }\n }\n\n return self::make($matches);\n }", "public function __construct($pattern, $resource) {\r\n $this->pattern = $pattern;\r\n $this->resource = $resource;\r\n }", "public function glob($pattern)\n {\n if (!is_string($pattern)) {\n throw new InvalidStringException('pattern', $pattern);\n } elseif (empty($pattern)) {\n throw new InvalidNotEmptyException('pattern');\n }\n\n if (!is_string($this->value)) {\n throw new InvalidStringException($this->name, $this->value);\n } elseif (!fnmatch($pattern, $this->value)) {\n throw new StringNotMatchGlobException($this->name, $this->value, $pattern);\n }\n\n return $this;\n }", "public function setPattern($pattern)\n {\n $this->pattern = $pattern;\n return $this;\n }", "public function setPattern($pattern)\n {\n $this->pattern = $pattern;\n return $this;\n }", "protected function createRegexPatterns($pattern)\n {\n $pattern = rtrim($pattern, ' /');\n $extra = $this->extractCatchAllPattern($pattern);\n $matchPattern = str_replace(\n static::QUOTED_PARAM_IDENTIFIER, static::REGEX_SINGLE_PARAM, preg_quote($pattern), $paramCount\n );\n $replacePattern = str_replace(static::PARAM_IDENTIFIER, '/%s', $pattern);\n $matchPattern = $this->fixOptionalParams($matchPattern);\n $matchRegex = \"#^{$matchPattern}{$extra}$#\";\n return array($matchRegex, $replacePattern);\n }", "public function __construct( $fileExtension, $rules )\n\t{\n\t\t//set file and options\n\t\t$this->fileExtension = $this->getImageFullExtension($fileExtension['name']);\n\t\t$this->rules = $rules;\n\t\t//Add some default rules if none present\n\t\t$this->setDefaultRules();\n\t}", "public function setDestinationFormatFromExtension($extension) {\n $this->destinationFormat = $this->execManager->getFormatMapper()->getFormatFromExtension($extension) ?: '';\n return $this;\n }", "public function setSourceFormatFromExtension($extension) {\n $this->sourceFormat = $this->execManager->getFormatMapper()->getFormatFromExtension($extension) ?: '';\n return $this;\n }", "public function SetPattern ($pattern) {\n\t\t$this->pattern = $pattern;\n\t\treturn $this;\n\t}", "public function setPattern(?string $pattern): static\n {\n $this->pattern = $pattern;\n return $this;\n }", "protected function _constructPattern($filter) {\n $this->_pattern = array();\n foreach($filter as $item => $pattern) {\n $this->_pattern[$item] = '/'.str_replace('/', '\\/', $pattern).'/i'; // allow regex characters\n }\n }", "static public function parse($pattern)\n\t{\n\t\tif (isset(self::$parse_cache[$pattern]))\n\t\t{\n\t\t\treturn self::$parse_cache[$pattern];\n\t\t}\n\n\t\t$regex = '#^';\n\t\t$interleave = array();\n\t\t$params = array();\n\t\t$n = 0;\n\n\t\t$parts = preg_split('#(:\\w+|<(\\w+:)?([^>]+)>)#', $pattern, -1, PREG_SPLIT_DELIM_CAPTURE);\n\n\t\tfor ($i = 0, $j = count($parts); $i < $j ;)\n\t\t{\n\t\t\t$part = $parts[$i++];\n\n\t\t\t$regex .= $part;\n\t\t\t$interleave[] = $part;\n\n\t\t\tif ($i == $j)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$part = $parts[$i++];\n\n\t\t\tif ($part{0} == ':')\n\t\t\t{\n\t\t\t\t$identifier = substr($part, 1);\n\t\t\t\t$selector = '[^/]+';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$identifier = substr($parts[$i++], 0, -1);\n\n\t\t\t\tif (!$identifier)\n\t\t\t\t{\n\t\t\t\t\t$identifier = $n++;\n\t\t\t\t}\n\n\t\t\t\t$selector = $parts[$i++];\n\t\t\t}\n\n\t\t\t$regex .= '(' . $selector . ')';\n\t\t\t$interleave[] = array($identifier, $selector);\n\t\t\t$params[] = $identifier;\n\t\t}\n\n\t\t$regex .= '$#';\n\n\t\treturn self::$parse_cache[$pattern] = array($interleave, $params, $regex);\n\t}" ]
[ "0.6189709", "0.5734386", "0.5664583", "0.56326574", "0.5438512", "0.5437198", "0.5390302", "0.5390302", "0.5383325", "0.53488743", "0.533652", "0.533384", "0.53014445", "0.52999455", "0.5280566", "0.52773136", "0.5259952", "0.52401507", "0.52389777", "0.52198774", "0.52008677", "0.52008677", "0.51895636", "0.5174928", "0.51747495", "0.51544785", "0.515093", "0.51378846", "0.51362616", "0.51272917" ]
0.7006704
0
Set the verified status to true and make the email token null
public function verified() { $this->verified = 1; $this->email_token = null; $this->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verified()\n {\n $this->verified = 1;\n $this->email_token = null;\n $this->save();\n }", "public function markEmailAsVerified();", "public function verifyEmail()\n {\n $this->verified = true;\n\n $this->save();\n\n $this->activationToken->delete();\n }", "public function verify($token) {\n User::where('email_token', $token)\n ->firstOrFail()\n ->update([\n 'email_token' => null,\n 'verified' => 1\n ]);\n\n //$user->update(['email_token' => null]);\n /*$email_token_update = $user->email_token = null;\n $email_token_update->save(); */\n\n return redirect('/home')->with('successfulVerification', 'Account Verified!');\n\n }", "public function verify()\n {\n $this->update(['email_verified_at' => Carbon::now()]);\n }", "public function setVerified()\n {\n $this->update([\n 'verified' => true,\n ]);\n }", "public function verifyUserEmail($token)\n {\n $query = users::where('token',$token)->firstOrFail();\n // Activating Status of this User\n $task = users::find($query->id);\n $task->status = \"Active\";\n $task->token = \"\";\n $task->save();\n return redirect(route('emailVerified'))->with('message', 'Email Verified Successfully');\n\n }", "public function requestVerificationEmail()\n {\n if (!$this->request->is('post')) {\n $this->_respondWithMethodNotAllowed();\n return;\n }\n\n $user = $this->Guardian->user();\n if (!$user->verified) {\n $this->Users->Tokens->expireTokens($user->id, TokensTable::TYPE_VERIFY_EMAIL);\n $token = $this->Users->Tokens->create($user, TokensTable::TYPE_VERIFY_EMAIL, 'P2D');\n try {\n $this->getMailer('User')->send('verify', [$user, $token->token]);\n $this->set('message', __('Please check your inbox.'));\n } catch (\\Exception $e) {\n $this->_respondWithBadRequest();\n $this->set('message', 'Mailer not configured.');\n }\n } else {\n $this->set('message', __('Your email address is already verified.'));\n }\n\n $this->set('_serialize', ['message']);\n }", "public function confirmEmail($token){\n $user = User::find(Auth::user() -> id);\n if($user->payment_status == 0){\n return redirect()->route('register.payment');\n }else if($user->payment_status == 1){\n return redirect()->route('payment.verify');\n }else{\n $data = User::where('remember_token', $token) -> get() -> first();\n if($data->mail_activation_status === 'pending'){\n $data->mail_activation_status = 'active';\n $data->email_verified_at = Carbon::now();\n $data->update();\n return view('active', [\n 'status' => 'success'\n ]);\n }else{\n return view('active', [\n 'status' => 'error'\n ]);\n }\n }\n\n }", "public function hasVerifiedEmail();", "public function confirmEmail()\n {\n $this->mail_confirmed = Carbon::now();\n $this->mail_token = null;\n $this->save();\n }", "function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [1] post='.json_encode($_POST));\n\t\t# skip this step if the user has already verified their email address\n\t\tif($this->native_session->get('__email_verified') && $this->native_session->get('__email_verified') == 'Y'){\n\t\t\tredirect(base_url().'account/login');\n\t\t}\n\n\t\t# otherwise continue here\n\t\tif(!empty($_POST['emailaddress'])){\n\t\t\t$response = $this->_api->post('account/resend_link', array(\n\t\t\t\t'emailAddress'=>$this->native_session->get('__email_address'),\n\t\t\t\t'baseLink'=>base_url()\n\t\t\t));\n\n\t\t\t$data['msg'] = (!empty($response['result']) && $response['result']=='SUCCESS')?'The verification link has been resent':'ERROR: The verification link could not be resent';\n\t\t}\n\n\t\t$data = load_page_labels('sign_up',$data);\n\t\t$this->load->view('account/verify_email', $data);\n\t}", "public function verifyAccountToken($email,$token){\n $user = User::where('verifyAccountToken',$token)->get()->first();\n\n if ( $user ){\n if ( $user->verifyAccountToken ){\n $user->verifyAccountToken = null;\n $user->verify = true;\n if ( !$user->save() )\n return redirect(\"/#/login\");\n \n return redirect(\"/#/login\");\n }\n }\n\n return redirect(\"/#/login\");\n }", "public function verifyUser($token)\n {\n $verifyUser = VerifyUser::where('token', $token)->first();\n if (isset($verifyUser)) {\n $user = $verifyUser->user;\n if (!$user->isVerified) {\n $verifyUser->user->isVerified = 1;\n $verifyUser->user->save();\n $status = \"Your e-mail is verified. You can now login.\";\n } else {\n $status = \"Your e-mail is already verified. You can now login.\";\n }\n } else {\n return redirect('/message')->with('warning', \"Sorry your email cannot be identified.\");\n }\n\n return redirect('/message')->with('status', $status);\n }", "public function testVerification()\n {\n Notification::fake();\n\n $this->user->email_verified_at = null;\n\n $this->user->save();\n\n $this->user->notify(new VerifyEmail);\n\n // $request = $this->post('/email/resend');\n //\n // $request->assertSuccessful();\n\n Notification::assertTimesSent(1, VerifyEmail::class);\n\n Notification::assertSentTo($this->user,VerifyEmail::class);\n }", "public function confirmEmail()\n {\n $this->email_confirmation_token = null;\n $this->is_email_verified = 1;\n return $this->save();\n }", "function is_verified()\n {\n return false;\n }", "public function verify()\n {\n $this->verified = true;\n\n $this->save();\n\n $this->verifyUser()->delete();\n }", "public function emailVerification($token){\n if ($this->userModel->checkToken($token)){\n $data = ['email_verification' => 'alert-success',\n 'email' => '',\n 'password' => '',\n 'email_error' => '',\n 'password_error' => '',\n ];\n $this->view('users/login', $data);\n } else {\n $data = ['email_verification' => 'alert-danger',\n 'email' => '',\n 'password' => '',\n 'email_error' => '',\n 'password_error' => '',\n ];\n $this->view('users/login', $data);\n }\n }", "public function confirmEmail($email_token)\n {\n \n $user = User::where('email_token', $email_token)->first();\n\n if ( ! $user ) { \n \t\n \tsession()->flash('message', \"The user doesn't exist or has been already confirmed. Please login\"); \n \t\n \n } else { // saves the user as verified\n\n\t $user->verified = 1;\n\t $user->email_token = null;\n\t $user->save();\n\n\t //flash a message to the session\n\t\t\tsession()->flash('message', 'You have successfully verified your account. Please login');\n \t}\n\n \treturn redirect('login');\n\n }", "public function verify(){\n\t\t$email = $this->input->get('email');\n\t\t$token = $this->input->get('token');\n\n\t\t$user = $this->db->get_where('user',['email' =>$email])->row_array();\n\n\t\tif ($user) {\n\t\t\t$user_token = $this->db->get_where('user_token',['token' => $token])->row_array();\n\t\t\tif ($user_token) {\n\t\t\t\t\n\t\t\t\t$this->db->set('is_active',1);\n\t\t\t\t$this->db->where('email', $email);\n\t\t\t\t$this->db->update('user');\n\t\t\t\t$this->db->delete('user_token',['email'=>$email]);\n\n\t\t\t\t// kalo token nya gak ada\n\t\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-success\" role=\"alert\">'.$user['email'].' Success Activated!</div>');\n\t\t\t\tredirect('auth');\n\n\t\t\t}else{\n\t\t\t\t// kalo token nya gak ada\n\t\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-danger\" role=\"alert\">Wrong Token</div>');\n\t\t\t\tredirect('auth');\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-danger\" role=\"alert\">Account activation failed! Wrong email</div>');\n\t\t\tredirect('auth');\n\t\t}\n\t}", "public function verify($token)\n {\n //9fe1d37ece96644eaf44f2252b8384813cfbc757203642\n $users = User::all();\n foreach ($users as $user) {\n if ($user->verification_token == $token && !empty($user->verification_token)) {\n User::where('id', '=', $user->id)->update(['email_verified' => true, 'verification_token' => null]);\n return redirect('/')->withErrors(['msg' => 'Your email had been verified.']);\n }\n }\n return redirect('')->withErrors(['msg' => 'The verification key had expired.']);\n }", "public function markPhoneAsVerified();", "public function unsetVerificationToken(): void\n {\n $this->verificationToken = [];\n }", "public function setVerified(bool $verified) {\n $this->verified = (int) $verified;\n\n }", "public function unverify()\n {\n $this->unsetVerifiedFlag()->save();\n\n // :TODO: Fire an event here\n }", "public function verifyEmail($token = null) {\n\t\t$user = $this->checkEmailVerfificationToken($token);\n\n\t\tif ($user === false) {\n\t\t\tthrow new RuntimeException(__d('users', 'Invalid token, please check the email you were sent, and retry the verification link.'));\n\t\t}\n\n\t\t$expires = strtotime($user[$this->alias]['email_token_expires']);\n\t\tif ($expires < time()) {\n\t\t\tthrow new RuntimeException(__d('users', 'The token has expired.'));\n\t\t}\n\n\t\t$data[$this->alias]['active'] = 1;\n\t\t$user[$this->alias]['email_verified'] = 1;\n\t\t$user[$this->alias]['email_token'] = null;\n\t\t$user[$this->alias]['email_token_expires'] = null;\n\n\t\t$user = $this->save($user, array(\n\t\t\t'validate' => false,\n\t\t\t'callbacks' => false));\n\t\t$this->data = $user;\n\t\treturn $user;\n\t}", "protected function email(Request $request) {\n $verificationToken = $request->route('email_token');\n $userCount = DB::table('users')->where([['verification_token', $verificationToken], ['verified', 'false']])->count();\n if($userCount > 0) {\n\n /* Querying the user table by passing Email verification token */\n $user = DB::table('users')->where([['verification_token', $verificationToken], ['verified', 'false']])->first();\n\n /* Updating Status of Verification */\n DB::table('users')->where('verification_token', $verificationToken)->update(['verified'=> true]);\n\n /**\n * Sending welcome email to the user\n * @author Tittu Varghese ([email protected])\n *\n * @param array | $user\n */\n\n $emailVariables_UserName = $user->first_name;\n $emailVariables_SubTitle = \"Welcome to Bytacoin!\";\n $emailVariables_MainTitle = \"Get Started with Bytacoin\";\n $emailVariables_EmailText = \"Thank you for completing registration with us. We are happy to serve for you and click below button to login to your dashboard and checkout our awesome offerings.\";\n $emailVariables_ButtonLink = \"https://bytacoin.telrpay.com/\";\n $emailVariables_ButtonText = \"GET STARTED\";\n\n $emailTemplate = new EmailTemplates($emailVariables_UserName,$emailVariables_SubTitle,$emailVariables_MainTitle,$emailVariables_EmailText,$emailVariables_ButtonLink,$emailVariables_ButtonText);\n\n $emailContent = $emailTemplate->GenerateEmailTemplate();\n $mail = new Email(true,$emailContent);\n $mail->addAddress($user->email,$user->first_name);\n $mail->Subject = 'Welcome to Bytacoin!';\n $mail->send();\n\n return redirect('login')->with('success', 'Your account has been activated. Please login to access dashboard.');\n\n } else {\n\n return redirect('login')->with('error', 'Looks like the verification link is expired or not valid.');\n\n }\n }", "public function actionEmailverification() {\n if (Yii::$app->request->get('id') && Yii::$app->request->get('key')) {\n\n $access_token = Yii::$app->request->get('id');\n $key = Yii::$app->request->get('key');\n\n $customers = \\app\\models\\Customers::find()\n ->leftjoin('user_token', 'user_token.user_id=users.id')\n ->where(['access_token' => $access_token])\n ->andWhere(['token' => $key])\n ->one();\n\n\n if (count($customers)) {\n\n $customers->profile_status = 'ACTIVE';\n $customers->save();\n $user_token = \\app\\models\\UserToken::find()\n ->where(['token' => $key])\n ->andWhere(['user_id' => $customers->id])\n ->one();\n $user_token->delete();\n Yii::$app->session->setFlash('success', 'Your account verified successfully.');\n \\app\\components\\EmailHelper::welcomeEmail($customers->id);\n } else {\n Yii::$app->session->setFlash('danger', 'Illegal attempt1.');\n }\n } else {\n Yii::$app->session->setFlash('danger', 'Illegal attempt2.');\n }\n return $this->render('emailverification');\n }", "public function sendEmailVerificationNotification();" ]
[ "0.82587624", "0.7797233", "0.7618745", "0.7276864", "0.7146607", "0.7030893", "0.6986666", "0.68292075", "0.6755521", "0.66663086", "0.66021043", "0.65970546", "0.65871775", "0.6568887", "0.65620226", "0.6514049", "0.6483068", "0.64203966", "0.6403273", "0.6382361", "0.638079", "0.6374656", "0.6374117", "0.6373475", "0.63593423", "0.6341122", "0.63403386", "0.63330984", "0.6329703", "0.6326488" ]
0.8178247
1
Busqueda multicampo Busqueda multicampo
public function busquedaMulticampo($datos){ if (empty($datos->multicampo)) { $resultados =ConductoresRepo::select('conductores.*') ->orderBy('conductores.id','ASC') ->paginate(9); return $resultados; } $resultados =ConductoresRepo::select('conductores.*') ->orWhere('conductores.cedula','like','%'.$datos->multicampo.'%') ->orWhere('conductores.nombres','like','%'.$datos->multicampo.'%') ->orWhere('conductores.apellidos','like','%'.$datos->multicampo.'%') ->orWhere('conductores.telefono','like','%'.$datos->multicampo.'%') ->orderBy('conductores.id','ASC') ->paginate(9); return $resultados; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function busqueda()\n {\n // $consulta=$this->dbAdapter->query(\"select id , folio FROM usuarios where nombre = '\" . $dataUser['nombre'].\"' and correo = '\".$dataUser['correo']. \"'\" ,Adapter::QUERY_MODE_EXECUTE);\n $query = \"SELECT\n id,\n tagGrupal \n FROM\n simulacrogrupo\n \n \";\n $consulta = $this->dbAdapter->query($query, Adapter::QUERY_MODE_EXECUTE);\n \n $res = $consulta->toArray();\n \n return $res;\n }", "function mostrar_busqueda() {\n $atablas=array(\n 'venta_pago'=>'Venta Pago',\n 'cv_divisa'=>'C/V Divisa',\n 'reserva_pago'=>'Reserva Pago',\n 'comision'=>'Comision',\n 'venta'=>'Venta',\n 'con_traspaso'=>'Traspaso',\n 'con_compra'=>'Compra',\n 'reserva_anulacion'=>'Reserva Anulacion',\n 'venta_retencion'=>'Venta Retencion',\n 'extra_pago'=>'Pago Extra',\n 'venta_cambio_lote'=>'Venta Cambio Lote',\n 'venta_devolucion'=>'Venta Devolucion',\n 'reserva_devolucion'=>'Reserva Devolucion',\n 'pago_vendedores'=>'Pago Vendedores'\n\n );\n \n for ($i = 0; $i < $this->numero; $i++) {\n \n $objeto = $this->coneccion->get_objeto();\n $operaciones=array();\n if($objeto->cmp_tabla!='' ||$objeto->tco_descripcion=='Ajustes' ){\n $operaciones[]=\"MODIFICAR\";\n }\n if($objeto->cmp_tabla!='' ){\n $operaciones[]=\"ELIMINAR\";\n }\n echo '<tr>';\n echo \"<td>\";\n echo $objeto->cmp_id ;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->tco_descripcion ;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_usu_cre ;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_nro;\n echo \"</td>\";\n echo \"<td>\";\n $str_tabla=$atablas[$objeto->cmp_tabla]?$atablas[$objeto->cmp_tabla]:$objeto->cmp_tabla;\n echo $str_tabla;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_tabla_id;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_nro_documento;\n echo \"</td>\";\n echo \"<td>\";\n echo FUNCIONES::get_fecha_latina($objeto->cmp_fecha);\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->ges_descripcion;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->pdo_descripcion;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->mon_titulo;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_referido;\n echo \"</td>\";\n echo \"<td>\";\n echo $objeto->cmp_glosa;\n echo \"</td>\";\n echo \"<td>\";\n echo $this->get_opciones($objeto->cmp_id,\"\",$operaciones);\n echo \"</td>\";\n echo \"</tr>\";\n\n $this->coneccion->siguiente();\n }\n }", "protected function setFiltroBusqueda()\n {\n \tsfLoader::loadHelpers('Date');\n \t$parcial = '';\n \t$modulo = $this->getModuleName();\n\n\t\t$this->cajaBsq = $this->getRequestParameter('caja_busqueda');\n\t\t$this->categoriaBsq = $this->getRequestParameter('archivo_d_o[categoria_organismo_id]');\n\t\t$this->subcategoriaBsq = $this->getRequestParameter('archivo_d_o[subcategoria_organismo_id]');\n\t\t$this->organismoBsq = $this->getRequestParameter('archivo_d_o[organismo_id]');\n\t\t$this->documentacionBsq = $this->getRequestParameter('archivo_d_o[documentacion_organismo_id]');\n\t\t$this->desdeBsq = $this->getRequestParameter('desde_busqueda');\n\t\t$this->hastaBsq = $this->getRequestParameter('hasta_busqueda');\n\t\t\n\n\t\tif (!empty($this->cajaBsq)) {\n\t\t\t$parcial .= \" AND (ao.nombre LIKE '%$this->cajaBsq%')\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowcaja', $this->cajaBsq);\n\t\t}\n\t\tif (!empty($this->categoriaBsq)) {\n\t\t\t$parcial .= \" AND ao.categoria_organismo_id =\".$this->categoriaBsq ;\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowcategoria', $this->categoriaBsq);\n\t\t}\n\t\tif (!empty($this->subcategoriaBsq)) {\n\t\t\t$parcial .= \" AND ao.subcategoria_organismo_id =\".$this->subcategoriaBsq ;\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowsubcategoria', $this->subcategoriaBsq);\n\t\t}\n\t\tif (!empty($this->organismoBsq)) {\n\t\t\t$parcial .= \" AND ao.organismo_id =\".$this->organismoBsq ;\n\t\t\t$this->getUser()->setAttribute($modulo.'_noworganismos', $this->organismoBsq);\n\t\t}\n\t\tif (!empty($this->documentacionBsq)) {\n\t\t\t$parcial .= \" AND ao.documentacion_organismo_id =\".$this->documentacionBsq ;\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowdocumentacion', $this->documentacionBsq);\n\t\t}\n\t\tif (!empty($this->desdeBsq)) {\n\t\t\t$parcial .= \" AND ao.fecha >= '\".format_date($this->desdeBsq,'d').\"'\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowdesde', $this->desdeBsq);\n\t\t}\n\t\tif (!empty($this->hastaBsq)) {\n\t\t\t$parcial .= \" AND ao.fecha <= '\".format_date($this->hastaBsq,'d').\"'\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowhasta', $this->hastaBsq);\n\t\t}\n\n\n\t\tif (!empty($parcial)) {\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowfilter', $parcial);\n\t\t} else {\n\t\t\tif ($this->hasRequestParameter('btn_buscar')) {\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowfilter');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcaja');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdesde');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowhasta');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcategoria');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowsubcategoria');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_noworganismos');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdocumentacion');\n\t\t\t} else {\n\t\t\t\t$parcial = $this->getUser()->getAttribute($modulo.'_nowfilter');\n\t\t\t\t$this->cajaBsq = $this->getUser()->getAttribute($modulo.'_nowcaja');\n\t\t\t\t$this->desdeBsq = $this->getUser()->getAttribute($modulo.'_nowdesde');\n\t\t\t\t$this->hastaBsq = $this->getUser()->getAttribute($modulo.'_nowhasta');\n\t\t\t\t$this->hastaBsq = $this->getUser()->getAttribute($modulo.'_nowcategoria');\n\t\t\t\t$this->hastaBsq = $this->getUser()->getAttribute($modulo.'_nowsubcategoria');\n\t\t\t\t$this->hastaBsq = $this->getUser()->getAttribute($modulo.'_noworganismos');\n\t\t\t\t$this->hastaBsq = $this->getUser()->getAttribute($modulo.'_nowdocumentacion');\n\t\t\t}\n\t\t} \n\n\t\t\n\t\tif ($this->hasRequestParameter('btn_quitar')){\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowfilter');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcaja');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdesde');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowhasta');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcategoria');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowsubcategoria');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_noworganismos');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdocumentacion');\n\t\t\t$parcial=\"\";\n\t\t\t$this->cajaBsq = \"\";\n\t\t\t$this->categoriaBsq = '';\n\t\t\t$this->subcategoriaBsq = '';\n\t\t\t$this->organismoBsq = '';\n\t\t\t$this->documentacionBsq = '';\n\t\t\t$this->desdeBsq = '';\n\t\t\t$this->hastaBsq = '';\n\t\t}\n\t\t$organismos = Organismo::IdDeOrganismo($this->getUser()->getAttribute('userId'),1);\n $this->roles = UsuarioRol::getRepository()->getRolesByUser($this->getUser()->getAttribute('userId'),1);\n\t\tif(Common::array_in_array(array('1'=>'1', '2'=>'2', '6'=>'6'), $this->roles))\n\t\t{\n\t\t\treturn \"ao.deleted=0\".$parcial.\" AND (do.owner_id = \".$this->getUser()->getAttribute('userId').\" OR do.estado != 'guardado')\";\n\t\t}\n\t\telse\n\t\t{\n $responsables = ArchivoDO::getUSerREsponsables();\n return \"ao.deleted=0\".$parcial.\" AND ao.organismo_id IN \".$organismos.\" AND (do.owner_id = \".$this->getUser()->getAttribute('userId').\" OR do.estado != 'guardado') AND (ao.owner_id \".$responsables.\" OR do.confidencial != 1 OR ao.owner_id = \".$this->getUser()->getAttribute('userId').\")\";\n }\n\t\t \n\n }", "public function busquedaNatural($texto) {\n $txt = Funciones::gCodificar(Funciones::qQuitarCaracteres($texto));\n return $this->buscar(\"SELECT P.FECHA,P.CODPUN,P.PUNTO,P.TITULO,T.CODAPA,T.APARTADO,T.SUBTITULO,T.TEXTO,(MATCH(P.TITULO) AGAINST ('$txt' IN NATURAL LANGUAGE MODE) + MATCH(T.SUBTITULO,T.TEXTO) AGAINST ('$txt' IN NATURAL LANGUAGE MODE)) AS RELEVANCIA FROM ACTAS_PUNTOS P LEFT JOIN ACTAS_TEXTOS T ON P.FECHA=T.FECHA AND P.CODPUN=T.CODPUN WHERE MATCH(P.TITULO) AGAINST ('$txt' IN NATURAL LANGUAGE MODE) OR MATCH(T.SUBTITULO,T.TEXTO) AGAINST ('$txt' IN NATURAL LANGUAGE MODE) ORDER BY RELEVANCIA DESC\");\n }", "public function buscarGeneral($search = null) {\r\n\r\n if (! is_null($search)) {\r\n\r\n $busqueda = \"%\".$search.\"%\";\r\n\r\n $mascotas = Producto::orWhere('rubro', 'like', $busqueda)\r\n ->orWhere('SubRubro1', 'like', $busqueda)\r\n ->orWhere('SubRubro2', 'like', $busqueda)\r\n ->where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $marcas = Producto::Where('marca', 'like', $busqueda)\r\n ->where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $nombre = Producto::Where('nombre', 'like', $busqueda)\r\n ->where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $tags = Producto::select('tb_tag_producto.tag')\r\n ->join('tb_tag_producto', 'tb_productos.codeProdSys', '=', 'tb_tag_producto.codeProdSys')\r\n ->where('tb_productos.nombre', 'like', $busqueda)\r\n ->where('tb_productos.fk_idSatate', '=', 1)\r\n ->groupBy('tb_productos.Agrupacion')\r\n ->distinct()\r\n ->get();\r\n\r\n\r\n $mascotas = $this->getAgrupation($mascotas);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $marcas = $this->getAgrupation($marcas);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $nombre = $this->getAgrupation($nombre);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n //$tags = $this->getAgrupation($tags);// OBTEBNER LISTADO DE TAGS DE UN PRODUCTO //\r\n\r\n $array_tags = [];\r\n\r\n if (count($tags) > 0) {\r\n foreach ($tags as $tag) {\r\n $array_tags[] = $tag->tag;\r\n }\r\n }\r\n\r\n\r\n $response = [\r\n 'msj' => 'Productos',\r\n 'mascotas' => $mascotas,\r\n 'marcas' => $marcas,\r\n 'nombre' => $nombre,\r\n 'tags' => $array_tags,\r\n ];\r\n\r\n\r\n return response()->json($response, 200);\r\n\r\n } else {\r\n\r\n $mascotas = Producto::where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $marcas = Producto::where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $nombre = Producto::where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n $tags = Producto::select(DB::raw('tb_productos.*'))\r\n ->join('tb_tag_producto', 'tb_productos.codeProdSys', '=', 'tb_tag_producto.codeProdSys')\r\n ->where('fk_idSatate', '=', 1)\r\n ->groupBy('Agrupacion')\r\n ->get();\r\n\r\n\r\n $mascotas = $this->getAgrupation($mascotas);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $marcas = $this->getAgrupation($marcas);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $nombre = $this->getAgrupation($nombre);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n $tags = $this->getAgrupation($tags);// OBTEBNER LISTADO DE PRESENTACIONES DE UN PRODUCTO //\r\n\r\n\r\n $response = [\r\n 'msj' => 'Lista de producto',\r\n 'mascotas' => $mascotas,\r\n 'marcas' => $marcas,\r\n 'nombre' => $nombre,\r\n 'tags' => $tags,\r\n ];\r\n\r\n return response()->json($response, 404);\r\n }\r\n }", "public function busquedaAction ()\r\n {\r\n require_once 'Ubigeo.php';\r\n $mUbigeos = new Ubigeo(); \r\n $mCategoria = new Categoria();\r\n $arrCategoria['cat1'] = $mCategoria->getCategoriasActivas(1);\r\n \r\n $arrCategoria['cat2Json'] = Zend_Json::encode($mCategoria->getCategoriasActivas(2));\r\n $arrCategoria['cat3Json'] = Zend_Json::encode($mCategoria->getCategoriasActivas(3));\r\n \r\n $this->view->arrCategoria = $arrCategoria;\r\n $this->view->listCiudadesActivas = $mUbigeos->getListCiudadesActivas();\r\n }", "public function busqueda()\n\t{\n\t\t// should not be searched.\n \n\t\t$criteria=new CDbCriteria; \n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('created_on',$this->created_on,true);\n\t\t$criteria->compare('user_id',$this->user_id,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->order = \"created_on DESC\";\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function buscar(){\n\t\tif($_POST && !empty($_POST['pesquisa'])){\n\t\t\t$this->load->model('item');\n\t\t\t$dados = $this->prepara_dados($_POST['pesquisa']);\n\t\t\t$resultado = $this->db;\n\t\t\tforeach($dados as $d){\n\t\t\t\tif($d!=$dados[0]) $resultado->or_where('keywords LIKE','%'.$d.'%');\n\t\t\t\telse $resultado->where('keywords LIKE','%'.$d.'%');\n\t\t\t}\n\t\t\tif(isset($_POST['setor'])) $setor = $_POST['setor']; \n\t\t\tif(isset($setor)){\n\t\t\t\t$resultado->where('acervo_categoria_id',$this->setor($setor));\n\t\t\t\t$data['setor'] = $setor;\n\t\t\t}\n\t\t\t$data['pesquisa'] = $_POST['pesquisa'];\n\t\t\t$data['num_rows'] = $this->item->get(clone $resultado)->num_rows;\n\t\t\t$data['rows'] = $this->item->get($resultado)->result();\n\t\t\t$data['row_link'] = 'pagina/visualizar/';\n\t\t\t$data['page'] = \"pages/internal/pesquisa\";\n\t\t\t$this->load->view('template',$data);\n\t\t}\n\t\telse header(\"Location: home\");\n\t}", "public function buscar_cajetin($texto){\n // $texto --> texto que se va a buscar\n // Campos sobre los que se va a buscar : nombre\n $array_campos = array ('nombre');\n $sql = \"SELECT * FROM secciones WHERE \";\n for ($i = 0; $i < sizeof($array_campos); $i++){\n $sql.= \"$array_campos[$i] LIKE '%$texto%'\";\n if ((sizeof($array_campos)-1) != $i){$sql.=\" OR \";}\n }\n $sql.= \" ORDER BY nombre\";\n $resultado = $this -> db -> query($sql);\n return $resultado -> result_array(); // Obtener el array\n }", "function queryTexto($string) {\n\t\t// Devuelve el array de las cosas que no son ni barrios ni ciudades para el SQL\n\t\t// devuelve false si no hay nada\n\n $trozos = array();\n\n\t\t// Primero si hay ciudad o barrio\n\t\tif (strpos($string, \"ciudad:\") > 0) {\n\t\t\t// Si hay ciudad\n\t\t\t$trozostmp = explode(\"ciudad:\", $string);\n\t\t} elseif (strpos($string, \"barrio:\") > 0) {\n\t\t\t// Si hay barrio\n\t\t\t$trozostmp = explode(\"barrio:\", $string);\n\t\t} else {\n\t\t\t// Si solo hay texto\n\t\t\t$trozostmp = [$string];\n\t\t}\n\n if ($trozostmp[0]) {\n\t\t\t// Primero limpiamos el string\n\t\t\t$textoSinMierda = preg_replace(\"/(\\b(a|e|o|u)\\ )|(\\ben\\b)|(\\bun\\b)|(\\bde(\\b|l))|(\\bqu(|é|e)\\b)|(\\b(a|e)l\\b)|(\\bell(o|a)(\\b|s))|(\\bla(\\b|s))|(\\blo(\\b|s))|(\\bante\\b)|(\\bo\\b)|(\\by\\b)|(\\bes\\b)|(\\bsu\\b)|(\\,|\\.|\\;)/\", \"\", $trozostmp[0]);\n\t\t\t// Luego separamos las \"palabras\"\n $trozostmp2 = explode(\" \", $textoSinMierda);\n\t\t\t// Para cada una (que no este vacia por dobles espaciados o similar)\n foreach ($trozostmp2 as $cacho) {\n if ($cacho != \"\") {\n\t\t\t\t\t// La metemos en el array\n array_push($trozos, $cacho);\n }\n }\n\t\t\t// Devolvemos el array\n return $trozos;\n } else {\n\t\t\t// Por si algo ha pasado, devolvemos false\n return false;\n }\n }", "protected function setFiltroBusqueda()\n {\n \tsfLoader::loadHelpers('Date');\n\n \t$parcial = '';\n \t$modulo = $this->getModuleName();\n\n\t\t$this->cajaBsq = $this->getRequestParameter('caja_busqueda');\n\t\t$this->desdeBsq = $this->getRequestParameter('desde_busqueda');\n\t\t$this->hastaBsq = $this->getRequestParameter('hasta_busqueda');\n\t\t$this->ambitoBsq= $this->getRequestParameter('ambito_busqueda');\n\t\t\n\t\tif (!empty($this->cajaBsq)) {\n\t\t\t$parcial .= \" AND (titulo LIKE '%$this->cajaBsq%')\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowcaja', $this->cajaBsq);\n\t\t}\n\t\tif (!empty($this->desdeBsq)) {\n\t\t\t$parcial .= \" AND fecha >= '\".format_date($this->desdeBsq,'d').\"'\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowdesde', $this->desdeBsq);\n\t\t}\n\t\tif (!empty($this->hastaBsq)) {\n\t\t\t$parcial .= \" AND fecha <= '\".format_date($this->hastaBsq,'d').\"'\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowhasta', $this->hastaBsq);\n\t\t}\n\t\tif (!empty($this->ambitoBsq)) {\n\t\t\t$parcial .= \" AND ambito = '$this->ambitoBsq'\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowambito', $this->ambitoBsq);\n\t\t}\n\t\t//\n\t\tif (!empty($parcial)) {\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowfilter', $parcial);\n\t\t} else {\n\t\t\tif ($this->hasRequestParameter('btn_buscar')) {\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowfilter');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcaja');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdesde');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowhasta');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowambito');\n\t\t\t} else {\n\t\t\t\t$parcial = $this->getUser()->getAttribute($modulo.'_nowfilter');\n\t\t\t\t$this->cajaBsq = $this->getUser()->getAttribute($modulo.'_nowcaja');\n\t\t\t\t$this->desdeBsq = $this->getUser()->getAttribute($modulo.'_nowdesde');\n\t\t\t\t$this->hastaBsq = $this->getUser()->getAttribute($modulo.'_nowhasta');\n\t\t\t\t$this->ambitoBsq= $this->getUser()->getAttribute($modulo.'_nowambito');\n\t\t\t}\n\t\t}\n\t\tif ($this->hasRequestParameter('btn_quitar')){\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowfilter');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcaja');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdesde');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowhasta');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowambito');\n\t\t\t$parcial = \"\";\n\t\t\t$this->cajaBsq = '';\n\t\t\t$this->desdeBsq = '';\n\t\t\t$this->hastaBsq = '';\n\t\t\t$this->ambitoBsq= '';\n\t\t}\n\t\t$this->roles = UsuarioRol::getRepository()->getRolesByUser($this->getUser()->getAttribute('userId'),1);\n\t\t$finalFilter = 'deleted = 0'.$parcial;\n\n\t\tif (!Common::array_in_array(array('1'=>'1', '2'=>'2'), $this->roles)) {\n\t\t\t$finalFilter .= ' AND destacada = 1';\n\t\t}\n\t\treturn $finalFilter;\n }", "public function mencari_tf_query($data=array())\n{\n\tfor ($i=0; $i <count($data) ; $i++) { \n\t\tif ($i==0) {\n\t\t\t$term_query = array_unique($data[$i][1]);//menghilangkan data kembar dari data query form\n\t\t}\n\t}\n\t$j=0;\n\tforeach ($term_query as $value) {\n\t\t$query[$j] = $value;\n\t\t$j++;\n\t}\n\t//batas term\n\t//mencari tf\n\tfor ($m=0; $m <count($data) ; $m++) { \n\t\tfor ($n=0; $n <count($query) ; $n++) { \n\t\t// foreach ($term_query as $kunci => $isi) {\n\t\t\t\t$angka = (in_array($query[$n], $data[$m][1])) ? 1 : 0 ;\n\t\t\t\t$tf[$m][$n]=array(\"nilai_tf\"=>$angka);\n\t\t\t// }\n\t\t}\t\t\n\t}//batas mencari tf\n\treturn $tf;\n}", "public function search($mots = null ,$specialite = null ){\n $query = $this->createQueryBuilder('o');\n $query->where('o.active=1');\n if($mots != null){\n $query->andWhere('MATCH_AGAINST(o.titre,o.langage) AGAINST(:mots boolean)>0')\n ->setParameter('mots',$mots);\n }\n if($specialite != null){\n $query->leftJoin('o.specialite', 's');\n $query->andWhere('s.id = :id')\n ->setParameter('id', $specialite);\n }\n return $query->getQuery()->getResult();\n\n }", "public function apiTest(Request $request){\n // $ch = curl_init(\"http://dblp.org/search/publ/api?q=author%3A\".$name.\"%3A&format=json\");\n $ch = curl_init(\"http://dblp.org/search/publ/api?q=author%3A\".$request->name.\"%3A&format=json\");\n\n //IMPOSTA L'OPZIONE CURLOPT_RETURNTRANSFER A true IN MODO DA POTER CONSERVARE IL RISULTATO IN UNA VARIABILE\n //CON LA FUNZIONE curl_multi_getcontent();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n //ESEGUE LA RICHIESTA HTTP (GET DI DEFAULT) ATTRAVERSO LA RISORSA curl\n curl_exec($ch);\n\n $jsonResult= json_decode(curl_multi_getcontent($ch));\n\n if(!isset($jsonResult->result->hits->hit)){\n echo \"Vuoto\";\n return;\n }\n //ESTRAE IN MODO APPROPRIATO I DATI DI INTERESSE DALLA VARIABILE\n //Array che contiene i nomi dei campi da utilizzare come chiavi(tranne authors, trattato separatamente);\n $field = array(\"title\",//titolo della pubblicazione\n \"venue\",//rivista di pubblicazione\n \"volume\",//volume della rivista\n \"number\",//numero della rivista\n \"pages\",//pagine della rivista\n \"year\",//anno di pubblicazione\n \"type\",//tipo di pubblicazione\n \"key\",//The key can also be found as the \"key\" attribute of the record in the record's XML export.(dal faq di dblp)\n \"doi\",// id identificativo della pubblicazione (http://dblp.uni-trier.de/doi/)\n \"ee\",// Link alla risorsa (pdf o sito su cui comprare il pdf)\n \"url\");// Link alla pagina di dblp\n\n //Array (simil-DAO) in cui vengono salvate le informazioni di ogni hit\n $publication = array(\"title\"=>'', \"authors\" => array(), \"venue\"=>'',\"volume\"=>'',\"key\"=>'',\"number\"=>'', \"pages\"=>'', \"year\"=>'',\"type\"=>'',\n \"doi\"=>'',\"ee\"=>'',\"url\"=>'' );\n //CICLA SU TUTTE LE ISTANZE DI HIT CONTENUTE IN HITS (CONTENUTE IN RESULT)\n foreach ($jsonResult->result->hits->hit as $currentPub) {\n //PER OGNI CAMPO (descritto in $field)...\n foreach ($field as $curField) {\n //... SE IL CAMPO, PER QUELLA ISTANZA, NON è NULLO, ASSEGNA ALL'ARRAY DI SALVATAGGIO IL CORRISPONDENTE VALORE (no authors)\n if(isset($currentPub->info->$curField))$publication[$curField] = $currentPub->info->$curField;\n else $publication[$curField] = \"//\";\n }\n //TRATTAZIONE DELL'ARRAY DI AUTORI: SE E' UN ARRAY (più autori)...\n if(is_array($currentPub->info->authors->author)){\n foreach ($currentPub->info->authors->author as $author) {\n array_push($publication[\"authors\"],$author);//AVVALORA L'ARRAY DEGLI AUTORI\n }//...ALTRIMENTI, SE VI è UN SOLO AUTORE...\n }else array_push($publication[\"authors\"],$currentPub->info->authors->author);\n\n /*DEBUG*/\n // var_dump($publication);\n $publication[\"authors\"] = array();//DATO CHE USIAMO SEMPRE LA STESSA VARIABILE, PER PULIRE L'ARRAY DEGLI AUTORI\n echo '<br><br><br>';\n\n }\n //LIBERA LA RISORSA ALLOCATA\n curl_close($ch);\n }", "public function busquedaBooleana($texto) {\n $txt = Funciones::gCodificar($texto);\n return $this->buscar(\"SELECT P.FECHA,P.CODPUN,P.PUNTO,P.TITULO,T.CODAPA,T.APARTADO,T.SUBTITULO,T.TEXTO,(MATCH(P.TITULO) AGAINST ('$txt' IN BOOLEAN MODE) + MATCH(T.SUBTITULO,T.TEXTO) AGAINST ('$txt' IN BOOLEAN MODE)) AS RELEVANCIA FROM ACTAS_PUNTOS P LEFT JOIN ACTAS_TEXTOS T ON P.FECHA=T.FECHA AND P.CODPUN=T.CODPUN WHERE MATCH(P.TITULO) AGAINST ('$txt' IN BOOLEAN MODE) OR MATCH(T.SUBTITULO,T.TEXTO) AGAINST ('$txt' IN BOOLEAN MODE) ORDER BY RELEVANCIA DESC\");\n }", "public function tf_query($data=array(),$data_query= array())\n{\n\tfor ($i=0; $i <count($data) ; $i++) { \n\n\t\t// if ($i==0) { data\n\t\t\t$term_query[$i] = array_unique($data[$i][1]);//menghilangkan data kembar dari data query form // data dari database\n\t\t// }\n\t}\n\n\t$j=0;\n\tfor ($k=0; $k <count($term_query) ; $k++) { \n\t\tforeach ($term_query[$k] as $value) {\n\t\t\t$query[$j] = $value;\n\t\t\t$j++;\n\t\t}\n\t}\n\n\t$term_unik = array_unique($query);\n\n\t$b = 0;\n\tforeach ($term_unik as $value1) {\n\t\t$term_urut[$b]= $value1;\n\t\t$b++;\n\t}\n\t\n\t//batas term\n\n\t//mencari tf\n\tfor ($m=0; $m <count($data_query) ; $m++) { \n\t\tfor ($n=0; $n <count($term_urut) ; $n++) { \n\t\t// foreach ($term_query as $kunci => $isi) {\n\t\t\t\t$angka = (in_array($term_urut[$n], $data_query[$m][1])) ? 1 : 0 ;\n\t\t\t\t// $tf[$m][$n]=array(\"index_term\"=>$n,\"nilai_tf\"=>$angka);\n\t\t\t\t$tf[$m][$n]=array(\"nilai_tf\"=>$angka);\n\t\t\t// }\n\t\t}\t\t\n\t}//batas mencari tf\n\treturn $tf;\n}", "function buscar_comprobante_documento($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)/prosic_tipo_cambio.compra_sunat) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function buscar($busqueda) {\n return $this->buscarPersonas($busqueda);\n }", "public function run()\n {\n $commune = array(\n 0 => array(\n 'name' => 'Abengourou'\n ),\n 1 => array(\n 'name' => 'Abié'\n ),\n 2 => array(\n 'name' => 'Abigui'\n ),\n 3 => array(\n 'name' => 'Abobo'\n ),\n 4 => array(\n 'name' => 'Aboisso'\n ),\n 5 => array(\n 'name' => 'Aboisso-Comoé'\n ),\n 6 => array(\n 'name' => 'Abolikro'\n ),\n 7 => array(\n 'name' => 'Abongoua'\n ),\n 8 => array(\n 'name' => 'Abongoua'\n ),\n 9 => array(\n 'name' => 'Aboudé'\n ),\n 10 => array(\n 'name' => 'Abra'\n ),\n 11 => array(\n 'name' => 'Abradinou'\n ),\n 12 => array(\n 'name' => 'Abronamoué'\n ),\n 13 => array(\n 'name' => 'Aby (Aboisso)'\n ),\n 14 => array(\n 'name' => 'Aby-Adjouan-Mohoua'\n ),\n 15 => array(\n 'name' => 'Adaou'\n ),\n 16 => array(\n 'name' => 'Addah'\n ),\n 17 => array(\n 'name' => 'Adessé'\n ),\n 18 => array(\n 'name' => 'Adiaké'\n ),\n 19 => array(\n 'name' => 'Adjamé'\n ),\n 20 => array(\n 'name' => 'Adjaméné'\n ),\n 21 => array(\n 'name' => 'Adjouan'\n ),\n 22 => array(\n 'name' => 'Adouakouakro'\n ),\n 23 => array(\n 'name' => 'Adoukro'\n ),\n 24 => array(\n 'name' => 'Adzopé'\n ),\n 25 => array(\n 'name' => 'Affalikro'\n ),\n 26 => array(\n 'name' => 'Afféry'\n ),\n 27 => array(\n 'name' => 'Affiénou'\n ),\n 28 => array(\n 'name' => 'Afotobo'\n ),\n 29 => array(\n 'name' => 'Agbaou-Ahéoua'\n ),\n 30 => array(\n 'name' => 'Agboville'\n ),\n 31 => array(\n 'name' => 'Agnia'\n ),\n 32 => array(\n 'name' => 'Agnibilékrou'\n ),\n 33 => array(\n 'name' => 'Agou'\n ),\n 34 => array(\n 'name' => 'Ahigbé-Koffikro'\n ),\n 35 => array(\n 'name' => 'Ahouabo-Bouapé'\n ),\n 36 => array(\n 'name' => 'Ahouakro'\n ),\n 37 => array(\n 'name' => 'Ahouanou'\n ),\n 38 => array(\n 'name' => 'Ahougnanssou'\n ),\n 39 => array(\n 'name' => 'Ahougnassou-Alahou'\n ),\n 40 => array(\n 'name' => 'Akoboissué'\n ),\n 41 => array(\n 'name' => 'Akoi N\\'denou'\n ),\n 42 => array(\n 'name' => 'Akounougbé'\n ),\n 43 => array(\n 'name' => 'Akoupé'\n ),\n 44 => array(\n 'name' => 'Akoupé-Zeudji'\n ),\n 45 => array(\n 'name' => 'Akouré'\n ),\n 46 => array(\n 'name' => 'Akradio'\n ),\n 47 => array(\n 'name' => 'Akridou-Laddé'\n ),\n 48 => array(\n 'name' => 'Alépé'\n ),\n 49 => array(\n 'name' => 'Allangouassou'\n ),\n 50 => array(\n 'name' => 'Allosso 2'\n ),\n 51 => array(\n 'name' => 'Amanvi'\n ),\n 52 => array(\n 'name' => 'Amélékia'\n ),\n 53 => array(\n 'name' => 'Amian Kouassikro'\n ),\n 54 => array(\n 'name' => 'Amoriakro'\n ),\n 55 => array(\n 'name' => 'Ananda (Daoukro)'\n ),\n 56 => array(\n 'name' => 'Ananguié (Agboville)'\n ),\n 57 => array(\n 'name' => 'Ananguié (Adzopé)'\n ),\n 58 => array(\n 'name' => 'Ancien Prozi'\n ),\n 59 => array(\n 'name' => 'Andé'\n ),\n 60 => array(\n 'name' => 'Ando-Kékrénou'\n ),\n 61 => array(\n 'name' => 'Angoda'\n ),\n 62 => array(\n 'name' => 'Anianou'\n ),\n 63 => array(\n 'name' => 'Aniassué'\n ),\n 64 => array(\n 'name' => 'Annépé'\n ),\n 65 => array(\n 'name' => 'Anno (Agboville)'\n ),\n 66 => array(\n 'name' => 'Anoumaba'\n ),\n 67 => array(\n 'name' => 'Anyama'\n ),\n 68 => array(\n 'name' => 'Appimandoum'\n ),\n 69 => array(\n 'name' => 'Appoisso'\n ),\n 70 => array(\n 'name' => 'Appouasso'\n ),\n 71 => array(\n 'name' => 'Apprompron-Afêwa'\n ),\n 72 => array(\n 'name' => 'Apprompronou'\n ),\n 73 => array(\n 'name' => 'Arikokaha'\n ),\n 74 => array(\n 'name' => 'Arokpa'\n ),\n 75 => array(\n 'name' => 'Arrah'\n ),\n 76 => array(\n 'name' => 'Assahara'\n ),\n 77 => array(\n 'name' => 'Assalé-Kouassikro'\n ),\n 78 => array(\n 'name' => 'Assandrè'\n ),\n 79 => array(\n 'name' => 'Assié-Koumassi'\n ),\n 80 => array(\n 'name' => 'Assikoi'\n ),\n 81 => array(\n 'name' => 'Assinie-Mafia'\n ),\n 82 => array(\n 'name' => 'Assuéfry'\n ),\n 83 => array(\n 'name' => 'Attecoubé'\n ),\n 84 => array(\n 'name' => 'Attiégouakro'\n ),\n 85 => array(\n 'name' => 'Attiékoi'\n ),\n 86 => array(\n 'name' => 'Attiguéhi'\n ),\n 87 => array(\n 'name' => 'Attinguié'\n ),\n 88 => array(\n 'name' => 'Attobrou'\n ),\n 89 => array(\n 'name' => 'Attokro'\n ),\n 90 => array(\n 'name' => 'Attoutou A'\n ),\n 91 => array(\n 'name' => 'Ayamé'\n ),\n 92 => array(\n 'name' => 'Ayaou-Sran'\n ),\n 93 => array(\n 'name' => 'Ayénouan'\n ),\n 94 => array(\n 'name' => 'Azaguié'\n ),\n 95 => array(\n 'name' => 'B'\n ),\n 96 => array(\n 'name' => 'Babakro'\n ),\n 97 => array(\n 'name' => 'Bacanda'\n ),\n 98 => array(\n 'name' => 'Bacon'\n ),\n 99 => array(\n 'name' => 'Badikaha'\n ),\n 100 => array(\n 'name' => 'Bagohouo'\n ),\n 101 => array(\n 'name' => 'Bakandesso-Sogbeni'\n ),\n 102 => array(\n 'name' => 'Bakanou'\n ),\n 103 => array(\n 'name' => 'Bako'\n ),\n 104 => array(\n 'name' => 'Bakoubli'\n ),\n 105 => array(\n 'name' => 'Baléko'\n ),\n 106 => array(\n 'name' => 'Bambalouma'\n ),\n 107 => array(\n 'name' => 'Bamoro'\n ),\n 108 => array(\n 'name' => 'Bandakagni Tomora'\n ),\n 109 => array(\n 'name' => 'Bandakagni-Sokoura'\n ),\n 110 => array(\n 'name' => 'Bandiahi'\n ),\n 111 => array(\n 'name' => 'Bangolo'\n ),\n 112 => array(\n 'name' => 'Bangoua'\n ),\n 113 => array(\n 'name' => 'Banneu'\n ),\n 114 => array(\n 'name' => 'Bannonfla'\n ),\n 115 => array(\n 'name' => 'Bassawa'\n ),\n 116 => array(\n 'name' => 'Baya (Kouto)'\n ),\n 117 => array(\n 'name' => 'Bayota'\n ),\n 118 => array(\n 'name' => 'Bazra-Nattis'\n ),\n 119 => array(\n 'name' => 'Bazré'\n ),\n 120 => array(\n 'name' => 'Bécédi Brignan'\n ),\n 121 => array(\n 'name' => 'Bécouéfin'\n ),\n 122 => array(\n 'name' => 'Bédiala'\n ),\n 123 => array(\n 'name' => 'Bédy-Goazon'\n ),\n 124 => array(\n 'name' => 'Bégbessou'\n ),\n 125 => array(\n 'name' => 'Belleville, (département de Zoukougbeu)'\n ),\n 126 => array(\n 'name' => 'Bengassou'\n ),\n 127 => array(\n 'name' => 'Béoué-Zibiao'\n ),\n 128 => array(\n 'name' => 'Béoumi'\n ),\n 129 => array(\n 'name' => 'Béréni Dialla'\n ),\n 130 => array(\n 'name' => 'Bériaboukro'\n ),\n 131 => array(\n 'name' => 'Bettié'\n ),\n 132 => array(\n 'name' => 'Biakalé'\n ),\n 133 => array(\n 'name' => 'Biankouma'\n ),\n 134 => array(\n 'name' => 'Bianouan'\n ),\n 135 => array(\n 'name' => 'Biasso'\n ),\n 136 => array(\n 'name' => 'Biéby'\n ),\n 137 => array(\n 'name' => 'Bilimono'\n ),\n 138 => array(\n 'name' => 'Bin-Houyé'\n ),\n 139 => array(\n 'name' => 'Binao-Boussoué'\n ),\n 140 => array(\n 'name' => 'Bingerville'\n ),\n 141 => array(\n 'name' => 'Binzra'\n ),\n 142 => array(\n 'name' => 'Bla'\n ),\n 143 => array(\n 'name' => 'Blanfla'\n ),\n 144 => array(\n 'name' => 'Blapleu'\n ),\n 145 => array(\n 'name' => 'Bléniméouin'\n ),\n 146 => array(\n 'name' => 'Blességué'\n ),\n 147 => array(\n 'name' => 'Bloléquin'\n ),\n 148 => array(\n 'name' => 'Blotilé'\n ),\n 149 => array(\n 'name' => 'Boahia'\n ),\n 150 => array(\n 'name' => 'Bobi'\n ),\n 151 => array(\n 'name' => 'Bobo-Tiénigbé'\n ),\n 152 => array(\n 'name' => 'Bocanda'\n ),\n 153 => array(\n 'name' => 'Bodo (Didiévi)'\n ),\n 154 => array(\n 'name' => 'Bodo (Tiassalé)'\n ),\n 155 => array(\n 'name' => 'Bodokro'\n ),\n 156 => array(\n 'name' => 'Bogofa'\n ),\n 157 => array(\n 'name' => 'Bogouiné'\n ),\n 158 => array(\n 'name' => 'Boguédia'\n ),\n 159 => array(\n 'name' => 'Bohobli'\n ),\n 160 => array(\n 'name' => 'Bokala-Niampondougou'\n ),\n 161 => array(\n 'name' => 'Boli'\n ),\n 162 => array(\n 'name' => 'Bolona'\n ),\n 163 => array(\n 'name' => 'Bonahouin'\n ),\n 164 => array(\n 'name' => 'Bondo'\n ),\n 165 => array(\n 'name' => 'Bondoukou'\n ),\n 166 => array(\n 'name' => 'Bongo (Grand-Bassam)'\n ),\n 167 => array(\n 'name' => 'Bongouanou'\n ),\n 168 => array(\n 'name' => 'Bonguéra'\n ),\n 169 => array(\n 'name' => 'Boniérédougou'\n ),\n 170 => array(\n 'name' => 'Bonikro'\n ),\n 171 => array(\n 'name' => 'Bonon'\n ),\n 172 => array(\n 'name' => 'Bonoua'\n ),\n 173 => array(\n 'name' => 'Bonoufla'\n ),\n 174 => array(\n 'name' => 'Booko'\n ),\n 175 => array(\n 'name' => 'Boron (Korhogo)'\n ),\n 176 => array(\n 'name' => 'Borotou'\n ),\n 177 => array(\n 'name' => 'Borotou-Koro'\n ),\n 178 => array(\n 'name' => 'Botindé'\n ),\n 179 => array(\n 'name' => 'Botro'\n ),\n 180 => array(\n 'name' => 'Bouadikro'\n ),\n 181 => array(\n 'name' => 'Bouaflé'\n ),\n 182 => array(\n 'name' => 'Bouandougou'\n ),\n 183 => array(\n 'name' => 'Bouboury'\n ),\n 184 => array(\n 'name' => 'Boudépé'\n ),\n 185 => array(\n 'name' => 'Bougou'\n ),\n 186 => array(\n 'name' => 'Bougousso'\n ),\n 187 => array(\n 'name' => 'Bouko'\n ),\n 188 => array(\n 'name' => 'Bouna'\n ),\n 189 => array(\n 'name' => 'Boundiali'\n ),\n 190 => array(\n 'name' => 'Boyaokro'\n ),\n 191 => array(\n 'name' => 'Bozi'\n ),\n 192 => array(\n 'name' => 'Bricolo'\n ),\n 193 => array(\n 'name' => 'Brihiri'\n ),\n 194 => array(\n 'name' => 'Brima'\n ),\n 195 => array(\n 'name' => 'Brobo'\n ),\n 196 => array(\n 'name' => 'Brofodoumé'\n ),\n 197 => array(\n 'name' => 'Broma'\n ),\n 198 => array(\n 'name' => 'Brou Ahoussoukro'\n ),\n 199 => array(\n 'name' => 'Brou Akpaoussou'\n ),\n 200 => array(\n 'name' => 'Broubrou'\n ),\n 201 => array(\n 'name' => 'Broudoukou-Penda'\n ),\n 202 => array(\n 'name' => 'Buyo (Côte d\\'Ivoire)'\n ),\n 203 => array(\n 'name' => 'C'\n ),\n 204 => array(\n 'name' => 'Céchi'\n ),\n 205 => array(\n 'name' => 'Chiépo'\n ),\n 206 => array(\n 'name' => 'Cocody'\n ),\n 207 => array(\n 'name' => 'Cosrou'\n ),\n 208 => array(\n 'name' => 'D'\n ),\n 209 => array(\n 'name' => 'Dabadougou-Mafélé'\n ),\n 210 => array(\n 'name' => 'Dabakala'\n ),\n 211 => array(\n 'name' => 'Dabou'\n ),\n 212 => array(\n 'name' => 'Dabouyo'\n ),\n 213 => array(\n 'name' => 'Dadiassé'\n ),\n 214 => array(\n 'name' => 'Dagba'\n ),\n 215 => array(\n 'name' => 'Dah-Zagna'\n ),\n 216 => array(\n 'name' => 'Dahiépa-Kéhi'\n ),\n 217 => array(\n 'name' => 'Dahiri'\n ),\n 218 => array(\n 'name' => 'Dairo-Didizo'\n ),\n 219 => array(\n 'name' => 'Dakouritrohoin'\n ),\n 220 => array(\n 'name' => 'Dakpadou'\n ),\n 221 => array(\n 'name' => 'Daleu'\n ),\n 222 => array(\n 'name' => 'Damé'\n ),\n 223 => array(\n 'name' => 'Danané'\n ),\n 224 => array(\n 'name' => 'Dananon'\n ),\n 225 => array(\n 'name' => 'Dandougou'\n ),\n 226 => array(\n 'name' => 'Danguira'\n ),\n 227 => array(\n 'name' => 'Dania'\n ),\n 228 => array(\n 'name' => 'Danoa'\n ),\n 229 => array(\n 'name' => 'Dantogo'\n ),\n 230 => array(\n 'name' => 'Daoukro'\n ),\n 231 => array(\n 'name' => 'Dapéoua'\n ),\n 232 => array(\n 'name' => 'Dapo-Iboké'\n ),\n 233 => array(\n 'name' => 'Dassioko'\n ),\n 234 => array(\n 'name' => 'Dassoungboho'\n ),\n 235 => array(\n 'name' => 'Débété'\n ),\n 236 => array(\n 'name' => 'Dèdègbeu'\n ),\n 237 => array(\n 'name' => 'Détroya'\n ),\n 238 => array(\n 'name' => 'Diabo'\n ),\n 239 => array(\n 'name' => 'Diahouin'\n ),\n 240 => array(\n 'name' => 'Dialakoro'\n ),\n 241 => array(\n 'name' => 'Diamakani'\n ),\n 242 => array(\n 'name' => 'Diamarakro'\n ),\n 243 => array(\n 'name' => 'Diamba'\n ),\n 244 => array(\n 'name' => 'Diangobo (Abengourou)'\n ),\n 245 => array(\n 'name' => 'Diangobo (Yakassé-Attobrou)'\n ),\n 246 => array(\n 'name' => 'Diangokro'\n ),\n 247 => array(\n 'name' => 'Dianra'\n ),\n 248 => array(\n 'name' => 'Dianra-Village'\n ),\n 249 => array(\n 'name' => 'Diarabana'\n ),\n 250 => array(\n 'name' => 'Diasson'\n ),\n 251 => array(\n 'name' => 'Diawala'\n ),\n 252 => array(\n 'name' => 'Dibobly'\n ),\n 253 => array(\n 'name' => 'Diboké'\n ),\n 254 => array(\n 'name' => 'Dibri-Assirikro'\n ),\n 255 => array(\n 'name' => 'Didiévi'\n ),\n 256 => array(\n 'name' => 'Didoko'\n ),\n 257 => array(\n 'name' => 'Diégonéfla'\n ),\n 258 => array(\n 'name' => 'Diéméressédougou'\n ),\n 259 => array(\n 'name' => 'Diéouzon'\n ),\n 260 => array(\n 'name' => 'Diéviéssou'\n ),\n 261 => array(\n 'name' => 'Digbapia'\n ),\n 262 => array(\n 'name' => 'Dignago'\n ),\n 263 => array(\n 'name' => 'Dikodougou'\n ),\n 264 => array(\n 'name' => 'Dimandougou'\n ),\n 265 => array(\n 'name' => 'Dimbokro'\n ),\n 266 => array(\n 'name' => 'Dinaoudi'\n ),\n 267 => array(\n 'name' => 'Dingbi'\n ),\n 268 => array(\n 'name' => 'Dioman'\n ),\n 269 => array(\n 'name' => 'Dioulatièdougou'\n ),\n 270 => array(\n 'name' => 'Diourouzon'\n ),\n 271 => array(\n 'name' => 'Divo'\n ),\n 272 => array(\n 'name' => 'Djamadjoké'\n ),\n 273 => array(\n 'name' => 'Djapadji'\n ),\n 274 => array(\n 'name' => 'Djébonouan'\n ),\n 275 => array(\n 'name' => 'Djékanou'\n ),\n 276 => array(\n 'name' => 'Djibrosso'\n ),\n 277 => array(\n 'name' => 'Djidji'\n ),\n 278 => array(\n 'name' => 'Djoro-Djoro'\n ),\n 279 => array(\n 'name' => 'Djouroutou'\n ),\n 280 => array(\n 'name' => 'Doba (Côte d\\'Ivoire)'\n ),\n 281 => array(\n 'name' => 'Dobré'\n ),\n 282 => array(\n 'name' => 'Dogbo'\n ),\n 283 => array(\n 'name' => 'Doh (Touba)'\n ),\n 284 => array(\n 'name' => 'Doké'\n ),\n 285 => array(\n 'name' => 'Domangbeu'\n ),\n 286 => array(\n 'name' => 'Doropo'\n ),\n 287 => array(\n 'name' => 'Douèlé'\n ),\n 288 => array(\n 'name' => 'Dougroupalégnoa'\n ),\n 289 => array(\n 'name' => 'Doukouya'\n ),\n 290 => array(\n 'name' => 'Doukouyo'\n ),\n 291 => array(\n 'name' => 'Dousséba'\n ),\n 292 => array(\n 'name' => 'Dribouo'\n ),\n 293 => array(\n 'name' => 'Dualla'\n ),\n 294 => array(\n 'name' => 'Duékoué'\n ),\n 295 => array(\n 'name' => 'Duffrébo'\n ),\n 296 => array(\n 'name' => 'Duonfla'\n ),\n 297 => array(\n 'name' => 'Dzeudji'\n ),\n 298 => array(\n 'name' => 'E'\n ),\n 299 => array(\n 'name' => 'Ebikro-N’dakro'\n ),\n 300 => array(\n 'name' => 'Ebilassokro'\n ),\n 301 => array(\n 'name' => 'Ebonou'\n ),\n 302 => array(\n 'name' => 'Eboué (Aboisso)'\n ),\n 303 => array(\n 'name' => 'Ehuasso'\n ),\n 304 => array(\n 'name' => 'Ellibou-Badasso'\n ),\n 305 => array(\n 'name' => 'Eloka'\n ),\n 306 => array(\n 'name' => 'Ettrokro'\n ),\n 307 => array(\n 'name' => 'Etuéboué'\n ),\n 308 => array(\n 'name' => 'Etuessika'\n ),\n 309 => array(\n 'name' => 'F'\n ),\n 310 => array(\n 'name' => 'Facobly'\n ),\n 311 => array(\n 'name' => 'Fadiadougou'\n ),\n 312 => array(\n 'name' => 'Famienkro'\n ),\n 313 => array(\n 'name' => 'Fapaha-M’binguébougou'\n ),\n 314 => array(\n 'name' => 'Faraba (Mankono)'\n ),\n 315 => array(\n 'name' => 'Fengolo'\n ),\n 316 => array(\n 'name' => 'Férémandougou'\n ),\n 317 => array(\n 'name' => 'Férentéla'\n ),\n 318 => array(\n 'name' => 'Ferkessédougou'\n ),\n 319 => array(\n 'name' => 'Finessiguédougou'\n ),\n 320 => array(\n 'name' => 'Fizanlouma'\n ),\n 321 => array(\n 'name' => 'Flakièdougou'\n ),\n 322 => array(\n 'name' => 'Foto-Kouamékro'\n ),\n 323 => array(\n 'name' => 'Foumbolo'\n ),\n 324 => array(\n 'name' => 'Foungbesso'\n ),\n 325 => array(\n 'name' => 'Frambo'\n ),\n 326 => array(\n 'name' => 'Fresco'\n ),\n 327 => array(\n 'name' => 'Fronan'\n ),\n 328 => array(\n 'name' => 'G'\n ),\n 329 => array(\n 'name' => 'Gabia (Issia)'\n ),\n 330 => array(\n 'name' => 'Gabia (Oumé)'\n ),\n 331 => array(\n 'name' => 'Gabiadji'\n ),\n 332 => array(\n 'name' => 'Gadago'\n ),\n 333 => array(\n 'name' => 'Gagnoa'\n ),\n 334 => array(\n 'name' => 'Gagny (Côte d\\'Ivoire)'\n ),\n 335 => array(\n 'name' => 'Galébou'\n ),\n 336 => array(\n 'name' => 'Ganaoni'\n ),\n 337 => array(\n 'name' => 'Ganhoué'\n ),\n 338 => array(\n 'name' => 'Ganleu'\n ),\n 339 => array(\n 'name' => 'Gaoté'\n ),\n 340 => array(\n 'name' => 'Gbablasso'\n ),\n 341 => array(\n 'name' => 'Gbadjié'\n ),\n 342 => array(\n 'name' => 'Gbagbam'\n ),\n 343 => array(\n 'name' => 'Gbamélédougo'\n ),\n 344 => array(\n 'name' => 'Gbangbégouiné'\n ),\n 345 => array(\n 'name' => 'Gbangbégouiné-Yati'\n ),\n 346 => array(\n 'name' => 'Gbapleu'\n ),\n 347 => array(\n 'name' => 'Gbatongouin'\n ),\n 348 => array(\n 'name' => 'Gbazoa'\n ),\n 349 => array(\n 'name' => 'Gbèkèkro'\n ),\n 350 => array(\n 'name' => 'Gbéléban'\n ),\n 351 => array(\n 'name' => 'Gbétogo'\n ),\n 352 => array(\n 'name' => 'Gbliglo'\n ),\n 353 => array(\n 'name' => 'Gbofesso-Sama'\n ),\n 354 => array(\n 'name' => 'Gbogolo'\n ),\n 355 => array(\n 'name' => 'Gboguhé'\n ),\n 356 => array(\n 'name' => 'Gbon'\n ),\n 357 => array(\n 'name' => 'Gbon-Houyé'\n ),\n 358 => array(\n 'name' => 'Gbongaha'\n ),\n 359 => array(\n 'name' => 'Gbonné'\n ),\n 360 => array(\n 'name' => 'Glangleu'\n ),\n 361 => array(\n 'name' => 'Gligbeuadji'\n ),\n 362 => array(\n 'name' => 'Gloplou'\n ),\n 363 => array(\n 'name' => 'Gnagbodougnoa'\n ),\n 364 => array(\n 'name' => 'Gnagboya'\n ),\n 365 => array(\n 'name' => 'Gnago'\n ),\n 366 => array(\n 'name' => 'Gnakouboué'\n ),\n 367 => array(\n 'name' => 'Gnamanou'\n ),\n 368 => array(\n 'name' => 'Gnato'\n ),\n 369 => array(\n 'name' => 'Gnégrouboué'\n ),\n 370 => array(\n 'name' => 'Gnogboyo'\n ),\n 371 => array(\n 'name' => 'Godélilié 1'\n ),\n 372 => array(\n 'name' => 'Gogné'\n ),\n 373 => array(\n 'name' => 'Gogo'\n ),\n 374 => array(\n 'name' => 'Gogoguhé'\n ),\n 375 => array(\n 'name' => 'Gohitafla'\n ),\n 376 => array(\n 'name' => 'Gohouo-Zagna'\n ),\n 377 => array(\n 'name' => 'Gomon'\n ),\n 378 => array(\n 'name' => 'Gonaté'\n ),\n 379 => array(\n 'name' => 'Gopoupleu'\n ),\n 380 => array(\n 'name' => 'Gotongouiné 1'\n ),\n 381 => array(\n 'name' => 'Gouané'\n ),\n 382 => array(\n 'name' => 'Goudi'\n ),\n 383 => array(\n 'name' => 'Goudouko'\n ),\n 384 => array(\n 'name' => 'Gouékan'\n ),\n 385 => array(\n 'name' => 'Gouenzou'\n ),\n 386 => array(\n 'name' => 'Gouiné'\n ),\n 387 => array(\n 'name' => 'Goulaleu'\n ),\n 388 => array(\n 'name' => 'Goulia'\n ),\n 389 => array(\n 'name' => 'Gouméré'\n ),\n 390 => array(\n 'name' => 'Gouotro'\n ),\n 391 => array(\n 'name' => 'Gourané'\n ),\n 392 => array(\n 'name' => 'Gra'\n ),\n 393 => array(\n 'name' => 'Grabo'\n ),\n 394 => array(\n 'name' => 'Gragba-Dagolilié'\n ),\n 395 => array(\n 'name' => 'Grand Alépé'\n ),\n 396 => array(\n 'name' => 'Grand-Bassam'\n ),\n 397 => array(\n 'name' => 'Grand-Béréby'\n ),\n 398 => array(\n 'name' => 'Grand-Lahou'\n ),\n 399 => array(\n 'name' => 'Grand-Morié'\n ),\n 400 => array(\n 'name' => 'Grand-Pin'\n ),\n 401 => array(\n 'name' => 'Grand-Yapo'\n ),\n 402 => array(\n 'name' => 'Grand-Zattry'\n ),\n 403 => array(\n 'name' => 'Grand-Akoudzin'\n ),\n 404 => array(\n 'name' => 'Grégbeu'\n ),\n 405 => array(\n 'name' => 'Grihiri'\n ),\n 406 => array(\n 'name' => 'Grobiakoko'\n ),\n 407 => array(\n 'name' => 'Grobonou-Dan'\n ),\n 408 => array(\n 'name' => 'Guéhiébly'\n ),\n 409 => array(\n 'name' => 'Guékpé'\n ),\n 410 => array(\n 'name' => 'Guénimanzo'\n ),\n 411 => array(\n 'name' => 'Guépahouo'\n ),\n 412 => array(\n 'name' => 'Guessabo'\n ),\n 413 => array(\n 'name' => 'Guessiguié'\n ),\n 414 => array(\n 'name' => 'Guéyo'\n ),\n 415 => array(\n 'name' => 'Guézon (Duékoué)'\n ),\n 416 => array(\n 'name' => 'Guézon (Kouibly)'\n ),\n 417 => array(\n 'name' => 'Guézon-Tahouaké'\n ),\n 418 => array(\n 'name' => 'Guiamapleu'\n ),\n 419 => array(\n 'name' => 'Guibéroua'\n ),\n 420 => array(\n 'name' => 'Guiembé'\n ),\n 421 => array(\n 'name' => 'Guiendé'\n ),\n 422 => array(\n 'name' => 'Guiglo'\n ),\n 423 => array(\n 'name' => 'Guiméyo'\n ),\n 424 => array(\n 'name' => 'Guinglo-Gbéan'\n ),\n 425 => array(\n 'name' => 'Guinglo-Tahouaké'\n ),\n 426 => array(\n 'name' => 'Guintéguéla'\n ),\n 427 => array(\n 'name' => 'Guitry'\n ),\n 428 => array(\n 'name' => 'H'\n ),\n 429 => array(\n 'name' => 'Hérébo'\n ),\n 430 => array(\n 'name' => 'Hermankono-Diès'\n ),\n 431 => array(\n 'name' => 'Hermankono-Garo'\n ),\n 432 => array(\n 'name' => 'Hiré'\n ),\n 433 => array(\n 'name' => 'Huafla'\n ),\n 434 => array(\n 'name' => 'I'\n ),\n 435 => array(\n 'name' => 'Iboguhé'\n ),\n 436 => array(\n 'name' => 'Iboké'\n ),\n 437 => array(\n 'name' => 'Idibouo-Zépréguhé (Daloa Est)'\n ),\n 438 => array(\n 'name' => 'Ipouagui'\n ),\n 439 => array(\n 'name' => 'Iriéfla'\n ),\n 440 => array(\n 'name' => 'Irobo'\n ),\n 441 => array(\n 'name' => 'Iroporia'\n ),\n 442 => array(\n 'name' => 'Issia'\n ),\n 443 => array(\n 'name' => 'J'\n ),\n 444 => array(\n 'name' => 'Jacqueville'\n ),\n 445 => array(\n 'name' => 'K'\n ),\n 446 => array(\n 'name' => 'Kaadé'\n ),\n 447 => array(\n 'name' => 'Kadéko'\n ),\n 448 => array(\n 'name' => 'Kadioha'\n ),\n 449 => array(\n 'name' => 'Kafoudougou-Bambarasso'\n ),\n 450 => array(\n 'name' => 'Kagbolodougou'\n ),\n 451 => array(\n 'name' => 'Kahin-Zarabaon'\n ),\n 452 => array(\n 'name' => 'Kakpi'\n ),\n 453 => array(\n 'name' => 'Kalaha'\n ),\n 454 => array(\n 'name' => 'Kalamon'\n ),\n 455 => array(\n 'name' => 'Kaloa'\n ),\n 456 => array(\n 'name' => 'Kamala'\n ),\n 457 => array(\n 'name' => 'Kamalo'\n ),\n 458 => array(\n 'name' => 'Kamoro'\n ),\n 459 => array(\n 'name' => 'Kanagonon'\n ),\n 460 => array(\n 'name' => 'Kanakono'\n ),\n 461 => array(\n 'name' => 'Kanawolo'\n ),\n 462 => array(\n 'name' => 'Kani'\n ),\n 463 => array(\n 'name' => 'Kaniasso'\n ),\n 464 => array(\n 'name' => 'Kanoroba'\n ),\n 465 => array(\n 'name' => 'Kanzra'\n ),\n 466 => array(\n 'name' => 'Kaouara'\n ),\n 467 => array(\n 'name' => 'Karakoro'\n ),\n 468 => array(\n 'name' => 'Kasséré'\n ),\n 469 => array(\n 'name' => 'Katchiré-Essékro'\n ),\n 470 => array(\n 'name' => 'Katiali'\n ),\n 471 => array(\n 'name' => 'Katimassou'\n ),\n 472 => array(\n 'name' => 'Katiola'\n ),\n 473 => array(\n 'name' => 'Kato (Séguéla)'\n ),\n 474 => array(\n 'name' => 'Katogo'\n ),\n 475 => array(\n 'name' => 'Kawolo-Sobara'\n ),\n 476 => array(\n 'name' => 'Ké-Bouébo'\n ),\n 477 => array(\n 'name' => 'Kébi'\n ),\n 478 => array(\n 'name' => 'Kéibla'\n ),\n 479 => array(\n 'name' => 'Kéibly'\n ),\n 480 => array(\n 'name' => 'Kétesso'\n ),\n 481 => array(\n 'name' => 'Kétro-Bassam'\n ),\n 482 => array(\n 'name' => 'Kibouo'\n ),\n 483 => array(\n 'name' => 'Kiélé'\n ),\n 484 => array(\n 'name' => 'Kiémou'\n ),\n 485 => array(\n 'name' => 'Kimbirila Nord'\n ),\n 486 => array(\n 'name' => 'Kimbirila Sud'\n ),\n 487 => array(\n 'name' => 'Klan'\n ),\n 488 => array(\n 'name' => 'Kodiossou'\n ),\n 489 => array(\n 'name' => 'Koffi-Amonkro'\n ),\n 490 => array(\n 'name' => 'Koffikro-Afféma'\n ),\n 491 => array(\n 'name' => 'Koko (Bouaké)'\n ),\n 492 => array(\n 'name' => 'Koko (Korhogo)'\n ),\n 493 => array(\n 'name' => 'Kokolopozo'\n ),\n 494 => array(\n 'name' => 'Kokomian'\n ),\n 495 => array(\n 'name' => 'Kokoumba'\n ),\n 496 => array(\n 'name' => 'Kokoun'\n ),\n 497 => array(\n 'name' => 'Kokumbo'\n ),\n 498 => array(\n 'name' => 'Kolia'\n ),\n 499 => array(\n 'name' => 'Kombolokoura'\n ),\n 500 => array(\n 'name' => 'Komborodougou'\n ),\n 501 => array(\n 'name' => 'Konan Kokorékro'\n ),\n 502 => array(\n 'name' => 'Konan-N’drikro'\n ),\n 503 => array(\n 'name' => 'Konandikro'\n ),\n 504 => array(\n 'name' => 'Kondiébouma'\n ),\n 505 => array(\n 'name' => 'Kondokro-Djassanou'\n ),\n 506 => array(\n 'name' => 'Kondossou'\n ),\n 507 => array(\n 'name' => 'Kondrobo'\n ),\n 508 => array(\n 'name' => 'Kong'\n ),\n 509 => array(\n 'name' => 'Kongasso'\n ),\n 510 => array(\n 'name' => 'Kongoti'\n ),\n 511 => array(\n 'name' => 'Koni'\n ),\n 512 => array(\n 'name' => 'Kononfla'\n ),\n 513 => array(\n 'name' => 'Koonan'\n ),\n 514 => array(\n 'name' => 'Koréahinou'\n ),\n 515 => array(\n 'name' => 'Koro (Côte d\\'Ivoire)'\n ),\n 516 => array(\n 'name' => 'Korokaha'\n ),\n 517 => array(\n 'name' => 'Korokopla'\n ),\n 518 => array(\n 'name' => 'Koroumba'\n ),\n 519 => array(\n 'name' => 'Kossandji'\n ),\n 520 => array(\n 'name' => 'Kosséhoa'\n ),\n 521 => array(\n 'name' => 'Kossihouen'\n ),\n 522 => array(\n 'name' => 'Kossou'\n ),\n 523 => array(\n 'name' => 'Kotobi'\n ),\n 524 => array(\n 'name' => 'Kotogwanda'\n ),\n 525 => array(\n 'name' => 'Kotronou'\n ),\n 526 => array(\n 'name' => 'Koua'\n ),\n 527 => array(\n 'name' => 'Kouadioblékro'\n ),\n 528 => array(\n 'name' => 'Kouadiokro'\n ),\n 529 => array(\n 'name' => 'Kouafo-Akidom'\n ),\n 530 => array(\n 'name' => 'Kouakro'\n ),\n 531 => array(\n 'name' => 'Kouaméfla'\n ),\n 532 => array(\n 'name' => 'Kouan-Houlé'\n ),\n 533 => array(\n 'name' => 'Kouassi-Datèkro'\n ),\n 534 => array(\n 'name' => 'Kouassi Kouassikro'\n ),\n 535 => array(\n 'name' => 'Kouassi-N’Dawa'\n ),\n 536 => array(\n 'name' => 'Kouassia-Nanguni'\n ),\n 537 => array(\n 'name' => 'Kouatta'\n ),\n 538 => array(\n 'name' => 'Koudougou'\n ),\n 539 => array(\n 'name' => 'Kouétinfla'\n ),\n 540 => array(\n 'name' => 'Kouibly'\n ),\n 541 => array(\n 'name' => 'Koulalé'\n ),\n 542 => array(\n 'name' => 'Koulikoro (Biankouma)'\n ),\n 543 => array(\n 'name' => 'Koumassi'\n ),\n 544 => array(\n 'name' => 'Koumbala'\n ),\n 545 => array(\n 'name' => 'Koun-Fao'\n ),\n 546 => array(\n 'name' => 'Kounahiri'\n ),\n 547 => array(\n 'name' => 'Kounzié'\n ),\n 548 => array(\n 'name' => 'Kouto'\n ),\n 549 => array(\n 'name' => 'Koutouba'\n ),\n 550 => array(\n 'name' => 'Koutoukro 1 bord'\n ),\n 551 => array(\n 'name' => 'koutoukro 2'\n ),\n 552 => array(\n 'name' => 'Koyékro'\n ),\n 553 => array(\n 'name' => 'Koziayo 1'\n ),\n 554 => array(\n 'name' => 'Kpada'\n ),\n 555 => array(\n 'name' => 'Kpana-Kalo'\n ),\n 556 => array(\n 'name' => 'Kpanan'\n ),\n 557 => array(\n 'name' => 'Kpanpleu-Sin-Houyé'\n ),\n 558 => array(\n 'name' => 'Kpapékou'\n ),\n 559 => array(\n 'name' => 'Kpata'\n ),\n 560 => array(\n 'name' => 'Kpèbo'\n ),\n 561 => array(\n 'name' => 'Kpotè'\n ),\n 562 => array(\n 'name' => 'Kpouèbo'\n ),\n 563 => array(\n 'name' => 'Krégbé'\n ),\n 564 => array(\n 'name' => 'Kreuzoukoué'\n ),\n 565 => array(\n 'name' => 'Krindjabo'\n ),\n 566 => array(\n 'name' => 'Krofoinsou'\n ),\n 567 => array(\n 'name' => 'L'\n ),\n 568 => array(\n 'name' => 'Labokro'\n ),\n 569 => array(\n 'name' => 'Lafokpokaha'\n ),\n 570 => array(\n 'name' => 'Lahou Kpandah'\n ),\n 571 => array(\n 'name' => 'Lahouda'\n ),\n 572 => array(\n 'name' => 'Lakota'\n ),\n 573 => array(\n 'name' => 'Lamékaha (Ferkessédougou)'\n ),\n 574 => array(\n 'name' => 'Lamékaha (Korhogo)'\n ),\n 575 => array(\n 'name' => 'Landiougou'\n ),\n 576 => array(\n 'name' => 'Languibonou'\n ),\n 577 => array(\n 'name' => 'Laoudi-Ba'\n ),\n 578 => array(\n 'name' => 'Larabia'\n ),\n 579 => array(\n 'name' => 'Lataha'\n ),\n 580 => array(\n 'name' => 'Lauzoua'\n ),\n 581 => array(\n 'name' => 'Léléblé'\n ),\n 582 => array(\n 'name' => 'Lengbrè'\n ),\n 583 => array(\n 'name' => 'Lessiri'\n ),\n 584 => array(\n 'name' => 'Ligrohoin'\n ),\n 585 => array(\n 'name' => 'Liliy'\n ),\n 586 => array(\n 'name' => 'Lissolo-Sobara'\n ),\n 587 => array(\n 'name' => 'Lobakuya'\n ),\n 588 => array(\n 'name' => 'Lobogba'\n ),\n 589 => array(\n 'name' => 'Logbonou'\n ),\n 590 => array(\n 'name' => 'Logoualé'\n ),\n 591 => array(\n 'name' => 'Logroan (Daloa Sud)'\n ),\n 592 => array(\n 'name' => 'Lolobo (Béoumi)'\n ),\n 593 => array(\n 'name' => 'Lolobo (Yamoussoukro)'\n ),\n 594 => array(\n 'name' => 'Lomokankro'\n ),\n 595 => array(\n 'name' => 'Lopou'\n ),\n 596 => array(\n 'name' => 'Loukou-Yaokro'\n ),\n 597 => array(\n 'name' => 'Loviguié'\n ),\n 598 => array(\n 'name' => 'Luénoufla'\n ),\n 599 => array(\n 'name' => 'M'\n ),\n 600 => array(\n 'name' => 'M’bahiakro'\n ),\n 601 => array(\n 'name' => 'M’batto'\n ),\n 602 => array(\n 'name' => 'M’bengué'\n ),\n 603 => array(\n 'name' => 'M’bonoua'\n ),\n 604 => array(\n 'name' => 'M’Borla-Dioulasso'\n ),\n 605 => array(\n 'name' => 'M’brou'\n ),\n 606 => array(\n 'name' => 'M’possa'\n ),\n 607 => array(\n 'name' => 'Mabéhiri 1'\n ),\n 608 => array(\n 'name' => 'Mabouo'\n ),\n 609 => array(\n 'name' => 'Madinani'\n ),\n 610 => array(\n 'name' => 'Maféré'\n ),\n 611 => array(\n 'name' => 'Maguéhio'\n ),\n 612 => array(\n 'name' => 'Mahalé'\n ),\n 613 => array(\n 'name' => 'Mahandiana Soukourani'\n ),\n 614 => array(\n 'name' => 'Mahandougou'\n ),\n 615 => array(\n 'name' => 'Mahapleu'\n ),\n 616 => array(\n 'name' => 'Mahino'\n ),\n 617 => array(\n 'name' => 'Makey-Liboli'\n ),\n 618 => array(\n 'name' => 'Mamini'\n ),\n 619 => array(\n 'name' => 'Maminigui'\n ),\n 620 => array(\n 'name' => 'Man'\n ),\n 621 => array(\n 'name' => 'Manabri'\n ),\n 622 => array(\n 'name' => 'Mandougou'\n ),\n 623 => array(\n 'name' => 'Manfla'\n ),\n 624 => array(\n 'name' => 'Mangouin-Yrongouin'\n ),\n 625 => array(\n 'name' => 'Mankono'\n ),\n 626 => array(\n 'name' => 'Mantongouiné'\n ),\n 627 => array(\n 'name' => 'Manzanouan'\n ),\n 628 => array(\n 'name' => 'Marabadiassa'\n ),\n 629 => array(\n 'name' => 'Marandallah'\n ),\n 630 => array(\n 'name' => 'Marcory'\n ),\n 631 => array(\n 'name' => 'Massadougou'\n ),\n 632 => array(\n 'name' => 'Massala (Séguéla)'\n ),\n 633 => array(\n 'name' => 'Massala-Barala'\n ),\n 634 => array(\n 'name' => 'Mayo'\n ),\n 635 => array(\n 'name' => 'Méagui'\n ),\n 636 => array(\n 'name' => 'Médon'\n ),\n 637 => array(\n 'name' => 'Mékro'\n ),\n 638 => array(\n 'name' => 'Memni'\n ),\n 639 => array(\n 'name' => 'Ménéké'\n ),\n 640 => array(\n 'name' => 'Méo'\n ),\n 641 => array(\n 'name' => 'Miadzin'\n ),\n 642 => array(\n 'name' => 'Mignoré'\n ),\n 643 => array(\n 'name' => 'Minfla'\n ),\n 644 => array(\n 'name' => 'Minignan'\n ),\n 645 => array(\n 'name' => 'Moapé'\n ),\n 646 => array(\n 'name' => 'Molonou'\n ),\n 647 => array(\n 'name' => 'Molonou-Blé'\n ),\n 648 => array(\n 'name' => 'Momirasso'\n ),\n 649 => array(\n 'name' => 'Monga'\n ),\n 650 => array(\n 'name' => 'Mongbara'\n ),\n 651 => array(\n 'name' => 'Monoko Zohi'\n ),\n 652 => array(\n 'name' => 'Monongo'\n ),\n 653 => array(\n 'name' => 'Mont Korhogo'\n ),\n 654 => array(\n 'name' => 'Morokinkro'\n ),\n 655 => array(\n 'name' => 'Morokro'\n ),\n 656 => array(\n 'name' => 'Morondo'\n ),\n 657 => array(\n 'name' => 'Moronou'\n ),\n 658 => array(\n 'name' => 'Moussobadougou'\n ),\n 659 => array(\n 'name' => 'N'\n ),\n 660 => array(\n 'name' => 'N’dakro'\n ),\n 661 => array(\n 'name' => 'N’dénou'\n ),\n 662 => array(\n 'name' => 'N’déou'\n ),\n 663 => array(\n 'name' => 'N’douci'\n ),\n 664 => array(\n 'name' => 'N’douffoukankro'\n ),\n 665 => array(\n 'name' => 'N’doukahakro'\n ),\n 666 => array(\n 'name' => 'N’gangoro-Attoutou'\n ),\n 667 => array(\n 'name' => 'N’Ganon'\n ),\n 668 => array(\n 'name' => 'N’Gattadolikro'\n ),\n 669 => array(\n 'name' => 'N’Gattakro'\n ),\n 670 => array(\n 'name' => 'N’Gban Kassê'\n ),\n 671 => array(\n 'name' => 'N’gohinou'\n ),\n 672 => array(\n 'name' => 'N’Goloblasso'\n ),\n 673 => array(\n 'name' => 'N’gribo-Takikro'\n ),\n 674 => array(\n 'name' => 'N’guessan-Brindoukro'\n ),\n 675 => array(\n 'name' => 'N’Guessankro'\n ),\n 676 => array(\n 'name' => 'N’Guessankro'\n ),\n 677 => array(\n 'name' => 'N’guiémé'\n ),\n 678 => array(\n 'name' => 'N’Guyakro'\n ),\n 679 => array(\n 'name' => 'N’Zécrézessou'\n ),\n 680 => array(\n 'name' => 'N’Zi-N’Ziblékro'\n ),\n 681 => array(\n 'name' => 'N’Zianouan'\n ),\n 682 => array(\n 'name' => 'N’Zué-Kokoré'\n ),\n 683 => array(\n 'name' => 'Nafana (Ferkessédougou)'\n ),\n 684 => array(\n 'name' => 'Nafana (Prikro)'\n ),\n 685 => array(\n 'name' => 'Nafana Sienso'\n ),\n 686 => array(\n 'name' => 'Nafoun'\n ),\n 687 => array(\n 'name' => 'Nahio'\n ),\n 688 => array(\n 'name' => 'Namahounondougou'\n ),\n 689 => array(\n 'name' => 'Namané'\n ),\n 690 => array(\n 'name' => 'Namassi'\n ),\n 691 => array(\n 'name' => 'Nambingué'\n ),\n 692 => array(\n 'name' => 'Nandjélé-Ségbéré'\n ),\n 693 => array(\n 'name' => 'Napié'\n ),\n 694 => array(\n 'name' => 'Nassian'\n ),\n 695 => array(\n 'name' => 'Nébo (Divo)'\n ),\n 696 => array(\n 'name' => 'Néguépié'\n ),\n 697 => array(\n 'name' => 'Néko'\n ),\n 698 => array(\n 'name' => 'Nézobly'\n ),\n 699 => array(\n 'name' => 'Niablé'\n ),\n 700 => array(\n 'name' => 'Niakaramandougou'\n ),\n 701 => array(\n 'name' => 'Niakoblognoa'\n ),\n 702 => array(\n 'name' => 'Niamana (Odienné)'\n ),\n 703 => array(\n 'name' => 'Niambézaria'\n ),\n 704 => array(\n 'name' => 'Niazaroko'\n ),\n 705 => array(\n 'name' => 'Nidrou'\n ),\n 706 => array(\n 'name' => 'Niédiékaha'\n ),\n 707 => array(\n 'name' => 'Niellé'\n ),\n 708 => array(\n 'name' => 'Niéméné'\n ),\n 709 => array(\n 'name' => 'Nigui Assoko'\n ),\n 710 => array(\n 'name' => 'Nigui Saff'\n ),\n 711 => array(\n 'name' => 'Niofoin'\n ),\n 712 => array(\n 'name' => 'Niokosso'\n ),\n 713 => array(\n 'name' => 'Niorouhio'\n ),\n 714 => array(\n 'name' => 'Niouldé'\n ),\n 715 => array(\n 'name' => 'Nizahon'\n ),\n 716 => array(\n 'name' => 'Noé (Tiapoum)'\n ),\n 717 => array(\n 'name' => 'Nofou'\n ),\n 718 => array(\n 'name' => 'Nouamou'\n ),\n 719 => array(\n 'name' => 'O'\n ),\n 720 => array(\n 'name' => 'Odienné'\n ),\n 721 => array(\n 'name' => 'Offa (Agboville)'\n ),\n 722 => array(\n 'name' => 'Offoumpo'\n ),\n 723 => array(\n 'name' => 'Oghlwapo'\n ),\n 724 => array(\n 'name' => 'Ogoudou'\n ),\n 725 => array(\n 'name' => 'Okrouyo'\n ),\n 726 => array(\n 'name' => 'Olodio'\n ),\n 727 => array(\n 'name' => 'Ondéfidouo'\n ),\n 728 => array(\n 'name' => 'Ono'\n ),\n 729 => array(\n 'name' => 'Orbaff'\n ),\n 730 => array(\n 'name' => 'Oress-Krobou'\n ),\n 731 => array(\n 'name' => 'Ottawa'\n ),\n 732 => array(\n 'name' => 'Ottopé'\n ),\n 733 => array(\n 'name' => 'Ouangolodougou'\n ),\n 734 => array(\n 'name' => 'Ouaninou'\n ),\n 735 => array(\n 'name' => 'Ouattaradougou'\n ),\n 736 => array(\n 'name' => 'Ouédallah'\n ),\n 737 => array(\n 'name' => 'Ouellé'\n ),\n 738 => array(\n 'name' => 'Ouéoulo'\n ),\n 739 => array(\n 'name' => 'Ouffouédiékro'\n ),\n 740 => array(\n 'name' => 'Oumé'\n ),\n 741 => array(\n 'name' => 'Oupoyo'\n ),\n 742 => array(\n 'name' => 'Ouragahio'\n ),\n 743 => array(\n 'name' => 'Ouréguékaha'\n ),\n 744 => array(\n 'name' => 'Ousrou'\n ),\n 745 => array(\n 'name' => 'Ouyably-Gnondrou'\n ),\n 746 => array(\n 'name' => 'P'\n ),\n 747 => array(\n 'name' => 'Pacobo'\n ),\n 748 => array(\n 'name' => 'Pakouabo'\n ),\n 749 => array(\n 'name' => 'Pambasso-Diédou'\n ),\n 750 => array(\n 'name' => 'Pangalakaha'\n ),\n 751 => array(\n 'name' => 'Paoufla'\n ),\n 752 => array(\n 'name' => 'Papara (Tengréla)'\n ),\n 753 => array(\n 'name' => 'Para (Tabou)'\n ),\n 754 => array(\n 'name' => 'Pauly'\n ),\n 755 => array(\n 'name' => 'Péguékaha'\n ),\n 756 => array(\n 'name' => 'Péhé'\n ),\n 757 => array(\n 'name' => 'Péhékanhouébli'\n ),\n 758 => array(\n 'name' => 'Pélézi'\n ),\n 759 => array(\n 'name' => 'Pétigoa 2'\n ),\n 760 => array(\n 'name' => 'Petit Guiglo'\n ),\n 761 => array(\n 'name' => 'Pinda-Boroko'\n ),\n 762 => array(\n 'name' => 'Pinhou'\n ),\n 763 => array(\n 'name' => 'Pitiengomon'\n ),\n 764 => array(\n 'name' => 'Plateau'\n ),\n 765 => array(\n 'name' => 'Pleuro'\n ),\n 766 => array(\n 'name' => 'Podiagouiné'\n ),\n 767 => array(\n 'name' => 'Podoué'\n ),\n 768 => array(\n 'name' => 'Pogo'\n ),\n 769 => array(\n 'name' => 'Pokréagui'\n ),\n 770 => array(\n 'name' => 'Ponondougou'\n ),\n 771 => array(\n 'name' => 'Port-Bouët'\n ),\n 772 => array(\n 'name' => 'Poumbly'\n ),\n 773 => array(\n 'name' => 'Pranouan'\n ),\n 774 => array(\n 'name' => 'Prikro'\n ),\n 775 => array(\n 'name' => 'R'\n ),\n 776 => array(\n 'name' => 'Raviart'\n ),\n 777 => array(\n 'name' => 'Roa'\n ),\n 778 => array(\n 'name' => 'Rubino'\n ),\n 779 => array(\n 'name' => 'S'\n ),\n 780 => array(\n 'name' => 'Saboudougou'\n ),\n 781 => array(\n 'name' => 'Sago'\n ),\n 782 => array(\n 'name' => 'Sahébo'\n ),\n 783 => array(\n 'name' => 'Sahuyé'\n ),\n 784 => array(\n 'name' => 'Saïoua'\n ),\n 785 => array(\n 'name' => 'Sakassou'\n ),\n 786 => array(\n 'name' => '((Sakahouo))'\n ),\n 787 => array(\n 'name' => 'Sakré'\n ),\n 788 => array(\n 'name' => 'Samango'\n ),\n 789 => array(\n 'name' => 'Samanza'\n ),\n 790 => array(\n 'name' => 'Samatiguila'\n ),\n 791 => array(\n 'name' => 'Saminikro'\n ),\n 792 => array(\n 'name' => 'San-Pédro'\n ),\n 793 => array(\n 'name' => 'Sandala'\n ),\n 794 => array(\n 'name' => 'Sandégué'\n ),\n 795 => array(\n 'name' => 'Sandougou-Soba'\n ),\n 796 => array(\n 'name' => 'Sangouiné'\n ),\n 797 => array(\n 'name' => 'Sankadiokro'\n ),\n 798 => array(\n 'name' => 'Santa (Biankouma)'\n ),\n 799 => array(\n 'name' => 'Santa (Touba)'\n ),\n 800 => array(\n 'name' => 'Sapli-Sépingo'\n ),\n 801 => array(\n 'name' => 'Sarhala'\n ),\n 802 => array(\n 'name' => 'Sassako Bégnini'\n ),\n 803 => array(\n 'name' => 'Sassandra'\n ),\n 804 => array(\n 'name' => 'Satama-Sokoro'\n ),\n 805 => array(\n 'name' => 'Satama-Sokoura'\n ),\n 806 => array(\n 'name' => 'Satikran'\n ),\n 807 => array(\n 'name' => 'Satroko'\n ),\n 808 => array(\n 'name' => 'Sébédoufla'\n ),\n 809 => array(\n 'name' => 'Séguéla'\n ),\n 810 => array(\n 'name' => 'Séguélon'\n ),\n 811 => array(\n 'name' => 'Séileu'\n ),\n 812 => array(\n 'name' => 'Séitifla'\n ),\n 813 => array(\n 'name' => 'Sémien'\n ),\n 814 => array(\n 'name' => 'Sépikaha'\n ),\n 815 => array(\n 'name' => 'Sérébissou'\n ),\n 816 => array(\n 'name' => 'Sérihi'\n ),\n 817 => array(\n 'name' => 'Seydougou'\n ),\n 818 => array(\n 'name' => 'Sianhala'\n ),\n 819 => array(\n 'name' => 'Siansoba'\n ),\n 820 => array(\n 'name' => 'Siempurgo'\n ),\n 821 => array(\n 'name' => 'Sifié'\n ),\n 822 => array(\n 'name' => 'Sikensi'\n ),\n 823 => array(\n 'name' => 'Sikolo'\n ),\n 824 => array(\n 'name' => 'Silakoro'\n ),\n 825 => array(\n 'name' => 'Sinématiali'\n ),\n 826 => array(\n 'name' => 'Sinfra'\n ),\n 827 => array(\n 'name' => 'Singo'\n ),\n 828 => array(\n 'name' => 'Siolokaha'\n ),\n 829 => array(\n 'name' => 'Sipilou'\n ),\n 830 => array(\n 'name' => 'Sirana'\n ),\n 831 => array(\n 'name' => 'Sirasso'\n ),\n 832 => array(\n 'name' => 'Siriho'\n ),\n 833 => array(\n 'name' => 'Sissédougou'\n ),\n 834 => array(\n 'name' => 'Soaékpé-Douédy'\n ),\n 835 => array(\n 'name' => 'Soba (Korhogo)'\n ),\n 836 => array(\n 'name' => 'Soba-Banandjé'\n ),\n 837 => array(\n 'name' => 'Sohouo'\n ),\n 838 => array(\n 'name' => 'Sokala-Sobara'\n ),\n 839 => array(\n 'name' => 'Sokoro'\n ),\n 840 => array(\n 'name' => 'Sokorodougou'\n ),\n 841 => array(\n 'name' => 'Sokourala-Mahou'\n ),\n 842 => array(\n 'name' => 'Sokrogbo'\n ),\n 843 => array(\n 'name' => 'Sokrogbo-Carrefour'\n ),\n 844 => array(\n 'name' => 'Sominassé'\n ),\n 845 => array(\n 'name' => 'Somokoro'\n ),\n 846 => array(\n 'name' => 'Songan'\n ),\n 847 => array(\n 'name' => 'Songon'\n ),\n 848 => array(\n 'name' => 'Songori'\n ),\n 849 => array(\n 'name' => 'Sononzo'\n ),\n 850 => array(\n 'name' => 'Sorobango'\n ),\n 851 => array(\n 'name' => 'Soubré'\n ),\n 852 => array(\n 'name' => 'Soukourougban'\n ),\n 853 => array(\n 'name' => 'Soungassou'\n ),\n 854 => array(\n 'name' => 'Subiakro'\n ),\n 855 => array(\n 'name' => 'T'\n ),\n 856 => array(\n 'name' => 'Taabo'\n ),\n 857 => array(\n 'name' => 'Taabo-Village'\n ),\n 858 => array(\n 'name' => 'Tabagne'\n ),\n 859 => array(\n 'name' => 'Tabayo 1'\n ),\n 860 => array(\n 'name' => 'Tabléguikou'\n ),\n 861 => array(\n 'name' => 'Taboth'\n ),\n 862 => array(\n 'name' => 'Tabou'\n ),\n 863 => array(\n 'name' => 'Tafiré'\n ),\n 864 => array(\n 'name' => 'Tagadi'\n ),\n 865 => array(\n 'name' => 'Tahakro'\n ),\n 866 => array(\n 'name' => 'Tahibly'\n ),\n 867 => array(\n 'name' => 'Taï'\n ),\n 868 => array(\n 'name' => 'Takikro'\n ),\n 869 => array(\n 'name' => 'Takoréagui'\n ),\n 870 => array(\n 'name' => 'Talahini Tomora'\n ),\n 871 => array(\n 'name' => 'Tambi'\n ),\n 872 => array(\n 'name' => 'Tanda'\n ),\n 873 => array(\n 'name' => 'Tangafla'\n ),\n 874 => array(\n 'name' => 'Tanguélan'\n ),\n 875 => array(\n 'name' => 'Tankessé'\n ),\n 876 => array(\n 'name' => 'Taoudi'\n ),\n 877 => array(\n 'name' => 'Tapéguia'\n ),\n 878 => array(\n 'name' => 'Tawara'\n ),\n 879 => array(\n 'name' => 'Téapleu'\n ),\n 880 => array(\n 'name' => 'Téguéla'\n ),\n 881 => array(\n 'name' => 'Téhini'\n ),\n 882 => array(\n 'name' => 'Téhiri'\n ),\n 883 => array(\n 'name' => 'Tendéné-Bambarasso'\n ),\n 884 => array(\n 'name' => 'Tengréla'\n ),\n 885 => array(\n 'name' => 'Tézié'\n ),\n 886 => array(\n 'name' => 'Tiagba'\n ),\n 887 => array(\n 'name' => 'Tiapoum'\n ),\n 888 => array(\n 'name' => 'Tiassalé'\n ),\n 889 => array(\n 'name' => 'Tibéita'\n ),\n 890 => array(\n 'name' => 'Tié N’diékro'\n ),\n 891 => array(\n 'name' => 'Tiébissou'\n ),\n 892 => array(\n 'name' => 'Tiédio'\n ),\n 893 => array(\n 'name' => 'Tiégba'\n ),\n 894 => array(\n 'name' => 'Tiékpé'\n ),\n 895 => array(\n 'name' => 'Tiémé'\n ),\n 896 => array(\n 'name' => 'Tiémélékro'\n ),\n 897 => array(\n 'name' => 'Tiénindiéri'\n ),\n 898 => array(\n 'name' => 'Tiéningboué'\n ),\n 899 => array(\n 'name' => 'Tienko (département de Minignan)'\n ),\n 900 => array(\n 'name' => 'Tienko (département de Touba)'\n ),\n 901 => array(\n 'name' => 'Tienkoikro'\n ),\n 902 => array(\n 'name' => 'Tiény-Séably'\n ),\n 903 => array(\n 'name' => 'Tiéolé-Oula'\n ),\n 904 => array(\n 'name' => 'Tiéviéssou'\n ),\n 905 => array(\n 'name' => 'Timbé'\n ),\n 906 => array(\n 'name' => 'Tinhou'\n ),\n 907 => array(\n 'name' => 'Tiobly'\n ),\n 908 => array(\n 'name' => 'Tioro'\n ),\n 909 => array(\n 'name' => 'Tofla'\n ),\n 910 => array(\n 'name' => 'Togoniéré'\n ),\n 911 => array(\n 'name' => 'Toliesso'\n ),\n 912 => array(\n 'name' => 'Tomono'\n ),\n 913 => array(\n 'name' => 'Tonla'\n ),\n 914 => array(\n 'name' => 'Torossanguéhi'\n ),\n 915 => array(\n 'name' => 'Tortiya'\n ),\n 916 => array(\n 'name' => 'Totrodrou'\n ),\n 917 => array(\n 'name' => 'Touba'\n ),\n 918 => array(\n 'name' => 'Toubalo'\n ),\n 919 => array(\n 'name' => 'Tougbo'\n ),\n 920 => array(\n 'name' => 'Touih'\n ),\n 921 => array(\n 'name' => 'Toukouzou'\n ),\n 922 => array(\n 'name' => 'Toulepleu'\n ),\n 923 => array(\n 'name' => 'Toumodi'\n ),\n 924 => array(\n 'name' => 'Toumodi-Sakassou'\n ),\n 925 => array(\n 'name' => 'Toumoukoro'\n ),\n 926 => array(\n 'name' => 'Toupah'\n ),\n 927 => array(\n 'name' => 'Toutoubré'\n ),\n 928 => array(\n 'name' => 'Trafesso'\n ),\n 929 => array(\n 'name' => 'Transua'\n ),\n 930 => array(\n 'name' => 'Treichville'\n ),\n 931 => array(\n 'name' => 'V'\n ),\n 932 => array(\n 'name' => 'Vaafla'\n ),\n 933 => array(\n 'name' => 'Vao'\n ),\n 934 => array(\n 'name' => 'Varalé'\n ),\n 935 => array(\n 'name' => 'Vavoua'\n ),\n 936 => array(\n 'name' => 'Vouéboufla'\n ),\n 937 => array(\n 'name' => 'W'\n ),\n 938 => array(\n 'name' => 'Walèbo'\n ),\n 939 => array(\n 'name' => 'Waté'\n ),\n 940 => array(\n 'name' => 'Wonséaly'\n ),\n 941 => array(\n 'name' => 'Worofla'\n ),\n 942 => array(\n 'name' => 'Y'\n ),\n 943 => array(\n 'name' => 'Yaakro'\n ),\n 944 => array(\n 'name' => 'Yabayo'\n ),\n 945 => array(\n 'name' => 'Yacolidabouo'\n ),\n 946 => array(\n 'name' => 'Yakassé-Attobrou'\n ),\n 947 => array(\n 'name' => 'Yakassé-Feyassé'\n ),\n 948 => array(\n 'name' => 'Yakassé-Mé'\n ),\n 949 => array(\n 'name' => 'Yakpabo-Sakassou'\n ),\n 950 => array(\n 'name' => 'Yala (Vavoua)'\n ),\n 951 => array(\n 'name' => 'Yamoussoukro'\n ),\n 952 => array(\n 'name' => 'Yaossédougou'\n ),\n 953 => array(\n 'name' => 'Yaou'\n ),\n 954 => array(\n 'name' => 'Yapleu'\n ),\n 955 => array(\n 'name' => 'Yelleu'\n ),\n 956 => array(\n 'name' => 'Yérétiélé'\n ),\n 957 => array(\n 'name' => 'Yézimala'\n ),\n 958 => array(\n 'name' => 'Yobouakro'\n ),\n 959 => array(\n 'name' => 'Yocoboué'\n ),\n 960 => array(\n 'name' => 'Yokoréa'\n ),\n 961 => array(\n 'name' => 'Yoourédoula'\n ),\n 962 => array(\n 'name' => 'Yopohué'\n ),\n 963 => array(\n 'name' => 'Yopougon'\n ),\n 964 => array(\n 'name' => 'Yorobodi'\n ),\n 965 => array(\n 'name' => 'Yorodougou'\n ),\n 966 => array(\n 'name' => 'Yrozon'\n ),\n 967 => array(\n 'name' => 'Z'\n ),\n 968 => array(\n 'name' => 'Zagné'\n ),\n 969 => array(\n 'name' => 'Zagoréta-Gadouan'\n ),\n 970 => array(\n 'name' => 'Zagoué (Man)'\n ),\n 971 => array(\n 'name' => 'Zaguiéta'\n ),\n 972 => array(\n 'name' => 'Zaguinasso'\n ),\n 973 => array(\n 'name' => 'Zahia'\n ),\n 974 => array(\n 'name' => 'Zaïbo'\n ),\n 975 => array(\n 'name' => 'Zakoéoua'\n ),\n 976 => array(\n 'name' => 'Zaliohouan'\n ),\n 977 => array(\n 'name' => 'Zambakro'\n ),\n 978 => array(\n 'name' => 'Zanzansou'\n ),\n 979 => array(\n 'name' => 'Zanzra'\n ),\n 980 => array(\n 'name' => 'Zaranou'\n ),\n 981 => array(\n 'name' => 'Zatta'\n ),\n 982 => array(\n 'name' => 'Zéaglo'\n ),\n 983 => array(\n 'name' => 'Zébouo Nord'\n ),\n 984 => array(\n 'name' => 'Zébra'\n ),\n 985 => array(\n 'name' => 'Zédé-Dianhoun'\n ),\n 986 => array(\n 'name' => 'Zégo'\n ),\n 987 => array(\n 'name' => 'Zéménafla-V'\n ),\n 988 => array(\n 'name' => 'Zéo'\n ),\n 989 => array(\n 'name' => 'Zérégbo'\n ),\n 990 => array(\n 'name' => 'Zialégréhoa (Grand-Zia)'\n ),\n 991 => array(\n 'name' => 'Ziki-Diès'\n ),\n 992 => array(\n 'name' => 'Zikisso'\n ),\n 993 => array(\n 'name' => 'Ziogouiné'\n ),\n 994 => array(\n 'name' => 'Zirifla'\n ),\n 995 => array(\n 'name' => 'Zokoguhé'\n ),\n 996 => array(\n 'name' => 'Zonneu'\n ),\n 997 => array(\n 'name' => 'Zorofla'\n ),\n 998 => array(\n 'name' => 'Zou'\n ),\n 999 => array(\n 'name' => 'Zouan-Hounien'\n ),\n 1000 => array(\n 'name' => 'Zouatta'\n ),\n 1001 => array(\n 'name' => 'Zougounéfla'\n ),\n 1002 => array(\n 'name' => 'Zoukougbeu'\n ),\n 1003 => array(\n 'name' => 'Zoukpangbeu'\n ),\n 1004 => array(\n 'name' => 'Zoupleu'\n ),\n 1005 => array(\n 'name' => 'Zraluo'\n ),\n 1006 => array(\n 'name' => 'Zro'\n ),\n 1007 => array(\n 'name' => 'Zuénoula'\n ),\n );\n foreach ($commune as $k=>$val){\n Cities::create($val);\n }\n }", "public function queryAll($campos=\"*\",$criterio=\"\");", "function indexer_motiver_mots($mots) {\n\t$liste = array();\n\tforeach($mots as $i => $m) {\n\t\t$mots[$i] = '='.preg_replace('/\\W/', '', $m);\n\t}\n\t$m = join(' ', $mots);\n\t$query = \"SELECT id FROM \" . SPHINX_DEFAULT_INDEX . \" WHERE MATCH('$m') LIMIT 1\";\n\n\t$sphinx = \\Sphinx\\SphinxQL\\SphinxQLSingleton::getInstance(SPHINX_SERVER_HOST, SPHINX_SERVER_PORT);\n\t$all = $sphinx->allfetsel($query);\n\n\tif (!is_array($all)\n\tOR !is_array($all['query'])\n\tOR !is_array($all['query']['meta'])) {\n\t\t// echo \"<p class=error>\" . _L('Erreur Sphinx').\"</p>\";\n\t} else {\n\t\tif (is_array($all['query']['meta']['keywords'])) {\n\t\t\tforeach($all['query']['meta']['keywords'] as $i => $w) {\n\t\t\t\t$translitt = str_replace('=', '', $w['keyword']);\n\t\t\t\tif (intval($w['docs']) > 3)\n\t\t\t\t\t$liste[$translitt] = intval($w['docs']);\n\t\t\t}\n\t\t\t$liste = array_filter($liste);\n\t\t\tarsort($liste);\n\t\t}\n\t\treturn array_keys($liste);\n\t}\n}", "function fct_moteur_recherche ($mescriteres) {\nglobal $valeurs_criteres;\n\t$moteur = \"\";\n\tforeach ($valeurs_criteres as $libelle_critere => $liste_items) {\n\t\t$liste_critere = \"\";\n\t\t$refcritere = substr($libelle_critere, 0, 3);\n\t\tforeach ($liste_items as $libelle_item => $valeur_item) {\n\t\t\t$mescriteres_encours = $mescriteres;\n\t\t\tif ($libelle_critere == \"feuille\") $img_critere = \"feuille_\".strtolower(fct_remove_accents($libelle_item));\n\t\t\telseif ($libelle_critere == \"fleur\") $img_critere = \"fleur_\".strtolower(fct_remove_accents($libelle_item));\n\t\t\tif (($mescriteres[$refcritere]['code'] >= 0) && ($mescriteres[$refcritere]['code'] == $valeur_item)) {\n\t\t\t\t$class_lien = ' class=\"criselect\"';\n\t\t\t\t$mescriteres_encours[$refcritere]['code'] = -1;\n\t\t\t\tif (($libelle_critere == \"feuille\") || ($libelle_critere == \"fleur\")) $img_critere .= \"_r\";\n\t\t\t} else {\n\t\t\t\t$class_lien = '';\n\t\t\t\t$mescriteres_encours[$refcritere]['code'] = $valeur_item;\n\t\t\t}\n\t\t\t$url_lien = fct_code_lien_url ($mescriteres_encours);\n\t\t\tif (($libelle_critere == \"feuille\") || ($libelle_critere == \"fleur\")) $libelle_item = '<img src=\"interface/'.$img_critere.'.gif\" border=\"0\">';\n\t\t\t$liste_critere .= '<li'.$class_lien.'><a href=\"'.$url_lien.'\">'.$libelle_item.'</a></li>'.\"\\n\";\n\t\t}\n\t\tif ($libelle_critere == \"taille\") $libelle_critere .= ' (cm)';\n\t\tif ($libelle_critere == \"feuille\") $moteur .= '<ul class=\"feuille\">'.\"\\n\";\n\t\telseif ($libelle_critere == \"fleur\") $moteur .= '<ul class=\"fleur\">'.\"\\n\";\n\t\telse $moteur .= '<ul>'.\"\\n\";\n\t\t$moteur .= '<li class=\"libelle\">'.ucfirst($libelle_critere).'</li>'.\"\\n\";\n\t\t$moteur .= $liste_critere;\n\t\t$moteur .= '</ul>'.\"\\n\";\n\t}\n\treturn $moteur;\n}", "function buscar_comprobante_doc_venta($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles,prosic_detalle_comprobante.importe_dolares*prosic_tipo_cambio.venta_financiero)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles*prosic_tipo_cambio.venta_financiero,prosic_detalle_comprobante.importe_dolares)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function mencari_tf($data=array())\n{\n\tfor ($i=0; $i <count($data) ; $i++) { \n\n\t\t// if ($i==0) {\n\t\t\t$term_query[$i] = array_unique($data[$i][1]);//menghilangkan data kembar dari data query form\n\t\t// }\n\t}\n\n\t$j=0;\n\tfor ($k=0; $k <count($term_query) ; $k++) { \n\t\tforeach ($term_query[$k] as $value) {\n\t\t\t$query[$j] = $value;\n\t\t\t$j++;\n\t\t}\n\t}\n\n\t$term_unik = array_unique($query);\n\n\t$b = 0;\n\tforeach ($term_unik as $value1) {\n\t\t$term_urut[$b]= $value1;\n\t\t$b++;\n\t}\n\t\n\t//batas term\n\n\t//mencari tf\n\tfor ($m=0; $m <count($data) ; $m++) { \n\t\tfor ($n=0; $n <count($term_urut) ; $n++) { \n\t\t// foreach ($term_query as $kunci => $isi) {\n\t\t\t\t$angka = (in_array($term_urut[$n], $data[$m][1])) ? 1 : 0 ;\n\t\t\t\t// $tf[$m][$n]=array(\"index_term\"=>$n,\"nilai_tf\"=>$angka);\n\t\t\t\t$tf[$m][$n]=array(\"nilai_tf\"=>$angka);\n\t\t\t// }\n\t\t}\t\t\n\t}//batas mencari tf\n\treturn $tf;\n}", "public function busquedaLiteral($texto) {\n $txt = Funciones::gCodificar(Funciones::qQuitarCaracteres($texto));\n return $this->buscar(\"SELECT P.FECHA,P.CODPUN,P.PUNTO,P.TITULO,T.CODAPA,T.APARTADO,T.SUBTITULO,T.TEXTO,1 AS RELEVANCIA FROM ACTAS_PUNTOS P LEFT JOIN ACTAS_TEXTOS T ON P.FECHA=T.FECHA AND P.CODPUN=T.CODPUN WHERE P.TITULO LIKE '%$txt%' OR T.SUBTITULO LIKE '%$txt%' OR T.TEXTO LIKE '%$txt%' ORDER BY P.FECHA DESC,P.CODPUN,T.CODAPA\");\n }", "public function busqueda($tablas){\r\n $resul = $this->conexion->query(\"SELECT * FROM $tablas\") or die($this->conexion->error);\r\n return $resul->fetch_all(MYSQLI_ASSOC);\r\n return false; \r\n }", "function simbolos_por_tag_con_filtro($tag,$id_tipo_palabra,$id_tipo_simbolo,$registrado,$marco,$contraste,$tipo_letra,$mayusculas,$minusculas,$castellano,$ruso,$rumano,$arabe,$chino,$bulgaro,$polaco,$ingles,$frances,$catalan) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND simbolos.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($tipo_letra==99) { $sql_tipo_letra=''; } \n\t\telse { $sql_tipo_letra='AND (simbolos.sup_font='.$tipo_letra.' OR simbolos.inf_font='.$tipo_letra.')'; }\n\t\t\n\t\tif ($minusculas == 1 && $mayusculas == 1) {\n\t\t \t$sql_mayusculas='AND (simbolos.inf_mayusculas=1 OR simbolos.inf_mayusculas=0)';\n\t\t} elseif ($minusculas == 1) { \n\t\t $sql_mayusculas='AND (simbolos.inf_mayusculas=0)';\n\t\t} elseif ($mayusculas == 1) { \n\t\t\t$sql_mayusculas='AND (simbolos.inf_mayusculas=1)';\n\t\t} elseif ($minusculas == 0 && $mayusculas == 0) { \n\t\t\t$sql_mayusculas='AND (simbolos.inf_mayusculas=1 OR simbolos.inf_mayusculas=0)';\n\t\t}\n\t\t\n\t\t\n\t\tif ($castellano==0 &&($ruso==1 || $rumano==1 || $arabe==1 || $chino==1 || $bulgaro==1 || $polaco==1 || $ingles==1 || $frances==1 || $catalan==1)) { \n\t\t\n\t\t\t$sql_idioma_superior='AND simbolos.sup_con_texto=0 ';\n\t\t\t$sql_idioma_inferior='AND (simbolos.inf_idioma=99999 ';\n\t\t\t\t\tif ($castellano==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=0 '; } \n\t\t\t\t\tif ($ruso==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=1 '; } \n\t\t\t\t\tif ($rumano==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=2 '; } \n\t\t\t\t\tif ($arabe==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=3 '; } \n\t\t\t\t\tif ($chino==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=4 '; } \n\t\t\t\t\tif ($bulgaro==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=5 '; } \n\t\t\t\t\tif ($polaco==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=6 '; } \n\t\t\t\t\tif ($ingles==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=7 '; }\n\t\t\t\t\tif ($frances==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=8 '; }\n\t\t\t\t\tif ($catalan==1) { $sql_idioma_inferior.='OR simbolos.inf_idioma=9 '; } \n\t\t\t$sql_idioma_inferior.= ' )';\n\t\t\t$sql_tipo_letra=''; \t\t\t\n\t\t\n\t\t} elseif ($castellano==1) { \n\t\t\n\t\t\tif ($ruso==1 || $rumano==1 || $arabe==1 || $chino==1 || $bulgaro==1 || $polaco==1 || $ingles==1 || $frances==1 || $catalan==1) {\n\t\t\t\n\t\t\t$sql_idioma_inferior='AND simbolos.inf_idioma=0 ';\n\t\t\t$sql_idioma_superior='AND (simbolos.inf_idioma=99999 ';\n\t\t\t\t\tif ($ruso==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=1 '; } \n\t\t\t\t\tif ($rumano==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=2 '; } \n\t\t\t\t\tif ($arabe==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=3 '; } \n\t\t\t\t\tif ($chino==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=4 '; } \n\t\t\t\t\tif ($bulgaro==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=5 '; } \n\t\t\t\t\tif ($polaco==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=6 '; } \n\t\t\t\t\tif ($ingles==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=7 '; }\n\t\t\t\t\tif ($frances==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=8 '; }\n\t\t\t\t\tif ($catalan==1) { $sql_idioma_superior.='OR simbolos.sup_idioma=9 '; } \n\t\t\t$sql_idioma_superior.= ' )';\n\t\t\t\n\t\t\t} elseif ($ruso==0 && $rumano==0 && $arabe==0 && $chino==0 && $bulgaro==0 && $polaco==0 && $ingles==0 && $frances==0 && $catalan==0) {\n\t\t\t\n\t\t\t\t$sql_idioma_superior='AND simbolos.sup_con_texto=0 ';\n\t\t\t\t$sql_idioma_inferior='AND simbolos.inf_idioma=0 ';\n\t\t\t\n\t\t\t}\n\t\t\n\t\t} elseif ($castellano==0 && $ruso==0 && $rumano==0 && $arabe==0 && $chino==0 && $bulgaro==0 && $polaco==0 && $ingles==0 && $frances==0 && $catalan==0) {\n\t\t\n\t\t\t$sql_idioma_inferior='';\n\t\t\t$sql_idioma_inferior='';\n\t\t}\n\t\t\n\t\tif ($id_tipo_palabra==99) { $sql_tipo_palabra=''; } \n\t\telse { $sql_tipo_palabra='AND palabras.id_tipo_palabra='.$id_tipo_palabra.''; }\n\t\t\n\t\tif ($marco==99) { $sql_marco=''; } \n\t\telse { $sql_marco='AND simbolos.marco='.$marco.''; }\n\t\t\n\t\tif ($contraste==99) { $sql_contraste=''; } \n\t\telse { $sql_contraste='AND simbolos.contraste='.$contraste.''; }\n\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo=tipos_simbolos.id_tipo'; } \n\t\telse { $sql_tipo_simbolo='AND simbolos.id_tipo_simbolo='.$id_tipo_simbolo.' AND tipos_simbolos.id_tipo='.$id_tipo_simbolo.''; }\n\t\t\n\t\t$query = \"SELECT simbolos.*, palabras.*, tipos_simbolos.*\n\t\tFROM simbolos, palabras, tipos_simbolos\n\t\tWHERE simbolos.id_palabra=palabras.id_palabra\n\t\tAND simbolos.tags_simbolo LIKE '%{\".$tag.\"}%'\n\t\t$sql_tipo_simbolo\n\t\t$sql_tipo_palabra\n\t\t$sql_marco\n\t\t$sql_contraste\n\t\t$sql_tipo_letra\n\t\t$sql_mayusculas\n\t\t$sql_idioma_inferior\n\t\t$sql_idioma_superior\n\t\t$mostrar_registradas\n\t\tORDER BY palabras.palabra asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\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 $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function buscar_comprobante_venta_3($anio ,$mes ,$fech1 ,$fech2 ,$tipodocumento) {\n //CPC_TipoDocumento => F factura, B boleta\n //CPC_total => total de la FACTURA o BOLETA CPC_FechaRegistro BETWEEN '20121201' AND '20121202'\n\n $where=\"\";\n //----------\n if($anio!=\"--\" && $mes ==\"--\"){// SOLO AÑO\n $where=\"AND YEAR(CPC_FechaRegistro)='\" . $anio . \"'\";\n }\n if($anio!=\"--\" && $mes !=\"--\" ){// MES Y AÑO\n $where=\"AND YEAR(CPC_FechaRegistro)='\" . $anio . \"' AND MONTH(CPC_FechaRegistro)='\" . $mes .\"'\";\n }\n if($anio==\"--\" && $mes !=\"--\"){//MES CON AÑO ACTUAL\n $where=\"AND YEAR(CPC_FechaRegistro)=' \".date(\"Y\").\"' AND MONTH(CPC_FechaRegistro)='\" . $mes .\"'\";\n }\n\n //-----------------\n \n if($anio==\"--\" && $mes ==\"--\" && $fech1!=\"--\" && $fech2==\"--\"){//FECHA INICIAL\n $where=\"AND CPC_FechaRegistro > '\" . $fech1 . \"'\";\n }\n if($anio==\"--\" && $mes ==\"--\" && $fech1!=\"--\" && $fech2!=\"--\" ){//FECHA INICIAL Y FECHA FINAL\n $where=\"AND CPC_FechaRegistro >= '\" . $fech1 . \"' AND CPC_FechaRegistro <= '\" . $fech2 . \"'\";\n }\n \n \n //------------\n\n \n $wheretdoc= \"\";\n if($tipodocumento !=\"--\")\n $wheretdoc= \" AND CPC_TipoDocumento='\".$tipodocumento.\"' \";\n\n \n\n $sql = \" SELECT com.*,CONCAT(pe.PERSC_Nombre , ' ', pe.PERSC_ApellidoPaterno, ' ', pe.PERSC_ApellidoMaterno) as nombre , MONED_Simbolo from cji_comprobante com\n inner join cji_cliente cl on cl.CLIP_Codigo = com.CLIP_Codigo\n inner join cji_persona pe on pe.PERSP_Codigo = cl.PERSP_Codigo\n inner JOIN cji_moneda m ON m.MONED_Codigo=com.MONED_Codigo \n WHERE CPC_TipoOperacion='V' \".$wheretdoc.$where.\"\n \n UNION \n SELECT com.* ,EMPRC_RazonSocial as nombre ,MONED_Simbolo from cji_comprobante com\n inner join cji_cliente cl on cl.CLIP_Codigo = com.CLIP_Codigo\n inner join cji_empresa es on es.EMPRP_Codigo = cl.EMPRP_Codigo\n inner JOIN cji_moneda m ON m.MONED_Codigo = com.MONED_Codigo \n WHERE CPC_TipoOperacion='V' \".$wheretdoc.$where.\"\";\n\n //echo $sql;\n $query = $this->db->query($sql);\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }", "function buscarPorTitulo( $arraySearch ){\n \n\t\t$searchQuery = \"SELECT *, genero_id as genero FROM articulo WHERE 1 \";\n\t\tforeach($arraySearch as $param){\n\t\t\t$searchQuery = $searchQuery . \" AND titulo LIKE '%$param%'\";\n\t\t}\n\t\treturn ejecutarConsulta( $searchQuery );\n }", "function SearchallPersonnalManga($context) {\n\t$validator = new MnValidator();\n\t$validator->addRule(\"id\", MnValidatorRule::requiredString());\n\t$validator->validate($context->params);\n\t$user_info = $validator->getValidatedValues();\n\t\n\t$values = [];\n\t\n\t$db = GetDBConnection();\n\t\t// recupere les id des mangas\n\t\t$main_query = $db->prepare(\"SELECT * FROM user_has_manga WHERE user_id = :id\");\n\t\t$main_query->execute($user_info);\n\n\t\t// recupere les données des mangas\n\t\twhile($data_user = $main_query->fetch(PDO::FETCH_ASSOC)){\n\n\t\t\t$query = $db->prepare(\"SELECT * FROM manga WHERE id = ?\");\n\t\t\t$query->bindParam(1, $data_user[\"manga_id\"], PDO::PARAM_INT);\n\t\t\t$query->execute();\n\t\t\t$data = $query->fetch(PDO::FETCH_ASSOC);\n\n\t\t\tif(!$data)\n\t\t\t\treturn [];\n\n\t\t\t$data['user_info'] = $data_user;\n\t\t\t\n\t\t\t// recupere genre\n\t\t\t$query = $db->prepare(\"SELECT genre.name FROM genre JOIN genre_has_manga\n\t\t\t\t\t\t\t\t WHERE genre_has_manga.manga_id = ? AND genre_has_manga.genre_id = genre.id\");\n\t\t\t$query->execute([$data['id']]);\n\t\t\t$data['genres'] = $query->fetchAll(PDO::FETCH_COLUMN, 0);\n\t\t\t// recupere auteurs\n\t\t\t$query = $db->prepare(\"SELECT author.name FROM author JOIN author_has_manga\n\t\t\t\t\t\t\t\t WHERE author_has_manga.manga_id = ? AND author_has_manga.author_id = author.id\");\n\t\t\t$query->execute([$data['id']]);\n\t\t\t$data['authors'] = $query->fetchAll(PDO::FETCH_COLUMN, 0);\n\t\t\t\n\t\t\t$query = $db->prepare(\"SELECT manga_chapter.id, manga_chapter.title FROM manga_chapter \n\t\t\t\t\t\t\t\t WHERE manga_chapter.manga_id = ?\");\n\t\t\t$query->execute([$data['id']]);\n\t\t\t$data['chapters'] = $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\n\t\t\t\n\t\t\t$values[] = MnManga::initFrom($data);\n\t\t}\n\t\t\n\t\treturn $values ;\n}" ]
[ "0.6317013", "0.61447245", "0.61123353", "0.5901632", "0.58122194", "0.5747595", "0.55981326", "0.55937076", "0.5572654", "0.5549881", "0.55198115", "0.54258215", "0.54028803", "0.53731406", "0.535528", "0.53398883", "0.53168947", "0.53060025", "0.52886117", "0.5263095", "0.52516353", "0.52306914", "0.5230075", "0.52295786", "0.52273816", "0.5225485", "0.5203621", "0.5189874", "0.5185393", "0.5176653" ]
0.6732638
0
check if photo_aption is not empty. if not empty then set it.
private function _set_photo_caption($value){ if(!empty($value)){ $this->_photo_caption = $value; }else{ throw new Exception("photo_caption must be a nonempty string"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPhotoDefault()\n {\n return empty($this->attributes['photo'])?? false;\n }", "private function validatePhoto()\n {\n if (empty($this->photo['name'])) {\n $this->updateEditProfile();\n } else {\n $formatNamePhoto = new \\Module\\administrative\\Models\\helper\\AdmsFormatCharacter();\n $this->dados['imagem'] = $formatNamePhoto->formatCharacters($this->photo['name']);\n $uploadImg = new \\Module\\administrative\\Models\\helper\\AdmsUploadImgRed();\n $uploadImg->uploadImd(\n $this->photo,\n 'assets/image/user/' . $_SESSION['userId'] . '/',\n $this->dados['imagem'],\n 150,\n 150\n );\n if ($uploadImg->getResult()) {\n $deleteImg = new \\Module\\administrative\\Models\\helper\\AdmsDeleteImg();\n $deleteImg->deleteImage('assets/image/user/' \n . $_SESSION['userId'] . '/' . $this->imgageOld);\n $this->updateEditProfile();\n } else {\n $this->result = false;\n }\n }\n }", "public function hasPhoto(){\n\t\treturn ($this->photo != \"\");\n\t}", "public function setPhotoAttribute($photo)\n {\n if($photo === '') {\n return;\n }\n $this->attributes['photo'] = $photo;\n }", "public function setPhoto($photo)\n {\n if ($photo !== '') {\n $this->_photo = isset($photo) ? htmlspecialchars($photo) : $photo;\n } else {\n throw new Exception('Photo can be null but not empty');\n }\n }", "public function removePhoto($value)\n {\n if($value == 'photo0')\n return $this->photo0 = '';\n if($value == 'photo1')\n return $this->photo1='';\n if($value == 'photo2')\n return $this->photo2='';\n if($value == 'photo3')\n return $this->photo3 = '';\n if($value == 'photo4')\n return $this->photo4='';\n if($value == 'photo5')\n return $this->photo5='';\n\n }", "private function _handleDefaultValues()\n {\n if ($this->mimeType === \"\") {\n $this->mimeType = \"image/\";\n }\n }", "public function setFeaturedImage()\n {\n\n $featuredImage = get_post_custom_values( 'no_featured_image', get_the_id() );\n if (empty($featuredImage[0]) ){\n\n }\n }", "function wponion_field_image_select_sanitize( $value ) {\n\t\tif ( isset( $value ) && wponion_is_array( $value ) && ! count( $value ) ) {\n\t\t\t$value = $value[0];\n\t\t}\n\t\treturn empty( $value ) ? '' : $value;\n\t}", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "function set_valid_image_data() {\n $base_image = $this->get_config('base_image', false);\n if ($base_image !== false) {\n // Definitely configured\n if ($base_image == '0') {\n // Configured to text-only\n $this->image_name = $base_image;\n } else {\n $imagesize = serendipity_getimagesize(dirname(__FILE__) . \"/img/\" . $base_image);\n if ($imagesize['noimage']) {\n // Leave as default\n } else {\n // Set to valid image name\n $this->image_name = $base_image;\n }\n }\n }\n // Is the (possibly default) image valid?\n if ($this->image_name) {\n $imagesize = serendipity_getimagesize(dirname(__FILE__) . \"/img/\" . $this->image_name);\n if (isset($imagesize['noimage']) && $imagesize['noimage']) {\n // No valid image; use text-only\n $this->image_name = '0';\n } else {\n // Valid graphical image; set the dimensions, too\n $this->image_width = $imagesize[0];\n $this->image_height = $imagesize[1];\n }\n }\n }", "public function setHasPhotoAttribute($has_photo)\n {\n $this->attributes['has_photo'] = $has_photo == 1 || $has_photo === 'true' || $has_photo === true ? true : false;\n }", "protected function validatePhoto(){\n\n $extension = $this->type;\n\n if( !empty($extension)){\n if($extension != 'image/jpeg' && $extension != 'image/png' && $extension != 'image/jpg'){\n $this->errors_on_upload[] = \"Your file should be .jpeg, .jpg or .png\";\n }\n }\n\n if($this->size > Config::MAX_FILE_SIZE){\n $this->errors_on_upload[] = \"Your picture shouldn't be more than 10 Mb\";\n }\n\n if($this->error != 0 && $this->error != 4) { //0 means no error, so if otherwise, display a respective message, 4 no files to upload, we allow that\n $this->errors_on_upload[] = $this->upload_errors_array[$this->error];\n }\n\n }", "public function set(Photo $photo)\n\t{\n\t\t$this->photo_id = $photo->id;\n\t\t$this->timestamps = false;\n\t\t// we set up the created_at\n\t\t$now = now();\n\t\t$this->created_at = $now;\n\t\t$this->updated_at = $now;\n\n\t\tforeach (self::VARIANT_2_INDICATOR_FIELD as $variant => $indicator_field) {\n\t\t\tif ($photo->{$indicator_field} !== null && $photo->{$indicator_field} !== 0 && $photo->{$indicator_field} !== '') {\n\t\t\t\t$this->create($photo, $variant, strval($now));\n\t\t\t}\n\t\t}\n\t}", "protected function checkThumbSizeSettings()\n {\n\n if ($this->gc_size_albumlisting == \"\")\n {\n $this->gc_size_albumlisting = serialize(array(\"110\", \"110\", \"crop\"));\n }\n if ($this->gc_size_detailview == \"\")\n {\n $this->gc_size_detailview = serialize(array(\"110\", \"110\", \"crop\"));\n }\n }", "public function getPhoto():?string\n {\n return $this->photo;\n }", "public function getPhotoAttribute()\n {\n return empty($this->attributes['photo'])? \"/images/admin.jpg\" : $this->attributes['photo'];\n }", "public function setPhotos($value)\n {\n $this->photos = $value;\n }", "protected function prepareGalleryData() {}", "function checkCaption(& $message) {\r\n //Checks if image caption is empty.\r\n if(!empty($message -> caption)) {\r\n $caption = $message -> caption;\r\n if(strpos($caption, $imageFlag) !== FALSE) {\r\n //Caption contains flag, image is rejected.\r\n return FALSE;\r\n } else {\r\n //Caption does not contain flag, image is accepted.\r\n return TRUE;\r\n }\r\n } else {\r\n //Caption is empty, therefore image is accepted.\r\n return TRUE;\r\n }\r\n }", "public function prepareForValidation()\n {\n if (is_string($this->images)) {\n $this->merge([\n 'images' => json_decode($this->images, true),\n ]);\n }\n }", "private function _populatePromotorMetaEmpty()\n {\n return $this->promotor_meta->set(\n $this->promotorNewsEmptyData['promotor_ID'], \n $this->promotorNewsEmptyData['name'], \n $this->promotorNewsEmptyData['content']\n );\n }", "public function getPhotoAttribute()\n {\n return (is_null($this->getAttributes()[\"photo\"]) || $this->getAttributes()[\"photo\"]==\"-\")? asset('images/default/no_user.png') : $this->getAttributes()[\"photo\"];\n }", "public static function set_image_size() {\n $size = get_option( 'yith_woocompare_image_size' );\n\n if( ! $size ) {\n return;\n }\n\n $size['crop'] = isset( $size['crop'] ) ? true : false;\n add_image_size( 'yith-woocompare-image', $size['width'], $size['height'], $size['crop'] );\n }", "protected static function isEmptyFileUpload($value) {\n return (\n isset($value['name']) && '' === $value['name'] &&\n isset($value['type']) && '' === $value['type'] &&\n isset($value['tmp_name']) && '' === $value['tmp_name'] &&\n isset($value['error']) && UPLOAD_ERR_NO_FILE === $value['error'] &&\n isset($value['size']) && 0 === $value['size']\n );\n }", "public function testIsEmpty()\n {\n $value = new UploadValueStructure();\n $this->assertTrue($this->uut->setValue($value)->isEmpty());\n $this->assertFalse($this->uut->setValue($value->setError(UPLOAD_ERR_OK))->isEmpty());\n $this->assertFalse($this->uut->setValue($value->setError(UPLOAD_ERR_EXTENSION))->isEmpty());\n }", "public function getHasPhotoAttribute($has_photo)\n {\n return $has_photo == 1 ? true : false;\n }", "function Flipbox_Save_description( $post_id ) \n{\n // Save logic goes here. Don't forget to include nonce checks!\n $image_url = isset($_POST['image_url'])?trim($_POST['image_url']): \"\";\n $description = isset($_POST['description'])?trim($_POST['description']): \"\";\n $transition = isset($_POST['transition'])?trim($_POST['transition']): \"\";\n \n\n\n if (!empty($image_url) && ! empty($description)) {\n\n update_post_meta($post_id, 'image_url_value', $image_url);\n update_post_meta($post_id, 'description_value', $description);\n update_post_meta($post_id, 'transition_value', $transition);\n }\n}", "protected function _getNoPhotoData() {\n\t\treturn $this->_noPhotoData;\n\t}", "public function getPhoto(): ?string\n {\n return $this->photo ?? null;\n }" ]
[ "0.5864399", "0.5805861", "0.57632196", "0.56247294", "0.5615469", "0.5354115", "0.53522384", "0.53366464", "0.5302521", "0.53019744", "0.5293829", "0.52213436", "0.5205126", "0.51489395", "0.5128759", "0.50837284", "0.50812584", "0.50206184", "0.49780643", "0.49596924", "0.49408782", "0.49326774", "0.49187782", "0.49172023", "0.4917019", "0.49098712", "0.49083093", "0.48890242", "0.48807338", "0.48707396" ]
0.6536445
0
function to add photo to database
private function _add_photo(){ global $db; $photo_name = $db->quote($this->_photo_name); $photo_caption = $db->quote($this->_photo_caption); $file_name = $db->quote($this->_file_name); $file_type = $db->quote($this->_file_type); $sql = "SELECT * FROM photos WHERE file_name = ".$file_name." LIMIT 1"; // if photo with file name $file_name is not present in database, insert into database if(!$db->query1($sql)->rowCount()){ $sql = "INSERT INTO photos ("; $sql .= "photo_name, photo_caption, file_name, file_size, file_type, user_id"; $sql .= ") VALUES ( "; $sql .= $photo_name .", ". $photo_caption .", ". $file_name.", ". $this->_file_size .", ". $file_type."," .$this->_user_id; $sql .= ")"; try { //adding photo to db $db->exec($sql); return "Photo with name ".$photo_name." added, query Successful."; } catch (Exception $e) { throw $e; } } else{ throw new Exception("The file name ".$file_name. " alrady exists"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertImageToDb() \n {\n }", "function addPhotoToDatabase($photo) {\n global $db_dsn, $db_username, $db_password;\n\n $date = date('d-m-Y');\n $albumName = getCategoryAlbumNames()[1];\n\n $dbh = new PDO($db_dsn, $db_username, $db_password);\n $sql = \"INSERT INTO photos (photo_name, photo_album, date_of_creation) \"\n . \"VALUES ('$photo', '$albumName', '$date')\";\n $q = $dbh->prepare($sql);\n $q->execute();\n}", "public function upload_photo(){\n $sql=\"INSERT INTO photos \";\n $sql.=\"(name,size,type,date,img_navigacija_id) VALUES ('{$this->name}',$this->size,'{$this->type}',NOW(),2)\";\n self::$connect->query($sql);\n\n\n }", "function insert(){\n extract($_POST);\n \n $fname = $_FILES['photo']['name'];\n $tmp_name = $_FILES['photo']['tmp_name'];\n (move_uploaded_file($tmp_name, \"img/$fname\"));\n \n $con = getConnection() ;\n $stmt = $con->prepare(\"insert into \n user(name , emailid , password , mobilenumber , dob , address , photo) \n values (?,?,?,?,?,?,?)\");\n \n $stmt->bind_param(\"sssssss\", $na , $em , $pass , $mob , $dob , $add, $photo);\n $na = $name;\n $em = $emailid;\n $pass = md5($password);\n $mob = $mobilenumber;\n $dob = $dob;\n $add = $address;\n $photo = $fname;\n \n $stmt->execute() or die(mysqli_error($con));\n \n}", "function addData($conn){\n $sql=\"INSERT INTO student (studentName, bithDate,address,photoName)\n VALUES ('\".$_POST['studentName'].\"', '\".$_POST['birthDate'].\"', '\".$_POST['address'].\"','photos/\".$_FILES['photo']['name'].\"')\";\n if (mysqli_query($conn, $sql)) {\n echo \"<h3>Create Student Successfully</h3>\";\n uploadPhoto();\n } else {\n echo \"Error: \" . $sql . \"<br>\" . mysqli_error($conn);\n }\n}", "public static function addImg($myId){\n if ($_FILES[\"pic\"][\"error\"] > 0) {\n echo \"Return Code: \" . $_FILES[\"pic\"][\"error\"] . \"<br>\";\n } else {\n$conn = init_db();\n$url = uniqid();\n$sql='insert into images (u_id, url, ups) values ('.$myId.', \\''.$url.'.jpg\\', 0)';\n$res = mysqli_query($conn,$sql) or die(mysqli_error($conn).'failed query:'.__LINE__);\n$dest = __DIR__.\"/../img/usr/\" . $url.'.jpg';\necho 'moved to '.$dest;\nmove_uploaded_file($_FILES[\"pic\"][\"tmp_name\"],\n $dest);\n}\n}", "function addToDB($image, $title, $description, $privacy, $tags) {\r\n\t// if ( mysqli_connect_errno()) {\r\n\t\t// die( mysqli_connect_error());\r\n\t// } \r\ntry {\r\n\t\t$conn = new PDO(DBCONNSTRING, DBUSER, DBPASS);\r\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t$datetime = date(\"Y-m-d H:i:s\");\r\n\t$title2 = addslashes($title);\r\n\t$user = $_SESSION['userID'];\r\n\t$image = \"UPLOADS/\" . $image;\r\n\t/////////////////////////////////////////////////////////////////////\r\n\t// $sql1 = \"INSERT INTO `image`(`ImageID`, `UID`, `Path`, `Title`, `Description`, `Likes`, `Dislikes`, `ViewCount`, `Privacy`, `Date`) \r\n\t\t\t\t// VALUES('0', '\" . $user . \"', 'UPLOADS/\" . $image . \"', '\" . $title2 . \"', '\" . $description . \"', '0', '0', '0', \r\n\t\t\t\t\t\t\t// '\" . $privacy . \"', '\" . $datetime . \"')\";\r\n\t\r\n\t$sql1 = \"INSERT INTO `image`(`UID`, `Path`, `Title`, `Description`, `Likes`, `Dislikes`, `ViewCount`, `Privacy`, `Date`) \r\n\t\t\t\tVALUES(:UID, :Path, :Title, :Description, :Likes, :Dislikes, :ViewCount, :Privacy, :Date)\";\r\n\t$stmt = $conn->prepare($sql1);\r\n\t\t$likes = 0;\r\n\t\t$dislikes = 0;\r\n\t\t$views = 0;\r\n\t\t\r\n\t\t\r\n\t\t$stmt->bindParam(\":UID\", $user);\r\n\t\t$stmt->bindParam(\":Path\", $image);\r\n\t\t$stmt->bindParam(\":Title\", $title2);\r\n\t\t$stmt->bindParam(\":Description\", $description);\r\n\t\t$stmt->bindParam(\":Likes\", $likes);\r\n\t\t$stmt->bindParam(\":Dislikes\", $dislikes);\r\n\t\t$stmt->bindParam(\":ViewCount\", $views);\r\n\t\t$stmt->bindParam(\":Privacy\", $privacy);\r\n\t\t$stmt->bindParam(\":Date\", $datetime);\r\n\t\t$stmt->execute();\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t// if ($conn->query($sql1) === TRUE) {\r\n\t\t// echo \"New record created successfully <br>\";\r\n\t// } else {\r\n\t\t// echo \"Error: \" . $sql1 . \"<br>\" . $conn->error . \"<br>\";\r\n\t// }\r\n\t\r\n\t/////////////////////////////////////////////////////////////////////////\r\n\tfor ($i = 0; $i < count($tags); $i++) {\r\n\t// $sql2 = \"INSERT INTO tags (Tag) SELECT * FROM (SELECT '\" . $tags[$i] . \"') AS tmp \r\n\t\t\t// WHERE NOT EXISTS ( SELECT Tag FROM tags WHERE Tag = '\" . $tags[$i] . \"' ) LIMIT 1\";\r\n\t\t\t\r\n\t$sql2 = \"INSERT INTO tags (Tag) SELECT * FROM (SELECT :Tag) AS tmp \r\n\t\t\tWHERE NOT EXISTS ( SELECT Tag FROM tags WHERE Tag = :Tag) LIMIT 1\";\r\n\t$stmt = $conn->prepare($sql2);\t\r\n\t$stmt->bindParam(\":Tag\", $tags[$i]);\t\r\n\t$stmt->execute();\t\r\n\t\t\t\t\t\r\n\t// if ($conn->query($sql2) === TRUE) {\r\n\t\t// echo \"New record created successfully <br>\";\r\n\t// } else {\r\n\t\t// echo \"Error: \" . $sql2 . \"<br>\" . $conn->error . \"<br>\";\r\n\t// }\r\n\t\r\n\t/////////////////////////////////////////////////////////////////////////////////\r\n\t// $sql3 = \"INSERT INTO `imagetags`(`ImageTagID`, `ImageID`, `TagID`)\r\n\t\t\t\t\t// VALUES('0', (SELECT MAX(imageid) from `image`), (select tagID from `tags` where tag = '\" . $tags[$i] . \"'))\";\r\n\t\t\t\t\t\r\n\t$sql3 = \"INSERT INTO `imagetags`(`ImageID`, `TagID`)\r\n\t\t\t\t\tVALUES((SELECT MAX(imageid) from `image`), (select tagID from `tags` where tag = :Tag))\";\r\n\t$stmt = $conn->prepare($sql3);\t\r\n\t$stmt->bindParam(\":Tag\", $tags[$i]);\t\r\n\t$stmt->execute();\t\t\t\t\r\n\t// if ($conn->query($sql3) === TRUE) {\r\n\t\t// echo \"New record created successfully\";\r\n\t// } else {\r\n\t\t// echo \"Error: \" . $sql3 . \"<br>\" . $conn->error;\r\n\t// } \r\n\t\r\n\t\r\n\t}\r\n\t\t\t\t\t\t\t\r\n\t}\r\ncatch(PDOException $e)\r\n {\r\n echo \"Error: \" . $e->getMessage();\r\n }\t\r\n\t\r\n\t$conn = null;\r\n\t\r\n}", "function addImages($imgName)\n {\n $username = \"root\";\n $password = \"root\";\n $url = \"localhost:3306\";\n $conn = new mysqli($url, $username, $password, \"eten\");\n if ($conn->connect_error) {\n echo \"<script>alert('数据库链接失败')</script>\";\n }\n $imgPath = \"image/gallery/\" . $imgName;\n $conn = new mysqli($url, $username, $password, \"eten\");\n $saveSQL = \"insert into gallery(gallery_name, gallery_uri) VALUES ('\" . $imgName . \"','\" . $imgPath . \"')\";\n if ($conn->query($saveSQL)) {\n echo \"<br>保存成功\";\n }\n $conn->close();\n }", "public function insert_photo($AlbumID, $LocationID, $MemberID, $Title, $Description, $Privacy, $ImagenPath){\n\t\t$query= \"INSERT INTO photo(ID, AlbumID, LocationID, MemberID, Title, Description, Privacy, UploadDate, View, ImagenPath) VALUES (NULL,:AlbumID,:LocationID,:MemberID,:Title,:Description,:Privacy,now(),1,:ImagenPath)\";\t\t\n\t\t$statement= $this->conexion->prepare($query);\t\t\t\t\n\t\t$statement->bindParam(':AlbumID',$AlbumID);\n\t\t$statement->bindParam(':LocationID',$LocationID);\n\t\t$statement->bindParam(':MemberID',$MemberID);\n\t\t$statement->bindParam(':Title',$Title);\n\t\t$statement->bindParam(':Description',$Description);\n\t\t$statement->bindParam(':Privacy',$Privacy);\n\t\t$statement->bindParam(':ImagenPath',$ImagenPath);\t\t\n\t\treturn $statement->execute();\t\t\t\n\t}", "function addImage($imagename){\n\t$table = 'stjohn_image';\n\t// $imagename = $_POST['imagename'];\n\n\t$image = array('imagename'=>\"'$imagename'\");\n\n\t$keys = array_keys($_POST);\n\n\t$image['mid'] = $_SESSION['mid'];\n\t\n\tif(in_array('did', $keys)){\n\t\t$image['did'] = $_POST['did'];\n\t}\n\tif(in_array('abid', $keys)){\n\t\t$image['abid'] = $_POST['abid'];\n\t}\n\tif(in_array('meetid', $keys)){\n\t\t$image['meetid'] = $_POST['meetid'];\n\t}\n\n\t// print_r($image);\n\t// echo \"<br/>\\n\";\n\n\treturn insert($table, $image);\n}", "public function save(Photo $photo);", "public function addPhoto($idMember, $title, $description, $url, $lat, $lng, $status){\n $sql = 'INSERT INTO photos(memberId, name, description, url, lat, lng, status, date_added) VALUES(?, ?, ?, ?, ?, ?, ?, NOW())';\n $this->executeQuery($sql, array($idMember, $title, $description, $url, $lat, $lng, $status));\n }", "public function addDB()\n {\n $titre = $_POST['titre'];\n $description = $_POST['descrip'];\n $category = $_POST['categorie'];\n if (empty($category)) {\n $category = NULL;\n }\n $photo = \"undifine.jpg\";\n\n if (isset($_FILES['photo']) && !empty($_FILES['photo'])) {\n $emplacement_temporaire = $_FILES['photo']['tmp_name'];\n $nom_fichier = $_FILES['photo']['name'];\n // $emplacement_destination = 'C:\\wamp64\\www\\MVC\\exemples\\crudComplet\\img\\\\'. $nom_fichier;\n $emplacement_destination = 'img/' . $nom_fichier;\n // var_dump($emplacement_temporaire);\n // var_dump($emplacement_destination);\n\n $result = move_uploaded_file($emplacement_temporaire, $emplacement_destination);\n if ($result) {\n $photo = $nom_fichier;\n // $photo = 'C:\\wamp64\\www\\MVC\\exemples\\crudComplet\\img\\\\'. $nom_fichier;\n }\n }\n $requete = $this->connexion->prepare(\"INSERT INTO `news`(`id`, `titre`,`photo`, `description`,`category`)\n VALUES (NULL, :titre,:photo, :description, :category)\");\n $requete->bindParam(':titre', $titre);\n $requete->bindParam(':photo', $photo);\n $requete->bindParam(':description', $description);\n $requete->bindParam(':category', $category);\n $resultat = $requete->execute();\n }", "function addToDB($actualname,$name,$rating,$url){\n $db = new ImageDB();\n if(!$db){\n return \"Error creating database class\";\n }\n $res = $db->addImage($actualname,$name,$rating,$url);//TODO: Change to identified name \n $db->close();\n return $res;\n}", "public function add_image() {\n\t $this->use_layout=false;\n\t $this->page = new $this->model_class(Request::get('id'));\n\t\t$this->join_name = \"images\";\n\t if(Request::post(\"id\")) {\n\t\t $this->image = new WildfireFile(Request::post('id'));\n\t\t $this->image->join_order = Request::post('order');\n\t\t $this->page->images = $this->image;\n\t }\n\t}", "public function addImage($img_name){\n\t\t\n\t\t$db = $this->_connect;\n\t\t$img = $db->prepare(\"INSERT INTO img(id,img_name) VALUES( NULL,? )\");\n\t\t$img->bind_param(\"s\",$img_name);\n\t\tif(!$img->execute()){\n\t\t\techo $db->error;\n\t\t}\n\t\n\t}", "public function add_image_post() {\n $itemId = $this->input->post('item_id');\n $uploadResult= $this->upload();\n if ($uploadResult['upload'] === 'ok') {\n $fileData = $uploadResult['fileData'];\n $updatePayload = array(\n 'photo' => $fileData['file_name']\n );\n $res = $this->model->update($itemId, $updatePayload);\n return $this->response(\n array(\n \"status\" => \"ok\",\n \"result\" => $res\n ),\n parent::HTTP_ACCEPTED\n );\n\n }else{\n return $this->response(\n array( 'status' => 'UPLOADING FAILED', \n 'code' => '200', \n 'message' => $uploadResult['err']), \n parent::HTTP_BAD_GATEWAY );\n }\n }", "public function add($title, $description, $cdate, $location, $postcode, $file, $user_id){\n $folder = $_SERVER['DOCUMENT_ROOT'] . '/uploads/';\n // remove all spaces from name\n $file[\"name\"] = str_replace(' ', '', $file[\"name\"]);\n $upload_image = $folder . basename($file[\"name\"]);\n if (move_uploaded_file($file[\"tmp_name\"], $upload_image)){\n // VALIDATION: check if conference name already exists\n $pdo = $this->db->prepare(\"SELECT conference_title FROM conferences WHERE conference_title = :title\");\n $pdo->bindParam(':title', $title);\n $pdo->execute();\n\n if($pdo->rowCount() > 0){\n return 'exists';\n } else {\n // INSERT into db\n try{\n $query = \"INSERT INTO conferences (\n conference_title,\n conference_description,\n conference_date,\n conference_location,\n conference_postcode,\n conference_img,\n user_id\n ) VALUES (:title, :description, :cdate, :location, :postcode, :img, :user_id)\";\n\n $pdo = $this->db->prepare($query);\n\n $pdo->bindParam(\":title\", $title);\n $pdo->bindParam(\":description\", $description);\n $pdo->bindParam(\":cdate\", $cdate, PDO::PARAM_STR);\n $pdo->bindParam(\":location\", $location);\n $pdo->bindParam(\":postcode\", $postcode);\n $pdo->bindParam(\":img\", $file[\"name\"]);\n $pdo->bindParam(\":user_id\", $user_id);\n\n $pdo->execute();\n\n } catch(Exception $e) {\n die($e);\n //return 'photo';\n }\n // return lastId\n return $this->db->lastInsertId();\n }\n } else {\n return 'photo';\n }\n }", "private function addImage($data)\n\t{\n//\t\t\t\t\t\t\"date\"\t\t=> $data['date'],\n//\t\t\t\t\t\t\"time\"\t\t=> $data['time'],\n//\t\t\t\t\t\t\"createdBy\"\t=> $this->session->userdata('id'));\n\t\t$this->db->delete(\"user_journal_images\", array(\t\"utID\"\t\t=> $data['utID'],\t// delete any current image\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"date\"\t\t=> $data['date'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"time\"\t\t=> $data['time'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdBy\"\t=> $this->session->userdata('id')));\n\n\t\t$data['createdBy']\t= $this->session->userdata('id');\n\t\t$data['createdOn']\t= date(\"Y-m-d H:i:s\");\n\t\t$this->db->insert(\"user_journal_images\", $data);\t\t// insert new image\n\t\t}", "function insert_project_photo($PortID, $photo){\r\n\r\n $conn = db_connect();\r\n\r\n // insert new log entry\r\n $query = \"insert into PortfolioPictures values\r\n ('\".$PortID.\"', '\".$photo.\"')\";\r\n\r\n $result = $conn->query($query);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "public function store_in_database(){\n\tif(isset($_POST['submit'])){\n\t\t$image_path = $_POST['path'];\n\t\tupdate_option('pochomaps_map_image', $image_path);\n\t}\n}", "public function image_insert($pic){\n if($pic != \"\"){\n\t\t\t\t\n\t\t\t\t$r = rand('1111','9999');\n\t\t\t\t$n = \"$r.jpg\";\n\t\t\t\t\n\t\t\t\t$filePath = \"../uploaded/$n\";\n\t\t\t\t\n if(move_uploaded_file($pic, $filePath)) {\n\t\t\t\t\t\n\t\t\t\t\t$res = $this->con()->query(\"SELECT MAX(id) as maxid FROM book\");\n\t\t\t\t\t\n\t\t\t\t\t$row= $res->fetch_assoc();\n\t\t\t\t\t$c = $row['maxid'];\n\t\t\t\t\t\n\t\t\t\t\t$res = $this->con()->query(\"SELECT id FROM book where id='$c'\");\n\t\t\t\t\t$rows = $res->fetch_assoc();\n\t\t\t\t\t$pcode = $rows['id'];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$resultt = $this->con()->query(\"INSERT INTO image_product(product_id,photo)VALUES('$pcode','$n')\");\n\t\t\t\t\treturn $resultt;\n\n\t\t\t\t\t\n \n\t\t\t}\n\t\t\t\n\t\t }\n\t\t}", "public function addPhoto($paramsPhoto)\n {\n return DB::table('photos')->insert(\n [\n 'photos_link' => trim(strip_tags($paramsPhoto['link'])),\n 'album_id' => trim(strip_tags($paramsPhoto['albumId'])),\n ]\n ); }", "public function addPhoto($file){\r\n\t\t$XMLObject = $this->getXMLObject();\r\n\t\tif($uid = $this->access->getUserId()){\r\n\t\t\t$img = new Image($file);\r\n\t\t\tif($img->isImage()){\r\n\t\t\t\t$w = $img->getWidth();\r\n\t\t\t\t$h = $img->getHeight();\r\n\t\t\t\t$d = $img->getDimensions($w, $h);\r\n\t\t\t\t$query = 'INSERT INTO blog_photos (user_id, width, height) VALUES ('.(int)$uid.', '.$d['width'].', '.$d['height'].')';\r\n\t\t\t\tif(DB::query($query)){\r\n\t\t\t\t\t$bln_success = FALSE;\r\n\t\t\t\t\t$pid = DB::insertId();\r\n\t\t\t\t\t//create image:\r\n\t\t\t\t\tif($img->output(MAX_PHOTO_WIDTH_THUMB, MAX_PHOTO_WIDTH_THUMB, Utils::getPhotoPath($uid,$pid,'thumb','blog'))){//Thumb\r\n\t\t\t\t\t\tif($img->output(MAX_PHOTO_WIDTH_MEDIUM, MAX_PHOTO_HEIGHT_MEDIUM, Utils::getPhotoPath($uid,$pid,'medium','blog'))){//Medium\r\n\t\t\t\t\t\t\tif($img->output(MAX_PHOTO_WIDTH_LARGE, MAX_PHOTO_HEIGHT_LARGE, Utils::getPhotoPath($uid,$pid,'large','blog'))){//Large\t\r\n\t\t\t\t\t\t\t\t$bln_success = TRUE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!$bln_success){\r\n\t\t\t\t\t\t$this->removePhoto($pid);\r\n\t\t\t\t\t\tparent::throwError($img->errorNo, $img->errorMessage);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else $this->throwError(7);\r\n\t\t\t}else parent::throwError($img->errorNo, $img->errorMessage);\r\n\t\t\t$img->destroy();\r\n\t\t}else $this->throwError(10);\r\n\t\treturn $XMLObject;\r\n\t}", "public function add_pic() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['add_pic']) && !empty($_POST['add_pic'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if ($this->_model->addPicture($_POST['picture'])) {\n $this->_model->setFlash(\"add_success\", \"Photo ajoutée avec succès!\");\n $this->redirect(\"/montage\");\n }\n }\n }\n $this->_model->setFlash(\"add_error\", \"Erreur lors de l'ajout de votre photo!\");\n $this->redirect(\"/montage\");\n }", "public function addPhotoAction(){\n $data = $this->getRequestData();\n $types = array('activity', 'operation', 'people');\n if(isset($data['photo']['name']) && isset($data['photo']['content']) && isset($data['type']) && in_array($data['type'], $types)){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $folder = Asset_Folder::getByPath('/images/'.$data['type'].'/'.$user->getKey().'-'.$data['type']);\n if (!$folder) {\n switch($data['type']){\n case 'activity':\n $fid = 3;\n break;\n case 'operation':\n $fid = 4;\n break;\n case 'people':\n $fid = 7;\n break;\n }\n $folder = new Object_Folder();\n $folder->setKey($user->getKey() . \"-\" . $data['type']);\n $folder->setParentId($fid);\n $folder->save();\n }\n\n $asset = new Asset_Image();\n $asset->setCreationDate(time());\n $asset->setUserOwner(1);\n $asset->setUserModification(1);\n $asset->setParentId($folder->getId());\n $asset->setFilename(Pimcore_File::getValidFilename($data['name'] . \"-\" . time()));\n $asset->setData(base64_decode($data['content']));\n if(!$asset->save()){\n $this->setErrorResponse('cannot save photo!');\n }\n } else {\n $this->setErrorResponse('photo and type is mandatory for this request!');\n }\n\n $this->_helper->json(array('photo' => $asset->getId()));\n }", "function add_user() {\n if (isset($_POST['add_user'])) {\n $username = escape_string($_POST['username']);\n $email = escape_string($_POST['email']);\n $password = escape_string($_POST['password']);\n // $user_photo = escape_string($_FILES['file']['name']);\n // $photo_temp = escape_string($_FILES['file']['tmp_name']);\n \n move_uploaded_file($photo_temp, UPLOAD_DIRECTORY . DS . $user_photo);\n\n $query = query(\"INSERT INTO users(username, email, password, user_photo) VALUES ('{$username}', '{$email}', '{$password}', '{$user_photo}')\");\n confirm($query);\n set_message(\"USER CREATED\");\n redirect(\"index.php?users\");\n }\n}", "function add_image_to_object($obj_type, $obj_id, $img_id)\n{\n /* $row = db_get_item_by_query('SELECT `order` FROM object_images WHERE obj_type = \"' .\n strtok($obj_type, \" \") . '\" AND obj_id = ' . (int)$obj_id .\n ' ORDER BY `order` DESC');\n\n $last_order = $row['order'] ? $row['order'] : 0;*/\n\n $r= db()->insert('object_images', array(\n 'obj_type' => strtok($obj_type, \" \"),\n 'obj_id' => (int)$obj_id,\n 'img_id' => (int)$img_id));\n return $r;\n}", "public function add(){\n // TODO\n // Validar que sea imagen\n // Validar que solo admins puedan mover esto\n\n // Verificamos que sea un envio por POST\n\t\tif ($this->request->is('post')) {\n $this->Game->create();\n if ($this->Game->saveWithOptionalFile($this->request, $this->Session,\n array(\n 'fileColumnName' => 'thumbnail',\n 'fileInputName' => 'game_logo',\n 'fileOptional' => false,\n )\n )){\n $this->redirect(array('action' => 'index'));\n }\n }\n\t}", "public function addPicture($p_pet_id,$p_path,$p_description){\n $time = time();\n\n //Concat time witht pet ID = pic ID\n $pic_id = $time.\"_\".$p_pet_id;\n\n //Insert into db\n $stmt = $this->adapter->conn->prepare(\n \"INSERT INTO PICTURES\".\n \"(pet_id,pic_path,description,pic_id) \".\n \"VALUES(\".\n \"?,\".\n \"?,\".\n \"?,\".\n \"?);\");\n \n $stmt->bindParam(1,$p_pet_id);\n $stmt->bindParam(2,$p_path);\n $stmt->bindParam(3,$p_description);\n $stmt->bindParam(4,$pic_id);\n\n try{\n $result = $this->adapter->executeUpdatePrepared($stmt);\n }catch(PDOException $e){\n return null;\n }\n\n return $pic_id;\n }" ]
[ "0.7996081", "0.7761006", "0.7526716", "0.73594534", "0.72750264", "0.71354795", "0.7033112", "0.70157284", "0.6984771", "0.69627714", "0.69296217", "0.69194067", "0.6852318", "0.67968094", "0.67841864", "0.6773107", "0.6766703", "0.6765651", "0.6751953", "0.6750948", "0.6750821", "0.67346", "0.6733148", "0.671453", "0.6712285", "0.670717", "0.67028433", "0.66764903", "0.6646991", "0.663" ]
0.8070406
0
function to find a photo using photo_id
public static function find_photo($id){ global $db; $message = null; $sql = "SELECT * FROM photos WHERE photo_id = '".$id."' LIMIT 1"; try { $result = $db->query($sql); $row = $result->fetch(); return $row; } catch (Exception $e) { throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPhoto($photo_id){\n\t\n}", "public function getPhoto($id);", "function getPhotoInfo($photoId);", "public function getPhoto($id)\n {\n $res = $this->db->select(\"SELECT * FROM `{$this->domainPhoto}` WHERE itemName()='{$id}'\", array('ConsistentRead' => 'true'));\n $this->logErrors($res);\n if(isset($res->body->SelectResult->Item))\n return self::normalizePhoto($res->body->SelectResult->Item);\n else\n return false;\n }", "public function getPhoto($id){\n $sql=\"SELECT from_url FROM people WHERE id_people=?\";\n $rs=$this->con->prepare($sql);\n $rs->execute(array($id));\n return $rs->fetch(PDO::FETCH_OBJ);\n }", "public function findPhotoByPid($pid){\n $sql = \"SELECT `favorite`, `pic`, `uid` FROM `photo` WHERE `id` = ?\";\n $res = $this->connect()->prepare($sql);\n $res->bind_param(\"s\", $pid);\n $res->execute();\n $res->bind_result($num, $pic, $uid);\n if($res->fetch()) {\n $photoinfo = new \\stdClass();\n $photoinfo->num = $num;\n $photoinfo->pic = $pic;\n $photoinfo->uid = $uid;\n return $photoinfo;\n }\n return FALSE;\n }", "function getPhoto($photo_id, $secret){\n\n\t\t/* Get Photo */\n\t\t$photo = $this->askFlickr('photos.getInfo','&photo_id='.$photo_id.'&secret='.$secret);\n\n\t\t/* Return Photo */\n\t\treturn $photo;\n\t}", "function getSpecificPhoto($id) {\r\n App::import('Vendor', 'phpFlickr/phpFlickr');\r\n $flickr =& new phpFlickr(Configure::read('Flickr.settings.key'));\r\n return $flickr->photos_getSizes($id);\r\n }", "function getPhotoDetail($photo_id=null){\r\n\t\tif($photo_id==null) return array();\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('id'=>$photo_id));\r\n\t\t$recordSet = $this->db->get(TBL_ALBUM_HAS_PHOTOS);\r\n\t\t$data=$recordSet->result() ;\r\n \t\treturn $data;\r\n\t}", "public function getPhoto($photo_uid) {\r\n\t\t$photo = tx_cwtcommunity_lib_common::dbQuery('SELECT * FROM tx_cwtcommunity_photos p WHERE uid = \"'.intval($photo_uid).'\" AND NOT deleted = \"1\" AND NOT hidden = 1;');\r\n\t\treturn $photo[0];\r\n\t}", "public function findPhotoByUid($uid){\n $sql = \"SELECT `id` FROM `photo` WHERE `uid` = ?\";\n $res = $this->connect()->prepare($sql);\n $res->bind_param(\"s\", $uid);\n $res->execute();\n $res->bind_result($pid);\n if($res->fetch()) {\n return $pid;\n }\n return FALSE;\n }", "public function getPictureById($id)\n\t{\n\t\t$sql = \"SELECT id,file FROM photo WHERE id=:id LIMIT 1\";\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute(array(\":id\"=>$id));\n\t\treturn $query->fetchAll();\n\t}", "public function photoShow($id)\n {\n //\n }", "protected function getImageWithId($id){\n $conn = static::connect();\n $stmt = $conn->prepare(\"SELECT * FROM images where id=:id\");\n $stmt->bindValue('id', $id, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function single($photo_id) {\n\t\t$params = array(\n\t\t\t'api_key'\t=> $this->api_key,\n\t\t\t'method'\t=> 'flickr.photos.getSizes',\n\t\t\t'photo_id'\t=> $id,\n\t\t\t'format'\t=> 'php_serial',\n\t\t);\n\t\t\n\t\t$encoded_params = array();\n\t\t\n\t\tforeach ($params as $k => $v){\n\t\t\t$encoded_params[] = urlencode($k).'='.urlencode($v);\n\t\t}\n\t\t\n\t\t$res = curl_init($this->url.implode('&', $encoded_params));\n\t\t\n\t\tcurl_setopt($res, CURLOPT_RETURNTRANSFER, true);\n\t\t\n\t\treturn $response = curl_exec($res);\n\t}", "public function getPhotoId()\n {\n return $this->photoId;\n }", "public function selectImage($id) {\n $sql = \"SELECT * FROM `images` WHERE `id` = :id\"; \n $stmt = $this->pdo->prepare($sql); \n $stmt->bindValue('id', $id); \n $stmt->execute(); \n return $stmt->fetch(PDO::FETCH_ASSOC); \n }", "public function getUserPhoto($iduser){\n //convert the $id to integer\n $iduser = intval($iduser);\n\n $userinfo = DB::connection('mongodb')->collection('userinformations')\n ->project(['_id' => 0])\n ->select('profilephoto')\n ->where('iduser', '=', $iduser)\n ->get();\n if($userinfo) {\n foreach($userinfo as $new){\n return $new;\n }\n \n } else {\n return 'no photo';\n }\n \n }", "function checkUserPhoto($user_id)\r\n{\r\n\t$sql = \"SELECT id FROM images WHERE category_item_id=$user_id AND image_category_id = \".PROFILE_PIC_CAT_ID.\"\";\r\n\t$res = mysql_query($sql) or die(mysql_error() . \" \" . $sql);\r\n $row = mysql_fetch_array($res);\r\n $id = $row[\"id\"];\r\n\tif ($id ) { return $id; } else { return 0; }\r\n}", "public function getPhoto($userId, $size);", "function getFieldByPhotoID($columnName, $photoID)\n{\n //photo_data db\n //photo_data, video_data are tables\n $hn = 'db710109142.db.1and1.com';\n $db = 'db710109142';\n $un = 'dbo710109142';\n $pw = '1Lovecandy!';\n $conn = new mysqli($hn, $un, $pw, $db);\n if ($conn->connect_error) die($conn->connect_error);\n $query = \"SELECT * FROM photo_data WHERE photo_id='$photoID';\";\n $result = $conn->query($query);\n $conn->close();\n if ($result === '') {\n return null;\n } else {\n $ret = $result->fetch_assoc()[$columnName];\n return $ret;\n }\n}", "public static function find($id)\n {\n $photo = json_decode(self::get(\"/photos/{$id}\")->getBody(), true);\n\n return new self($photo);\n }", "function get_single_image($pid) {\n $sql = \"SELECT * FROM photos WHERE album_id='$pid'\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "function get_photo_date_by_id($id)\n{\n\t$result=$GLOBALS['db']->Execute(\"SELECT date FROM \".PREFIX.\"photos WHERE id='\".linpha_addslashes($id).\"'\");\n\t$row=$result->FetchRow();\n\treturn $row[0];\n}", "function getImageByImageId() {\n if($this->image_id == '') return;\n\n $sql = \"SELECT * FROM \".$this->tableImages().\" WHERE image_id = \".$this->image_id;\n return $this->db->query($sql)->row_array();\n\t}", "function photos_getInfo ($photo_id, $secret = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.photos.getInfo';\n\t\t$params['photo_id'] = $photo_id;\n\t\tif ($secret) $params['secret'] = $secret;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photo'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getPhoto()\n {\n return $this->execute('GET', '/' . self::PHOTO);\n }", "public function photo()\n {\n \treturn $this->article->photos->first();\n }", "function getImageId();", "public function findPhotoByUidPid($uid, $pid){\n $sql = \"SELECT `created` FROM `photo` WHERE `uid` = ? AND `id` = ?\";\n $res = $this->connect()->prepare($sql);\n $res->bind_param(\"ss\", $uid, $pid);\n $res->execute();\n if($res->fetch()) {\n return TRUE;\n }\n return FALSE;\n }" ]
[ "0.89250004", "0.7991754", "0.7524653", "0.7254483", "0.71113735", "0.7109219", "0.7047402", "0.7047313", "0.68006164", "0.67108774", "0.66861975", "0.6605537", "0.6592162", "0.6549191", "0.6525812", "0.65181214", "0.65173334", "0.6517307", "0.64751077", "0.64245605", "0.6388845", "0.6387734", "0.6380793", "0.63760275", "0.634021", "0.6334362", "0.63139236", "0.629513", "0.6293219", "0.62619007" ]
0.8308859
1
finds all the photos in database and returns it
public static function find_all_photos(){ global $db; $sql = "SELECT * FROM photos"; try { $result = $db->query($sql); $rows=$result->fetchall(); return $rows; } catch (Exception $e) { throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllPhotos();", "public function getPhotos();", "function get_image() {\n $sql = \"SELECT * FROM photos\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function findAllPhoto(){\n $query= $this->getEntityManager()\n ->createQuery(\"Select p FROM PidevFrontOfficeBundle:Galerie p ORDER BY p.idEvennement ASC\");\n return $query->getResult();\n }", "public function getAll()\n {\n $query = $this->getQueryBuilder()->select('*')\n ->from($this->table);\n\n if ($photos = $this->db->get_results($query->build())) {\n foreach ($photos as $index => $photo) {\n $photos[$index] = $this->extend($photo);\n }\n }\n\n return $photos;\n }", "function get_all_pics(){\n\t\t$all_pics = $this->db->get('pictures');\n\t\treturn $all_pics->result();\n\t}", "function getAllImages() {\n global $pdo;\n $statement = $pdo->prepare('SELECT `sid`, `mime_type`, `name`, `comment` from `file` WHERE `mime_type` LIKE \\'image/%\\' AND NOT comment = \\'Uploaded via Contact Form\\'');\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n}", "public function allImages()\n {\n $query = \"SELECT DISTINCT image from blog_post \n WHERE deleted = 0\";\n\n $stmt = static::$dbh->query($query);\n\n $images = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $images;\n\n }", "public function getImages()\n {\n $res=array();\n $this->objTable = new Model($this->getLangAndID['lang'].'_slide_image');\n $select = array('id','title','description','slide_id','src_link','order_by','avatar');\n $this->objTable->where('slide_id',$this->id);\n $this->objTable->where('idw',$this->idw);\n $data = $this->objTable->get(null,null,$select);\n \n return $data; \n }", "function getImages() {\n $bdd = getBdd();\n $users = $bdd->query('select IMG_PATH as path,'\n . ' USER_ID as user_id, REV_ID as rev_id'\n . ' from T_IMAGES')->fetchAll(PDO::FETCH_ASSOC);\n return $users;\n}", "public function getPhotos()\n {\n return $this->hasMany(Photo::className(), ['owner_id' => 'id']);\n }", "public function index()\n {\n return Photo::get();\n }", "function findPhoto($photo_id){\n\t\n}", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "public function getPhotos()\n {\n return $this->photos;\n }", "function get_all_pictures(){\n\t\tglobal $con;\n\t\n\t\t$query = \"SELECT * FROM picture\";\n\t\t$result = mysqli_query($con, $query);\n\t\t$pictures = array();\n\t\t\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\t$picture = array();\n\t\t\t$picture['link'] = $row['link'];\n\t\t\t$picture['title'] = $row['title'];\n\t\t\t$picture['description'] = $row['description'];\n\t\t\t$pictures[$row['id']] = $picture;\n\t\t}\n\t\t\n\t\treturn $pictures;\n\t}", "public function getPhoto()\n {\n return $this->execute('GET', '/' . self::PHOTO);\n }", "public function images()\n {\n // Fetch all properties existing in the database\n $image = Image::all();\n\n // return list of properties;\n return $image;\n\n }", "public function getphotos(){\n\t\ttry{\n\t\t\t$user_id = DB::table('mobiletokens')->where('token', Input::get('token'))->pluck('user_id');\n\t\t\t//$id = DB::select('select user_id from mobiletokens where token = ?', array(Input::get('token')));\n\t\t\t//$links = DB::table('photos')->select('link'/*,'description','latitude','longitude','created_at'*/)->where('user_id','=',$id)->get();\n\t\t\t$links = DB::table('photos')->select('link')->where('user_id','=',$user_id)->orderBy('created_at','desc')->get();\n\t\t} catch (Exception $e){\n\t\t\treturn Response::json(['status' => 'failed']);\n\t\t}\n\t\treturn Response::json(['status' => 'success', 'links' => $links]);\n\t}", "function findImages($page)\n {\n $username = \"root\";\n $password = \"root\";\n $url = \"localhost:3306\";\n $page = $page - 1;\n $start = $page * 10;\n\n $conn = new mysqli($url, $username, $password, \"eten\");\n\n if ($conn->connect_error) {\n echo \"<script>alert('数据库链接失败')</script>\";\n }\n $sCount = \"select count(gallery_id) from gallery\";\n $sql = \"select * from gallery LIMIT \" . $start . \",10\";//查找数据库\n\n $rsCount = $conn->query($sCount);\n if ($rsCount->num_rows > 0) {\n GalleryImpl::$nums=$rsCount->fetch_row()[0];\n }\n $rs = $conn->query($sql);\n if ($rs->num_rows > 0) {\n $rows = $rs->fetch_all();\n\n $rs->close();\n $conn->close();\n\n return $rows;\n }\n $rs->close();\n return null;\n }", "public function getFotos()\n\t{\n\t\treturn $this->fotos;\n\t}", "public function get_images()\r\n\t\t{\r\n\t\t\t$images = $this->obj->result;\r\n\t\t\treturn $images;\r\n\t\t}", "public function getAlbumPhotos($albumId){\n return DB::select('select * from photos where album_id = ?', array($albumId));\n }", "private function getImages() {\n global $wpdb;\n $query = \"select * from `\" . $wpdb->prefix . \"roni_images` where image_status = 1;\";\n $results = $wpdb->get_results( $query );\n if( !empty( $results ) ) {\n return $results;\n }\n\n return false;\n }", "public function getPhotosData() {\n\t\t// 画像データ取得\n\t\t$results = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => PHOTOSSEARCH,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'sort' => SORTTYPE,\n\t\t\t\t'accuracy' => ACCURACY,\n\t\t\t\t'content_type' => CONTENTTYPE,\n\t\t\t\t'license' => LICENSE,\n\t\t\t\t'privacy_filter' => PRIVACYFILTER,\n\t\t\t\t'per_page' => PERPAGE,\n\t\t\t\t'safe_search' => SAFESEARCH,\n\t\t\t\t'tags' => TAGS,\n\t\t\t));\n\n\t\t$body = $results->body;\n\t\treturn unserialize($body);\n\t}", "public function get_imgs(){\n\t\treturn $this->db->select()->from(\"slide\")->get()->result();\n\t}", "function getFilesByObject() {\n if($this->object_id == '') return ;\n $sql = \"SELECT * FROM \".$this->tableImages().\" WHERE object_id = $this->object_id \";\n return $this->db->query($sql)->result('array');\n\t}", "public static function find_photo($id){\n global $db;\n $message = null;\n $sql = \"SELECT * FROM photos WHERE photo_id = '\".$id.\"' LIMIT 1\";\n try {\n $result = $db->query($sql);\n $row = $result->fetch();\n return $row;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function getAllImages()\n {\n $sql = \"\n\t\t\tSELECT A.*, B.tag_id, C.name tagName FROM images A\n\t\t\tLEFT JOIN tag_relationships B\n\t\t\tON A.id = B.image_id\n\t\t\tLEFT JOIN tags C\n\t\t\tON B.tag_id = C.id\n\t\t\tORDER BY A.name ASC\n\t\t\";\n\n $query = $this->db->prepare($sql);\n\n $query->execute();\n\n $result = $query->fetchAll();\n\n // index the images by id then add their tags\n foreach ($result as $image => $data) {\n if (isset($this->images[$data['id']])) {\n $this->images[$data['id']]['tags'][$data['tag_id']] = $data['tagName'];\n } else {\n $this->images[$data['id']] = [\n 'name' => $data['name'],\n 'url' => $data['url'],\n 'tags' => [$data['tag_id'] => $data['tagName']],\n ];\n }\n }\n return $this->images;\n }", "public function photos() {\n \treturn $this->morphMany('App\\Photo', 'imageable');\n }" ]
[ "0.79025847", "0.75143087", "0.7238818", "0.72185194", "0.7203595", "0.7196661", "0.701319", "0.6884714", "0.68724364", "0.6834645", "0.6795367", "0.6794424", "0.6778277", "0.66719806", "0.6655406", "0.6598305", "0.6561741", "0.65614367", "0.65466255", "0.65432966", "0.6527695", "0.65195096", "0.6519486", "0.6504248", "0.6487575", "0.64837456", "0.6474871", "0.64727837", "0.64626133", "0.6461508" ]
0.8649576
0
Run the addThis widget. This renders the body part of the assThis widget.
function run() { // Run parent CWidget run function. parent::run(); echo '<!-- AddThis Button BEGIN -->'; echo CHtml::openTag('div', $this->htmlOptions) . "\n"; if ($this->singleButton) { $img = CHtml::image("http://s7.addthis.com/static/btn/v2/lg-share-{$this->config['ui_language']}.gif", Yii::t('addThis', 'Bookmark and Share')); echo CHtml::link($img, "http://www.addthis.com/bookmark.php?v=300&amp;#pubid={$this->pubid}", $this->singleButtonOptions); } // Check what services to show. if (!$this->singleButton && !empty($this->services)) { while ($item = current($this->services)) { is_array($item) ? $service = array('name' => key($this->services), 'htmlOptions' => $item) : $service = array('name' => $item, 'htmlOptions' => array()); next($this->services); if ($service['name'] == 'vk_like') { if (!empty($this->vkApiId) && is_int($this->vkApiId)) { $service['htmlOptions']['id'] = 'vk_like'; echo CHtml::tag('a', $service['htmlOptions'], ''); } } else { $service['htmlOptions']['class'] = "addthis_button_{$service['name']}"; echo CHtml::tag('a', $service['htmlOptions'], ''); } } } echo CHtml::closeTag('div'); echo '<!-- AddThis Button END -->'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run() {\n // Run parent CWidget run function.\n parent::run();\n\n // Get this widget id.\n $id = $this->getId();\n\n // Set this widget id.\n $this->htmlOptions['id'] = $id;\n // Set the default 'class' attribute of addThis 'div' otherwise add users custom 'class' attribute.\n empty($this->htmlOptions['class']) ? $this->htmlOptions['class'] = 'addthis_toolbox addthis_default_style addthis_32x32_style' : $this->htmlOptions['class'] = '' . $this->htmlOptions['class'];\n // Open default addThis div tag with htmlOptions.\n echo CHtml::openTag('div', $this->htmlOptions) . \"\\n\";\n // Open default addThis button if showDefaultButton is set to true.\n // Check what services to show.\n if (isset($this->showServices)) {\n if ($this->showServicesTitle) {\n\n echo CHtml::openTag('a', array('class' => \"addthis_button_facebook_like\", 'fb:like:layout' => \"button_count\"));\n echo CHtml::closeTag('a') . \"\\n\";\n echo CHtml::openTag('a', array('class' => \"addthis_button_facebook_share\", 'fb:share:layout' => \"button_count\"));\n echo CHtml::closeTag('a') . \"\\n\";\n echo CHtml::openTag('a', array('class' => \"addthis_button_facebook_send\"));\n echo CHtml::closeTag('a') . \"\\n\";\n echo CHtml::openTag('a', array('class' => \"addthis_button_google_plusone\", 'g:plusone:size' => \"medium\"));\n echo CHtml::closeTag('a') . \"\\n\";\n echo CHtml::openTag('a', array('class' => \"addthis_button_linkedin_counter\"));\n echo CHtml::closeTag('a') . \"\\n\";\n echo CHtml::openTag('a', array('class' => \"addthis_counter addthis_pill_style\"));\n echo CHtml::closeTag('a') . \"\\n\";\n\n } else {\n foreach ($this->showServices as $i) {\n echo CHtml::openTag('a', array('class' => \"addthis_button_{$i}\"));\n echo CHtml::closeTag('a') . \"\\n\";\n }\n }\n // Destroy @var showServices.\n unset($this->showServices);\n }\n if ($this->showDefaultButton) {\n\n echo CHtml::openTag('a', array('class' => \"addthis_button_compact\"));\n echo CHtml::closeTag('a') . \"\\n\";\n\n echo CHtml::openTag('a', array('class' => \"addthis_counter addthis_bubble_style\"));\n echo CHtml::closeTag('a') . \"\\n\";\n }\n // Close default addThis div tag.\n echo CHtml::closeTag('div');\n echo '<!-- AddThis id:{$this->id}-->';\n // Register script file, addThis config and share if are set.\n\n Yii::app()->clientScript->registerScriptFile($this->scriptUrl);\n // Check if addThis $config parametes are set if true place them.\n if (!empty($this->config)) {\n $config = CJavaScript::encode($this->config);\n Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, \"var addthis_config={$config};\", false);\n }\n // Destroy addThis #config parameters.\n unset($this->config);\n // Check if addThis $share parametes are set if true place them.\n if (!empty($this->share)) {\n $share = CJavaScript::encode($this->share);\n Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, \"var addthis_share={$share};\", false);\n }\n // Destroy addThis #share parameters.\n unset($this->share);\n }", "public function addWidget()\r\n {\r\n }", "function form($instance){\r\n\t\t?>\r\n\t\t<?php\r\n\t\t\t$defaults = array( 'title'=> __( 'Share This Article' , 'crumble' ), 'code' => '<!-- AddThis Button BEGIN -->\r\n<div class=\"addthis_toolbox addthis_default_style \">\r\n<a class=\"addthis_button_preferred_1\"></a>\r\n<a class=\"addthis_button_preferred_2\"></a>\r\n<a class=\"addthis_button_preferred_3\"></a>\r\n<a class=\"addthis_button_preferred_4\"></a>\r\n<a class=\"addthis_button_compact\"></a>\r\n<a class=\"addthis_counter addthis_bubble_style\"></a>\r\n</div>\r\n<script type=\"text/javascript\" src=\"http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-500144fc331f9af5\"></script>\r\n<!-- AddThis Button END -->' \r\n\t\t\t);\r\n\t\t\t$instance = wp_parse_args((array) $instance, $defaults); \r\n\t\t?>\r\n\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e( 'Title:' , 'crumble' ); ?></label>\r\n\t\t\t<input class=\"widefat\" style=\"width: 210px;\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" value=\"<?php echo $instance['title']; ?>\" />\r\n\t\t</p>\r\n\t\t\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('code'); ?>\"><?php _e( 'Paste Your Code From https://www.addthis.com:' , 'crumble' ); ?></label>\r\n\t\t\t<textarea class=\"widefat\" style=\"width: 220px; height: 350px\" id=\"<?php echo $this->get_field_id('code'); ?>\" name=\"<?php echo $this->get_field_name('code'); ?>\"><?php echo $instance['code']; ?></textarea>\r\n\t\t</p>\r\n\t\t\r\n\t\t<?php\r\n\r\n\t}", "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}", "public function add() {\n\t\t\n\t\t$this->template->content = View::instance(\"v_posts_add\");\n\t\t\n\t\t$client_files_body = Array(\n\t\t\t'/js/jquery.form.js',\n\t\t\t'/js/posts_add.js'\n\t\t);\n\t\t\n\t\t$this->template->client_files_body = Utils::load_client_files($client_files_body);\n\n\t\techo $this->template;\n\t\t\n\t}", "public function add() {\n\t\n\t\t# Make sure user is logged in if they want to use anything in this controller\n\t\tif(!$this->user) {\n\t\t\tRouter::redirect(\"/index/unauthorized\");\n\t\t}\n\t\t\n\t\t# Setup view\n\t\t$this->template->content = View::instance('v_teachers_add');\n\n\t\t$this->template->title = \"Add Teacher\";\n\n\t\t$client_files_head = array(\"/css/teachers_add.css\");\n\t\t$this->template->client_files_head = Utils::load_client_files($client_files_head);\n\n\t\t#$client_files_body = array(\"/js/ElementValidation.js\", \"/js/shout_out_utils.js\");\n\t\t#$this->template->client_files_body = Utils::load_client_files($client_files_body);\n\n\t\t# Render template\n\t\techo $this->template;\n\t\t\n\t}", "function social(){\r\n\t\techo '\r\n\t<!-- AddThis Button BEGIN -->\r\n<div class=\"addthis_toolbox addthis_default_style addthis_32x32_style\">\r\n<a class=\"addthis_button_facebook\"></a>\r\n<a class=\"addthis_button_twitter\"></a>\r\n<a class=\"addthis_button_google_plusone_share\"></a>\r\n</div>\r\n<script type=\"text/javascript\" src=\"//s7.addthis.com/js/300/addthis_widget.js#pubid=undefined\"></script>\r\n<!-- AddThis Button END -->\r\n';\t\r\n}", "public function run() {\n //SILEX:conception\n // Maybe create a widget bar and put buttons in it to use the same style\n //\\SILEX:conception\n return Html::a(\n Icon::show('comment', [], Icon::FA) . \" \" . Yii::t('app', self::ADD_ANNOTATION_LABEL),\n [\n 'annotation/create',\n YiiAnnotationModel::TARGETS => $this->targets,\n ], \n [\n 'class' => 'btn btn-default',\n ] \n );\n }", "public function run() {\n $class = \"\";\n if ($this->style != \"basic\") {\n if ($this->gradient) {\n $class .= \"background_$this->gradient color_$this->gradient\";\n \n }\n if ($this->roundStyle) {\n $class .= \" $this->roundStyle\";\n }\n if ($this->displayShadow && $this->shadowDirection ) {\n $class .= \" shadow_$this->shadowDirection\";\n }\n }\n \n echo CHtml::closeTag(\"div\");\n $script = \"\n $('#$this->id').find('.question').addClass( '$class' );\n $('#$this->id').faq({\n expandIconClass : '$this->expandIconClass',\n collapseIconClass : '$this->collapseIconClass'\n });\n \";\n Yii::app()->getClientScript()->registerScript($this->id, $script);\n }", "public function run()\n {\n Html::addCssClass($this->wrapperOptions, 'page-header');\n\n echo Html::beginTag(\"div\", $this->wrapperOptions);\n\n if (!empty($this->buttons)) {\n echo ButtonGroup::widget(\n [\n 'options' => $this->buttonGroupOptions,\n 'buttons' => $this->buttons,\n ]\n );\n }\n\n echo Html::tag(\"h1\", $this->title, $this->titleOptions);\n\n echo Html::endTag(\"div\");\n }", "public function run()\n {\n echo \"\\n\" . $this->renderBodyEnd();\n echo \"\\n\" . Html::endTag('div');\n\n }", "public function run()\n {\n $this->renderContentEnd();\n echo CHtml::closeTag('div') . \"\\n\";\n\n $this->useViewTemplate(\"box\")->selfRender();\n }", "public static function add() {\n\t\tif (\n\t\t\t( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) ||\n\t\t\t'true' !== get_user_option( 'rich_editing' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\techo '<a href=\"#\" id=\"sgdg-tinymce-button\" class=\"button\"><img class=\"sgdg-tinymce-button-icon\" src=\"' .\n\t\t\tesc_attr( plugins_url( '/skaut-google-drive-gallery/admin/icon.png' ) ) .\n\t\t\t'\">' .\n\t\t\tesc_html__( 'Google Drive gallery', 'skaut-google-drive-gallery' ) .\n\t\t\t'</a>';\n\t\tadd_thickbox();\n\t}", "public function run()\n\t{\n\t\tlist($name,$id)=$this->resolveNameID();\n\t\tif(isset($this->htmlOptions['id']))\n\t\t\t$id=$this->htmlOptions['id'];\n\t\telse\n\t\t\t$this->htmlOptions['id']=$id;\n\t\tif(isset($this->htmlOptions['name']))\n\t\t\t$name=$this->htmlOptions['name'];\n\n\t\t#$this->registerClientScript($id);\n\t\t#$this->htmlOptions[\"class\"]=\"form-control\";\n\t\t$this->htmlOptions=array_merge($this->htmlOptions,array(\n\t\t\t// 'htmlOptions'=>array('container'=>null),\n\t\t\t'labelOptions'=>array('style'=>'width: 100%;height: 100%;cursor:pointer','class'=>'ptm pbm mbn'),\n\t\t\t'template'=>'<div class=\"col-lg-1\"><a href=\"#\" class=\"thumbnail text-center\" style=\"margin-left: -10px;margin-right: -10px;\">{beginLabel}{labelTitle}<div class=\"text-center\">{input}</div>{endLabel}</a></div>',\n\t\t\t'separator'=>'',\n\t\t));\n\t\t\n\t\t#echo \"<small class=\\\"text-muted\\\"><em>Here a message for user</em></small>\";\n\t\t#echo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions);\n\t\techo '<div class=\"row\">'.Chtml::activeRadioButtonList($this->model,$this->attribute,\n\t\t $this->listData,$this->htmlOptions).'</div>';\n\t}", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function add()\n {\n //renderView('add');\n }", "protected function _setAddButton()\n {\n $this->setChild('add_button',\n $this->getLayout()->createBlock('adminhtml/widget_button')\n ->setData(array('id' => \"add_tax_\" . $this->getElement()->getHtmlId(),\n 'label' => Mage::helper('catalog')->__('Add Tax'),\n 'onclick' => \"weeeTaxControl.addItem('\" . $this->getElement()->getHtmlId() . \"')\",\n 'class' => 'add'\n )));\n }", "function display_add() {\n $this->_addform->display();\n }", "public function run() {\n\t\tlist($name, $id) = $this->resolveNameID();\n\t\tif (isset($this->htmlOptions['id']))\n\t\t\t$id = $this->htmlOptions['id'];\n\t\telse\n\t\t\t$this->htmlOptions['id'] = $id;\n\t\tif (isset($this->htmlOptions['name']))\n\t\t\t$name = $this->htmlOptions['name'];\n\n\t\t$this->registerClientScript();\n\t\tif ($this->hasModel())\n\t\t\techo CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);\n\t\telse\n\t\t\techo CHtml::textArea($name, $this->value, $this->htmlOptions);\n\t}", "function addthis_scripts(){\n ?>\n <script type=\"text/javascript\" src=\"//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-546f51e739399f5b\" async=\"async\"></script>\n<?php\n}", "public function run()\n\t{\n\t\t\n\t\tlist($name,$id)=$this->resolveNameID();\n\t\tif(isset($this->htmlOptions['id']))\n\t\t\t$id=$this->htmlOptions['id'];\n\t\telse\n\t\t\t$this->htmlOptions['id']=$id;\n\t\tif(isset($this->htmlOptions['name']))\n\t\t\t$name=$this->htmlOptions['name'];\n\n\t\t$this->registerClientScript($id);\n\t\t$this->htmlOptions[\"class\"]=\"form-control\";\n\t\t\n\t\techo \"<small class=\\\"text-muted\\\"><em>Here a message for user</em></small>\";\n\t\techo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions);\n\t\t\n\t}", "public function addView()\n {\n return $this->render('Add');\n }", "function run()\r\n {\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get('Gutenberg')));\r\n $trail->add_help('gutenberg general');\r\n\r\n $this->action_bar = $this->get_action_bar();\r\n\r\n $this->display_header($trail);\r\n echo '<a name=\"top\"></a>';\r\n echo $this->action_bar->as_html();\r\n echo '<div id=\"action_bar_browser\">';\r\n $renderer = GutenbergPublicationRenderer :: factory($this->get_renderer(), $this);\r\n echo $renderer->as_html();\r\n echo '</div>';\r\n $this->display_footer();\r\n }", "public function run()\n {\n $this->render('search-triple-widget');\n }", "public function run()\n {\n list($name, $id) = $this->resolveNameID();\n\n if (isset($this->htmlOptions['id'])) {\n $id = $this->htmlOptions['id'];\n } else {\n $this->htmlOptions['id'] = $id;\n }\n\n if (isset($this->htmlOptions['name'])) {\n $name = $this->htmlOptions['name'];\n }\n\n if (isset($this->settings['ajax'])) {\n if (isset($this->model)) {\n echo CHtml::textField($name, $this->model->{$this->attribute}, $this->htmlOptions);\n } else {\n echo CHtml::textField($name, $this->value, $this->htmlOptions);\n }\n } else {\n if (isset($this->model)) {\n echo CHtml::dropDownList($name, $this->model->{$this->attribute}, $this->data, $this->htmlOptions);\n } else {\n echo CHtml::dropDownList($name, $this->value, $this->data, $this->htmlOptions);\n }\n }\n\n $this->registerScripts($id);\n }", "public function run()\n {\n $this->add('btc', 'Bitcoin', 'BTC', 'bitcoin.png');\n $this->add('eth', 'Ethereum', 'ETH', 'ethereum.png');\n }", "public function renderAdd()\r\n\t{\r\n\t\t$this['tarifForm']['save']->caption = 'Přidat';\r\n\t}", "public function render()\n {\n viewAdd::renderAdds();\n ?>\n\n<?php\n\n }", "function bnk_addthis() {\r\n\t\tglobal $smof_data;\r\n\t\tif( $smof_data['bnk_addthis_bar'] == 1 ){\r\n\t\techo '<div class=\"addthis_toolbox addthis_default_style addthis_article \">\r\n\t\t<a class=\"addthis_button_preferred_1\"></a>\r\n\t\t<a class=\"addthis_button_preferred_2\"></a>\r\n\t\t<a class=\"addthis_button_preferred_3\"></a>\r\n\t\t<a class=\"addthis_button_preferred_4\"></a>\r\n\t\t<a class=\"addthis_button_compact\"></a>\r\n\t\t<a class=\"addthis_counter addthis_bubble_style\"></a>\r\n\t\t</div>';\r\n\t\t};\r\n}", "function add() \n {\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n \n // Render the action with template\n $this->renderWithTemplate('users/add', 'AdminPageBaseTemplate');\n }" ]
[ "0.71326107", "0.63748074", "0.6317958", "0.61634123", "0.6127649", "0.59173536", "0.5903379", "0.58928174", "0.5812437", "0.57991683", "0.5787319", "0.57849586", "0.5760575", "0.5730159", "0.57067615", "0.5660631", "0.56580526", "0.5654981", "0.56516516", "0.56169206", "0.5614713", "0.5591187", "0.55881244", "0.55670357", "0.55651957", "0.55610776", "0.5539365", "0.5520862", "0.55049384", "0.54903257" ]
0.6757272
1
Processes the Jikan response JSON into a Slackreadable response.
private function processAnimes ($json_data) { $result = json_decode ($json_data, true); if (!isset ($result['result'][0])) { $this->textResponse ("No data"); return; } $result = $result['result'][0]; $slack_response = array ( 'response_type' => 'in_channel', 'text' => $result['description'], 'attachments' => array ( array ( 'fallback' => 'Fallback text', 'image_url' => $result['image_url'], 'title' => $result['title'], 'title_link' => $result['url'] ) ) ); $response = json_encode($slack_response); http_response_code(200); header('Content-Type: application/json'); header('Status: 200 OK'); echo $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function process_response() {\n\t\t\t$this->response['response']['Message'] = isset($this->response['response']['Message']) ? $this->response['response']['Message'] : '';\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'invalid') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'the item code was specified more than once') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['Level1Code'] = $this->request['Level1Code'];\n\t\t\t\n\t\t\tif (!$this->response['response']['error']) { // IF Error is False\n\t\t\t\tif (in_array($this->response['server']['http_code'], array('200', '201', '202', '204'))) {\n\t\t\t\t\t$this->log_sendlogitem($this->request['Level1Code']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->log_error($this->response['response']['Message']);\n\t\t\t}\n\t\t}", "abstract function parse_api_response();", "function parse() {\r\n\t\t/* JSON */\r\n\t\tif (strpos ( $this->response_content_type, \"application/json\" ) !== false) {\r\n\t\t\t$this->response_parsed = json_decode($this->response_body);\r\n\t\t\t/* JSON STREAM */\r\n\t\t} elseif (strpos ( $this->response_content_type, \"json-stream\" ) !== false) {\r\n\t\t\t$stream = split ( \"\\n\", $this->response_body );\r\n\t\t\tif (count ( $stream ) < $stream [0] ['ResultLength']) {\r\n\t\t\t\t// echo \"Invalid JSON Stream. Result Length:\".count($stream);\r\n\t\t\t\t$this->client->status_code = 400;\r\n\t\t\t\t$GLOBALS ['ResultStack']->pushNew ( \"Invalid JSON Stream\", ERROR );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$jsonServer = new JSON ( JSON_LOOSE_TYPE );\r\n\t\t\t$this->response_parsed = array ();\r\n\t\t\tforeach ( $stream as $line )\r\n\t\t\t\t$this->response_parsed [] = $jsonServer->decode ( $line );\r\n\t\t\t/* DEFAULT */\r\n\t\t} else {\r\n\t\t\t$this->response_parsed = $this->response_body;\r\n\t\t}\r\n\t}", "public function transformJsonResponse($json)\n {\n // In a REST-API call, the first five chars are )]}'\\n\n // to decode it, we have to strip it\n // See https://review.typo3.org/Documentation/rest-api.html#output\n if (substr($json, 0, 4) === ')]}\\'') {\n $json = substr($json, 5);\n }\n\n return json_decode($json, true);\n }", "private function jsonResponse() {\n return json_format($this->response, $this->pretty);\n }", "private function handleResponse($responseJson)\n {\n\n $response = json_decode($responseJson, true);\n\n if ($response['status'] == 'ok') {\n $newsAdded = 0;\n\n foreach ($response['articles'] as $article) {\n if ($this->handleNews($article)) {\n $newsAdded++;\n }\n }\n\n return json_encode([\n 'status' => 'ok',\n 'added_news' => $newsAdded\n ]);\n } else {\n return json_encode([\n 'status' => 'error',\n 'code' => $response['code'],\n 'message' => $response['message']\n ]);\n }\n }", "protected function outputJSONResponse($data){\n\t\t$this->setResponse('json');\n\t\techo json_encode($data);\n\t}", "private function parseApiResponse($response, $requestType = null){\n //combine the current response from Chikka and the message type that was requested\n var_dump($response);\n $response = json_decode($response,true);\n if($requestType){\n $response['request_type'] = $requestType;\n }\n\n return json_decode(json_encode($response));;\n }", "public function reply($json)\n {\n if ($this->getInput($json, $input)) {\n $output = $this->processInput($input);\n } else {\n $output = $this->parseError();\n }\n\n if ($output === null) {\n return null;\n }\n\n return json_encode($output);\n }", "private function response($data) {\n\t\treturn json_decode($data);\n\t}", "function doTheHook ($jsonData) {\r\n\r\n $notif = json_decode($jsonData, TRUE);\r\n \r\n $message = '';\r\n $eventype = '';\r\n\r\n\r\n if(isset($notif['message']))\r\n {\r\n $message = $notif['message'];\r\n }\r\n \r\n if(isset($notif['event_type']))\r\n {\r\n $eventtype = $notif['event_type'];\r\n if ($eventtype == 'person') {\r\n Netatmo_getPersons(getParent());\r\n }\r\n }\r\n \r\n if(isset($notif['camera_id']))\r\n {\r\n SetValueString(get_VID_CamId(),$notif['camera_id']);\r\n }\r\n \r\n if(isset($notif['home_id']))\r\n {\r\n SetValueString(get_VID_HomeId(),$notif['home_id']);\r\n }\r\n \r\n if(isset($notif['home_name']))\r\n {\r\n SetValueString(get_VID_HomeName(),$notif['home_name']);\r\n }\r\n}", "public function inbound() {\n if($this->request->is('post')) {\n $json = $this->request->input('json_decode', true);\n\n if (empty($json) || json_last_error() !== JSON_ERROR_NONE) {\n throw new BadRequestException('JSON format error');\n }\n\n $this->_createFromInboundHook($json);\n\n return new CakeResponse(); // Empty 200 response\n }\n }", "function json_response() {\n return app(JsonResponse::class);\n }", "public function respond(array $data)\n {\n //if ($data['response_type'] == 'saved')\n $client = new Client();\n $response = $client->request('GET', 'https://slack.com/api/chat.postMessage',\n ['query' => [\n 'token' => Credential::where('team_id', $data['team_id'])->first()->bot_access_token,\n 'channel' => $data['channel'],\n 'text' => $data['text']\n ]\n ]);\n return json_decode($response->getBody(), true);\n }", "private function json() {\n if( $this->format === 'application/hal+json' ) {\n header('Content-Type: application/hal+json; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\JsonWriter(true);\n return $writer->execute($hal_response);\n } else {\n header('Content-Type: application/json; charset=utf-8', TRUE, $this->status);\n return json_encode($this->content, JSON_NUMERIC_CHECK);\n }\n }", "public function return_json(){\n\t\t$this->output\n\t ->set_content_type('application/json')\n\t ->set_output(json_encode($this->response));\n\t}", "function render_json($data)\n {\n $this->response->add_header('Content-Type', 'application/json');\n $this->render_text(json_encode(studip_utf8encode($data)));\n }", "protected function found()\n {\n $this->response = $this->response->withStatus(200);\n $this->jsonBody($this->payload->getOutput());\n }", "public function response()\n {\n $metadata = $this->metadata;\n $tmp = array();\n \n if ($this->showConfigRoot != false) {\n $tmp['root'] = $metadata['root'];\n $tmp['totalProperty'] = $metadata['totalProperty'];\n $tmp['successProperty'] = $metadata['successProperty'];\n $tmp['messageProperty'] = $metadata['messageProperty'];\n }\n \n $tmp[$metadata['root']] = (empty($this->data)) ? array() : $this->data;\n $tmp[$metadata['successProperty']] = $this->success;\n \n // if metadata Is String return as Raw else create new array\n if ($this->showMetaData != false)\n if ($metadata['onlyRaw'] === true) {\n $tmp['metaData'] = \"|1|2|3|4|5|...5|||\";\n } else {\n $tmp['metaData'] = $this->metadata;\n }\n $rawJson = json_encode($tmp);\n if ($metadata['onlyRaw'] === true) {\n return str_replace('\"|1|2|3|4|5|...5|||\"', $metadata['raw'], $rawJson);\n }\n \n return $rawJson;\n }", "public function json($data)\n {\n $this->template = NULL;\n $this->response->headers('Content-Type', 'application/json; charset=utf-8');\n $this->response->body(json_encode($data));\n }", "public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }", "private function _postResponse( $link ) {\n App::import('Core', 'HttpSocket');\n $HttpSocket = new HttpSocket();\n $response = $HttpSocket->post($link); \n \n //Remove non ascii chars - JSON will break because Meetup allows non-ascii characters \n //hack from http://www.stemkoski.com/php-remove-non-ascii-characters-from-a-string/ \n $response = str_replace(\"\\n\",\"[NEWLINE]\",$response); \n $response = preg_replace('/[^(\\x20-\\x7F)]*/','', $response); \n $response = str_replace(\"[NEWLINE]\",\"\\n\",$response); \n \n //decode the returned JSON into a PHP array \n $my_array = json_decode( $response, true ); \n\n return( $my_array ); \n\n }", "function return_response ($response_data) {\n // If the format is JSON, then send JSON else load the correct template\n //if ($response_data['format'] == 'json') {\n if (array_key_exists('error', $response_data)) {\n return wp_send_json($response_data);\n }\n else {\n return wp_send_json($response_data);\n }\n}", "function MesiboParseResponse($response) {\n\t$result = json_decode($response, true);\n\tif(is_null($result)) \n\t\treturn false;\n\treturn $result;\n}", "function respond($output) {\n\n\t/*\n\t\tstandard response:\n\t\n\t\t\tapiName\n\t\t\tversion\n\t\t\tstatus\n\t\t\terror\n\t\t\tmsg \n\t\t\tresults\n\n\t*/\n\n\techo json_encode($output);\n}", "protected function parse_response($response) {\n $length = strlen(PHP_INT_MAX);\n $response = preg_replace('/\"(id|in_reply_to_status_id)\":(\\d{' . $length . ',})/', '\"\\1\":\"\\2\"', $response);\n return json_decode($response, TRUE);\n }", "public function sendResult()\n\t{\n\t\theader('Content-Type: application/json');\n\t\tif ($this->responseDataType == 'json') {\n\t\t\techo json_encode($this->emojiArray);\n\t\t} else {\n\t\t\techo \"{$this->responseCallback}(\" . json_encode($this->emojiArray) . ')';\n\t\t}\n\t\texit;\n\t}", "public function processResponse(array $jsonResponse): IResponse\n {\n return new PresentationResponse($jsonResponse['response']['result']['presentation']);\n }", "public function parse()\n {\n if (isset($_GET['from'])) {\n $fromTimestamp = strtotime($_GET['from']);\n } else {\n $fromTimestamp = time();\n }\n\n $fromTime = $this->formatTime($fromTimestamp);\n $queryParams = $this->buildApiQueryParams($fromTime);\n\n $responseJson = $this->requestNews($queryParams);\n\n try {\n return $this->handleResponse($responseJson);\n } catch (Exception $e) {\n if (strstr($e->getMessage(), \"Undefined index\") == \"\") {\n throw $e;\n }\n\n return json_encode([\n 'status' => 'error',\n 'reason' => 'bad response'\n ]);\n }\n }", "protected function buildResponse($json)\n {\n //log the http response to the timeline\n $this->dispatch('utilbundle.symfout', new SymfonyEvent($this->get('g4_container')->getManifestId(), $json, get_class($this), $this->getRequest()->getRequestUri(), $this->get('g4_container')->getRequestPairKey(), 200));\n\n return new Response($json);\n }" ]
[ "0.56788003", "0.5638327", "0.5600073", "0.5483874", "0.5481219", "0.5375208", "0.5349323", "0.53152436", "0.53026706", "0.5292097", "0.52468556", "0.52456576", "0.52428806", "0.52069074", "0.51941454", "0.5182462", "0.51778066", "0.51762956", "0.5170276", "0.51535493", "0.5152219", "0.51496494", "0.5142789", "0.5137797", "0.5125836", "0.5101663", "0.5083516", "0.5083114", "0.5080329", "0.5077513" ]
0.6392167
0
Return the number of active and inactive users in the site. If a group is specified the query is restricted to that group only
function statistics_extended_active_count($group=null){ global $CONFIG; $query_tpl ="SELECT COUNT(*) as members FROM {$CONFIG->dbprefix}users_entity ue "; $query_tpl.="JOIN {$CONFIG->dbprefix}entities e ON e.guid=ue.guid WHERE e.enabled='yes' AND "; if(!empty($group)){ $query_tpl.=" e.guid IN (SELECT guid_one FROM {$CONFIG->dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) AND "; } $query_tpl.=" last_login {{CONDITION}} 0"; // Active users $query = str_replace("{{CONDITION}}","!=",$query_tpl); $count = get_data_row($query); $active = $count->members; $query = str_replace("{{CONDITION}}","=",$query_tpl); $count = get_data_row($query); $inactive = $count->members; return array($active,$inactive); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcNumActiveUsers(){\r\n\t /* Calculate number of USERS at site */\r\n\t $sql = $this->connection->query(\"SELECT * FROM \".TBL_ACTIVE_USERS);\r\n\t $this->num_active_users = $sql->rowCount();\r\n }", "function calcNumActiveUsers(){\r\n /* Calculate number of users at site */\r\n $q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\r\n $result = mysql_query($q, $this->connection);\r\n $this->num_active_users = mysql_numrows($result);\r\n }", "function calcNumActiveUsers(){\r\n /* Calculate number of users at site */\r\n $q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\r\n $result = mysql_query($q, $this->connection);\r\n $this->num_active_users = mysql_numrows($result);\r\n }", "function calcNumActiveUsers(){\n\t\t//calculate number of useres on site\n\t\t$q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\n\t\t$result = mysql_query($q, $this->connection);\n\t\t$this->num_active_users = mysql_numrows($result);\n\t}", "function user_count() {\n return mysql_result(mysql_query(\"SELECT COUNT(`user_id`) FROM `users` WHERE `active` = 1\"), 0);\n}", "public function usersAllowedCount()\n {\n $sql = \"SELECT global_value FROM lgt_license_global_table where global_key = 'concurrent_users'\";\n $allowd_count = Yii::app()->db->createCommand($sql)->queryScalar();\n return $allowd_count;\n }", "public function countActiveMembers(){\r\n \r\n $dbs = $this->getDB()->prepare\r\n ('select * from memberstatus where StatusCode = \"A\"');\r\n $dbs->execute();\r\n $countActive = $dbs->rowCount();\r\n \r\n return $countActive;\r\n }", "function get_numusers() {\n global $CFG;\n\n $countsql = \"SELECT COUNT(DISTINCT u.id)\n FROM {$CFG->prefix}grade_grades g RIGHT OUTER JOIN\n {$CFG->prefix}user u ON u.id = g.userid\n LEFT JOIN {$CFG->prefix}role_assignments ra ON u.id = ra.userid\n $this->groupsql\n WHERE ra.roleid in ($this->gradebookroles)\n $this->groupwheresql\n AND ra.contextid \".get_related_contexts_string($this->context);\n return count_records_sql($countsql);\n }", "function d4os_io_db_070_os_users_online_users_count() {\n d4os_io_db_070_set_active('os_robust');\n $now_online = db_result(db_query(\"SELECT COUNT(*) FROM {GridUser}\"\n . \" WHERE Online = 'true'\"\n . \" AND Login < (UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()))))\"\n . \" AND Logout < (UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()))))\"));\n d4os_io_db_070_set_active('default');\n return $now_online;\n}", "static function get_number_of_registered_users() {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `active` <> 0;\";\n $query = mysqli_query($con, $sql);\n return mysqli_fetch_object($query)->count;\n }", "function getUsersCount() {\n $company_id = $this->getId(); \n \treturn Users::count(\"company_id LIKE $company_id\");\n }", "private function countActiveUsers(): void\n {\n $userIds = [];\n for($i=0; $i <= 11; $i++)\n {\n $userIds[$i] = [];\n }\n\n Order :: where( 'charging_status', OrderStatusEnum :: FINISHED ) -> get()\n -> filter(function($order) {\n return $order -> created_at && $order -> created_at -> year == $this -> year;\n })\n -> each(function($order) use( &$userIds ) {\n array_push($userIds[ $order -> created_at -> month - 1], $order -> user_id); \n });\n\n\n for($i = 0; $i <= 11; $i++)\n {\n $this -> data[ self :: ACTIVE ][$i] = count(array_unique($userIds[$i]));\n }\n }", "function count_active()\n{\n\trequire_once('../conf/config.php');\n\t//Connect to mysql server\n\t$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);\n\tif(!$link)\n\t{\n\t\tdie('Failed to connect to server: ' . mysql_error());\n\t}\n\t//Select database\n\t$db = mysql_select_db(DB_DATABASE);\n\tif(!$db)\n\t{\n\t\tdie(\"Unable to select database\");\n\t}\n\t//\n\t$query=\"SELECT count(*) cnt FROM `members` WHERE passwd like '\\$P%'\";\n\t$result = mysql_query($query) or die(\"<b>A fatal MySQL error occured</b>.\\n<br />Query: \" . $query . \"<br />\\nError: (\" . mysql_errno() . \") \" . mysql_error());\n\twhile ($row = mysql_fetch_assoc($result))\n\t{\n\t\textract($row);\n\t}\n\treturn $cnt;\n}", "function count_all_users($option = '')\r\n {\r\n \tif ($option == 'disabled')\r\n \t\t$this->db->where('disabled !=', '0');\r\n \telseif ($option == 'active')\r\n \t\t$this->db->where('disabled', '0');\r\n\r\n $query = $this->db->get('users');\r\n return $query->num_rows();\r\n }", "public function getTotalUsers() {\n\t\t//mvds\n\t\t$sql = \"SELECT COUNT(*) AS total FROM `\" . DB_PREFIX . \"user`\";\n\t\tif (isset($this->request->get['filter_status']) && !is_null($this->request->get['filter_status'])) {\n\t\t\t$sql .= \" WHERE status = '\" . (int)$this->request->get['filter_status'] . \"'\";\n\t\t}\n\t\t$query = $this->db->query($sql);\n\t\t//mvde\n\t\treturn $query->row['total'];\n\t}", "public function countUsers($activeOnly = null)\n { \n if ($activeOnly) {\n $users = \\Models\\Users\\UsersQuery::create()->filterByActive(1)->find();\n } else {\n $users = \\Models\\Users\\UsersQuery::create()->find();\n }\n\n return count($users);\n }", "public function get_users_online()\n {\n $logged_in_users = get_transient('agents_online'); //Get the active users from the transient.\n $count = 0;\n\n if($logged_in_users) {\n foreach ($logged_in_users as $logged_in_user) {\n if (isset($logged_in_user['last']) && ($logged_in_user['last'] > (time()-60) )) {\n $count++;\n }\n }\n } \n \n echo $count;\n die();\n }", "function countUsers(){\n\t\n\t}", "public function getCount()\n {\n return $this->appUser->count();\n }", "function pagination()\n {\n $qgroups = $this->db->query(\"SELECT COUNT(id) AS total FROM groups WHERE id_user='\".$this->general->id_user().\"'\");\n return $qgroups->row()->total;\n }", "public function getCountUser()\n {\n return $this->users_model->countAll();\n }", "static function countAdministrators() {\n return Users::count(\"type = 'Administrator' AND state = '\" . STATE_VISIBLE . \"'\");\n }", "function get_user_count() {\n\treturn get_site_option( 'user_count' );\n}", "public static function getUserCount()\n {\n $link = TDOUtil::getDBLink();\n if(!$link) \n {\n return false;\n }\n\t\t$result = mysql_query(\"SELECT COUNT(*) FROM tdo_user_accounts \");\n\n\t\tif($result)\n\t\t{\n\t\t\tif($row = mysql_fetch_array($result))\n\t\t\t{\n if(isset($row['0']))\n {\n \t\t\tTDOUtil::closeDBLink($link);\n return $row['0'];\n }\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\terror_log(\"Unable to get user count\");\n\t\t}\n\n TDOUtil::closeDBLink($link);\n return false;\n }", "function active_notifications_count($cond=array())\r\n\t{\r\n\t\t$c_filter = '';\r\n\t\tif (is_domain_user() == true) {\r\n\t\t\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\r\n\t\t}\r\n\t\tif (valid_array($cond)) {\r\n\t\t\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\r\n\t\t}\r\n\t\t$query = 'select count(*) as active_notification_count \r\n\t\t\t\tfrom timeline TL \r\n\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\tJOIN timeline_event_user_map TEU ON TEU.timeline_fk=TL.origin\r\n\t\t\t\tJOIN user U on U.user_id=TEU.user_id and TEU.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\twhere TL.event_origin=TLE.origin and TEU.viewed_datetime IS NULL '. $c_filter.' group by TEU.user_id';\r\n\t\t$total_records = $this->CI->db->query($query)->row_array();\r\n\t\treturn intval(@$total_records['active_notification_count']);\r\n\t}", "public function session_count($user_id = null, $start_date = null, $end_date = null, $activitygroup_id = null, $unit_id = null, $is_publish = null) {\n $conditions = array();\n\n $conditions['AND']['not'] = array('Activity.id'=>null);\n\n if(!empty($user_id)){\n $conditions['AND'][$this->alias . \".countuser_id\"] = $user_id;\n }\n if(!empty($start_date)){\n $conditions['AND'][$this->alias . \".date >=\"] = $start_date;\n }\n if(!empty($end_date)){\n $conditions['AND'][$this->alias . \".date <=\"] = $end_date;\n }\n if(!empty($activitygroup_id)){\n $conditions['AND'][\"Activity.activitygroup_id\"] = $activitygroup_id;\n }\n if(!empty($unit_id)){\n $conditions['AND'][$this->Activity->Unit->alias.\".id\"] = $unit_id;\n }\n\n if(isset($is_publish)){\n if($is_publish === 0){\n $conditions['AND'][\"Activity.publish\"] = 0;\n }else if($is_publish === 1){\n $conditions['AND'][\"Activity.publish\"] = 1;\n }\n }\n\n\n $options = array(\n 'fields' => array(\n \"sum(Activitysession.session) AS total_count\",\n ),\n 'link' => array(\n 'Activity'=>array(\n 'link'=>array(\n 'Activitytype',\n 'Unit'\n )\n ),\n 'Countuser',\n\n ),\n \"conditions\"=>$conditions\n );\n\n $tmp = $this->find('all',$options);\n\n if(!$tmp){\n return \"0\";\n }else{\n return ($tmp[0][0]['total_count']==null)?\"0\":$tmp[0][0]['total_count'];\n }\n }", "function getALlUserCount()\n {\n return $this->db->count_all_results('users');\n }", "function getUsersCount()\n\t\t{\n\t\t\tglobal $CFG;\n\t\t\tglobal $objSmarty;\n\t\t\t$sql_qry = \"SELECT count(user_id) as user_count FROM \".$CFG['table']['register'].\"\";\n\t\t \t$res_qry = $this->ExecuteQuery($sql_qry,'select');\n\t\t \treturn $res_qry[0]['user_count'];\n\t\t}", "function getUserCount()\r\n {\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n $query = 'SELECT count(*) from #__'.$this->getTablename();\r\n $db->setQuery($query );\r\n\r\n //getting the results\r\n return $db->loadResult();\r\n }", "function acadp_get_user_total_active_listings() {\n\n\tglobal $wpdb;\n\n\t$where = get_posts_by_author_sql( 'acadp_listings', true, get_current_user_id(), true );\n\t$count = $wpdb->get_var( \"SELECT COUNT(ID) FROM $wpdb->posts $where\" );\n\n \treturn $count;\n\n}" ]
[ "0.6832371", "0.66593885", "0.66593885", "0.6559747", "0.643291", "0.63595915", "0.6332281", "0.63153845", "0.62868035", "0.6267492", "0.6158852", "0.61100954", "0.6106551", "0.6067654", "0.6055256", "0.60469246", "0.6041743", "0.60340977", "0.59993833", "0.5975531", "0.5963564", "0.5947653", "0.59417635", "0.5939907", "0.5939843", "0.5921822", "0.5919605", "0.591627", "0.58675814", "0.5854711" ]
0.78798926
0
Return the users count for each value associated with the metadata provided
function statistics_extended_users_metadata_count($metadata,$group=null){ $sector_metadata = get_metastring_id($metadata); $dbprefix = elgg_get_config('dbprefix'); $query = "SELECT mv.string AS data, count(*) as total "; $query .= "FROM {$dbprefix}users_entity ue "; $query .= "JOIN " . $dbprefix . "entities e ON e.guid = ue.guid AND e.enabled='yes' "; $query .= "JOIN {$dbprefix}metadata m ON ue.guid = m.entity_guid "; $query .= "JOIN {$dbprefix}metastrings mv ON m.value_id = mv.id "; $query .= "WHERE m.name_id = {$sector_metadata} "; if(!empty($group)){ $query.="AND ue.guid IN (SELECT guid_one FROM {$dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) "; } $query .= "GROUP BY data"; $resp = array(); $entities = get_data($query); if (! empty($entities)) { foreach ( $entities as $entity ) { $resp[$entity->data] = $entity->total; } } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function statistics_extended_users_metadata_value_count($metadata,$value,$group=null){\r\n $sector_metadata = get_metastring_id($metadata);\r\n $dbprefix = elgg_get_config('dbprefix');\r\n\r\n $query = \"SELECT mv.string AS data, count(*) as total \";\r\n $query .= \"FROM {$dbprefix}users_entity ue \";\r\n $query .= \"JOIN {$dbprefix}entities e ON ue.guid = e.guid AND e.enabled='yes'\";\r\n $query .= \"JOIN {$dbprefix}metadata m ON ue.guid = m.entity_guid \";\r\n $query .= \"JOIN {$dbprefix}metastrings mv ON m.value_id = mv.id \";\r\n $query .= \"JOIN {$dbprefix}metadata m2 ON ue.guid = m2.entity_guid \";\r\n $query .= \"JOIN {$dbprefix}metastrings m2v ON m.value_id = m2v.id \";\r\n $query .= \"WHERE m.name_id = {$sector_metadata} \";\r\n $query .= \"AND m2v.string like '$value' \";\r\n if(!empty($group)){\r\n $query.=\"AND ue.guid IN (SELECT guid_one FROM {$dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) \";\r\n }\r\n\r\n $query .= \"GROUP BY data\";\r\n $resp = array();\r\n $entities = get_data($query);\r\n if (! empty($entities)) {\r\n foreach ( $entities as $entity ) {\r\n $resp[$entity->data] = $entity->total;\r\n }\r\n }\r\n return $resp;\r\n}", "private static function get_user_counts() {\n\t\t$user_count = array();\n\t\t$user_count_data = count_users();\n\t\t$user_count['total'] = $user_count_data['total_users'];\n\n\t\t// Get user count based on user role\n\t\tforeach ( $user_count_data['avail_roles'] as $role => $count ) {\n\t\t\t$user_count[ $role ] = $count;\n\t\t}\n\n\t\treturn $user_count;\n\t}", "function countUsers(){\n\t\n\t}", "function getAllUsersCount() {\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n try {\n\t\t $params = null;\n $userObj = new App42Response();\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/count/all\";\n $response = RestClient::get($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $userObj->setStrResponse($response->getResponse());\n $userObj->setResponseSuccess(true);\n $userResponseObj = new UserResponseBuilder();\n $userObj->setTotalRecords($userResponseObj->getTotalRecords($response->getResponse()));\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }", "function statistics_extended_groups_metadata_value_count($metadata,$value,$group=null){\r\n $sector_metadata = get_metastring_id($metadata);\r\n $dbprefix = elgg_get_config('dbprefix');\r\n\r\n $query = \"SELECT mv.string AS data, count(*) as total \";\r\n $query .= \"FROM {$dbprefix}groups_entity ue \";\r\n $query .= \"JOIN {$dbprefix}metadata m ON ue.guid = m.entity_guid \";\r\n $query .= \"JOIN {$dbprefix}metastrings mv ON m.value_id = mv.id \";\r\n $query .= \"JOIN {$dbprefix}metadata m2 ON ue.guid = m2.entity_guid \";\r\n $query .= \"JOIN {$dbprefix}metastrings m2v ON m.value_id = m2v.id \";\r\n $query .= \"WHERE m.name_id = {$sector_metadata} \";\r\n $query .= \"AND m2v.string like '$value' \";\r\n if(!empty($group)){\r\n $query.=\"AND ue.guid IN (SELECT guid_one FROM {$dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) \";\r\n }\r\n\r\n $query .= \"GROUP BY data\";\r\n $resp = array();\r\n $entities = get_data($query);\r\n if (! empty($entities)) {\r\n foreach ( $entities as $entity ) {\r\n $resp[$entity->data] = $entity->total;\r\n }\r\n }\r\n return $resp;\r\n}", "function dokan_get_seller_count() {\n global $wpdb;\n\n\n $counts = array( 'yes' => 0, 'no' => 0 );\n\n $result = $wpdb->get_results( \"SELECT COUNT(um.user_id) as count, um1.meta_value as type\n FROM $wpdb->usermeta um\n LEFT JOIN $wpdb->usermeta um1 ON um1.user_id = um.user_id\n WHERE um.meta_key = 'wp_capabilities' AND um1.meta_key = 'dokan_enable_selling'\n AND um.meta_value LIKE '%seller%'\n GROUP BY um1.meta_value\" );\n\n if ( $result ) {\n foreach ($result as $row) {\n $counts[$row->type] = (int) $row->count;\n }\n }\n\n return $counts;\n}", "function getUsersCount() {\n $company_id = $this->getId(); \n \treturn Users::count(\"company_id LIKE $company_id\");\n }", "public function getCount()\n {\n return $this->appUser->count();\n }", "public function getCountUser()\n {\n return $this->users_model->countAll();\n }", "public function getUsersCount()\n {\n return $this->count(self::_USERS);\n }", "public function getUserCount() {\n return @$this->attributes['user_count'];\n }", "public function getUsageCount()\n {\n $today = Carbon::now('Asia/Singapore')->toDateTimeString();\n $timezone = new Carbon('Asia/Singapore');\n $last_thirty_days = $timezone->subDays(30);\n\n return count($this->appUserBlurb->where('interaction_type', 'use')->whereBetween('created_at', array($last_thirty_days->toDateTimeString(), $today))->groupBy('app_user_id')->get());\n }", "public function user_count() {\r\n\t\tif (is_array($this->users))\r\n\t\t\treturn sizeof($this->users);\r\n\t\t$this->users = [];\r\n\t\treturn 0;\r\n\t}", "public function countUsers() {\n require('database.php');\n if ($result = $mysqli->query('SELECT Count(Distinct id) as count\n FROM users')) {\n while ($row = $result->fetch_assoc()) {\n echo $row['count'];\n }\n }\n }", "private function countRegisteredUsers( &$users ): void\n {\n foreach($users as $user)\n {\n if( $user -> created_at && $user -> created_at -> year == $this -> year)\n {\n $this -> data[ self :: REGISTERED ][ $user -> created_at -> month - 1 ]++;\n }\n }\n }", "function getUsersCount()\n\t\t{\n\t\t\tglobal $CFG;\n\t\t\tglobal $objSmarty;\n\t\t\t$sql_qry = \"SELECT count(user_id) as user_count FROM \".$CFG['table']['register'].\"\";\n\t\t \t$res_qry = $this->ExecuteQuery($sql_qry,'select');\n\t\t \treturn $res_qry[0]['user_count'];\n\t\t}", "public function getTotalUsersCount()\n {\n if (array_key_exists(\"totalUsersCount\", $this->_propDict)) {\n return $this->_propDict[\"totalUsersCount\"];\n } else {\n return null;\n }\n }", "public function count()\n {\n return $this->db->count_all('us_user');\n }", "public function stats() {\n\t\t$userCount = 0;\n\t\tif ($this->isAdmin) {\n\t\t\t$countByBackend = $this->userManager->countUsers();\n\n\t\t\tif (!empty($countByBackend)) {\n\t\t\t\tforeach ($countByBackend as $count) {\n\t\t\t\t\t$userCount += $count;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t'@phan-var \\OC\\Group\\Manager $this->groupManager';\n\t\t\t$groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($this->userSession->getUser());\n\n\t\t\t$uniqueUsers = [];\n\t\t\tforeach ($groups as $group) {\n\t\t\t\tforeach ($group->getUsers() as $uid => $displayName) {\n\t\t\t\t\t$uniqueUsers[$uid] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$userCount = \\count($uniqueUsers);\n\t\t}\n\n\t\treturn new DataResponse(\n\t\t\t[\n\t\t\t\t'totalUsers' => $userCount\n\t\t\t]\n\t\t);\n\t}", "function getALlUserCount()\n {\n return $this->db->count_all_results('users');\n }", "public function getUserCount()\n {\n return $this->userCount;\n }", "public function countUsers()\n\t{\n \treturn $this\n \t->createQueryBuilder('u')\n \t->select('COUNT(u)')\n \t->getQuery()->getSingleScalarResult();\n\t}", "public function getUsersCount()\n {\n return count($this->userRepo->findAll());\n }", "function countUsers(){\n return $this->db->count_all('user');\n \t}", "public function getCountUsers(){\n $connect = ConnectionManager::get('default');\n $fila = $connect->execute(\"select count(*) from Usuarios;\")->fetchAll();\n return $fila[0];\n }", "public abstract function get_counts();", "public function getTotalUsers() {\n\t\t//mvds\n\t\t$sql = \"SELECT COUNT(*) AS total FROM `\" . DB_PREFIX . \"user`\";\n\t\tif (isset($this->request->get['filter_status']) && !is_null($this->request->get['filter_status'])) {\n\t\t\t$sql .= \" WHERE status = '\" . (int)$this->request->get['filter_status'] . \"'\";\n\t\t}\n\t\t$query = $this->db->query($sql);\n\t\t//mvde\n\t\treturn $query->row['total'];\n\t}", "public function statistic( $user_ids ) {\n $this->load->library('Socializer/socializer');\n foreach($user_ids as $user_id) {\n $user = new User($user_id);\n $profiles = $user->social_group->get();\n foreach($profiles as $profile) {\n $tokens = $profile->access_token->where_in(\n 'type', array('twitter', 'facebook', 'linkedin', 'google')\n )->get()->all_to_array();\n foreach($tokens as $token) {\n $result = 0;\n try {\n if ($token['type'] == 'twitter') {\n /* @var Socializer_Twitter $twitter */\n $twitter = Socializer::factory('Twitter', $user_id, $token);\n $result += $twitter->get_followers_count();\n unset($twitter);\n } elseif($token['type'] == 'facebook') {\n /* @var Socializer_Facebook $facebook */\n $facebook = Socializer::factory('Facebook', $user_id, $token);\n $result += $facebook->get_page_likes_count();\n unset($facebook);\n } elseif($token['type'] == 'linkedin') {\n /* @var Socializer_Linkedin $linkedin */\n $linkedin = Socializer::factory('Linkedin', $user_id, $token);\n $result += $linkedin->get_conns_count();\n unset($linkedin);\n } elseif($token['type'] == 'google') {\n /* @var Socializer_Google $google */\n $google = Socializer::factory('Google', $user_id, $token);\n $result += $google->getPeopleCount();\n unset($google);\n }\n } catch(Exception $e) {\n log_message('TASK_ERROR', __FUNCTION__ . ' > ' . $e->getMessage());\n }\n $this->_save_values($user_id, $profile->id, $result, $token['type']);\n }\n }\n }\n }", "private function getCount()\n {\n $bd = Core::getBdd()->getDb();\n $u_insc_c = \"SELECT DISTINCT COUNT(u.id) as c FROM c_user u\";\n $insc = 0 + $bd->query($u_insc_c)->fetchObject()->c;\n return ($insc);\n }", "public function getUsersCount()\n {\n return $this->manager->createQuery('SELECT COUNT(u) FROM App\\Entity\\User u')->getSingleScalarResult();\n }" ]
[ "0.75726104", "0.65521216", "0.65357804", "0.6373776", "0.63681424", "0.6217052", "0.6191308", "0.615676", "0.61566746", "0.6114683", "0.610684", "0.61005414", "0.60547996", "0.6028052", "0.602263", "0.5984046", "0.59714913", "0.5970036", "0.59618163", "0.59512293", "0.594643", "0.593565", "0.5933998", "0.59271824", "0.59203595", "0.59155214", "0.59113777", "0.589773", "0.58596087", "0.58586514" ]
0.72757226
1
Return the users count for each value associated with the metadata provided
function statistics_extended_users_metadata_value_count($metadata,$value,$group=null){ $sector_metadata = get_metastring_id($metadata); $dbprefix = elgg_get_config('dbprefix'); $query = "SELECT mv.string AS data, count(*) as total "; $query .= "FROM {$dbprefix}users_entity ue "; $query .= "JOIN {$dbprefix}entities e ON ue.guid = e.guid AND e.enabled='yes'"; $query .= "JOIN {$dbprefix}metadata m ON ue.guid = m.entity_guid "; $query .= "JOIN {$dbprefix}metastrings mv ON m.value_id = mv.id "; $query .= "JOIN {$dbprefix}metadata m2 ON ue.guid = m2.entity_guid "; $query .= "JOIN {$dbprefix}metastrings m2v ON m.value_id = m2v.id "; $query .= "WHERE m.name_id = {$sector_metadata} "; $query .= "AND m2v.string like '$value' "; if(!empty($group)){ $query.="AND ue.guid IN (SELECT guid_one FROM {$dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) "; } $query .= "GROUP BY data"; $resp = array(); $entities = get_data($query); if (! empty($entities)) { foreach ( $entities as $entity ) { $resp[$entity->data] = $entity->total; } } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function statistics_extended_users_metadata_count($metadata,$group=null){\r\n $sector_metadata = get_metastring_id($metadata);\r\n $dbprefix = elgg_get_config('dbprefix');\r\n\r\n $query = \"SELECT mv.string AS data, count(*) as total \";\r\n $query .= \"FROM {$dbprefix}users_entity ue \";\r\n $query .= \"JOIN \" . $dbprefix . \"entities e ON e.guid = ue.guid AND e.enabled='yes' \";\r\n $query .= \"JOIN {$dbprefix}metadata m ON ue.guid = m.entity_guid \";\r\n $query .= \"JOIN {$dbprefix}metastrings mv ON m.value_id = mv.id \";\r\n $query .= \"WHERE m.name_id = {$sector_metadata} \";\r\n if(!empty($group)){\r\n $query.=\"AND ue.guid IN (SELECT guid_one FROM {$dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) \";\r\n }\r\n\r\n $query .= \"GROUP BY data\";\r\n $resp = array();\r\n $entities = get_data($query);\r\n if (! empty($entities)) {\r\n foreach ( $entities as $entity ) {\r\n $resp[$entity->data] = $entity->total;\r\n }\r\n }\r\n return $resp;\r\n}", "private static function get_user_counts() {\n\t\t$user_count = array();\n\t\t$user_count_data = count_users();\n\t\t$user_count['total'] = $user_count_data['total_users'];\n\n\t\t// Get user count based on user role\n\t\tforeach ( $user_count_data['avail_roles'] as $role => $count ) {\n\t\t\t$user_count[ $role ] = $count;\n\t\t}\n\n\t\treturn $user_count;\n\t}", "function countUsers(){\n\t\n\t}", "function getAllUsersCount() {\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n try {\n\t\t $params = null;\n $userObj = new App42Response();\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/count/all\";\n $response = RestClient::get($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $userObj->setStrResponse($response->getResponse());\n $userObj->setResponseSuccess(true);\n $userResponseObj = new UserResponseBuilder();\n $userObj->setTotalRecords($userResponseObj->getTotalRecords($response->getResponse()));\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }", "function statistics_extended_groups_metadata_value_count($metadata,$value,$group=null){\r\n $sector_metadata = get_metastring_id($metadata);\r\n $dbprefix = elgg_get_config('dbprefix');\r\n\r\n $query = \"SELECT mv.string AS data, count(*) as total \";\r\n $query .= \"FROM {$dbprefix}groups_entity ue \";\r\n $query .= \"JOIN {$dbprefix}metadata m ON ue.guid = m.entity_guid \";\r\n $query .= \"JOIN {$dbprefix}metastrings mv ON m.value_id = mv.id \";\r\n $query .= \"JOIN {$dbprefix}metadata m2 ON ue.guid = m2.entity_guid \";\r\n $query .= \"JOIN {$dbprefix}metastrings m2v ON m.value_id = m2v.id \";\r\n $query .= \"WHERE m.name_id = {$sector_metadata} \";\r\n $query .= \"AND m2v.string like '$value' \";\r\n if(!empty($group)){\r\n $query.=\"AND ue.guid IN (SELECT guid_one FROM {$dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) \";\r\n }\r\n\r\n $query .= \"GROUP BY data\";\r\n $resp = array();\r\n $entities = get_data($query);\r\n if (! empty($entities)) {\r\n foreach ( $entities as $entity ) {\r\n $resp[$entity->data] = $entity->total;\r\n }\r\n }\r\n return $resp;\r\n}", "function dokan_get_seller_count() {\n global $wpdb;\n\n\n $counts = array( 'yes' => 0, 'no' => 0 );\n\n $result = $wpdb->get_results( \"SELECT COUNT(um.user_id) as count, um1.meta_value as type\n FROM $wpdb->usermeta um\n LEFT JOIN $wpdb->usermeta um1 ON um1.user_id = um.user_id\n WHERE um.meta_key = 'wp_capabilities' AND um1.meta_key = 'dokan_enable_selling'\n AND um.meta_value LIKE '%seller%'\n GROUP BY um1.meta_value\" );\n\n if ( $result ) {\n foreach ($result as $row) {\n $counts[$row->type] = (int) $row->count;\n }\n }\n\n return $counts;\n}", "function getUsersCount() {\n $company_id = $this->getId(); \n \treturn Users::count(\"company_id LIKE $company_id\");\n }", "public function getCount()\n {\n return $this->appUser->count();\n }", "public function getCountUser()\n {\n return $this->users_model->countAll();\n }", "public function getUsersCount()\n {\n return $this->count(self::_USERS);\n }", "public function getUserCount() {\n return @$this->attributes['user_count'];\n }", "public function getUsageCount()\n {\n $today = Carbon::now('Asia/Singapore')->toDateTimeString();\n $timezone = new Carbon('Asia/Singapore');\n $last_thirty_days = $timezone->subDays(30);\n\n return count($this->appUserBlurb->where('interaction_type', 'use')->whereBetween('created_at', array($last_thirty_days->toDateTimeString(), $today))->groupBy('app_user_id')->get());\n }", "public function user_count() {\r\n\t\tif (is_array($this->users))\r\n\t\t\treturn sizeof($this->users);\r\n\t\t$this->users = [];\r\n\t\treturn 0;\r\n\t}", "public function countUsers() {\n require('database.php');\n if ($result = $mysqli->query('SELECT Count(Distinct id) as count\n FROM users')) {\n while ($row = $result->fetch_assoc()) {\n echo $row['count'];\n }\n }\n }", "private function countRegisteredUsers( &$users ): void\n {\n foreach($users as $user)\n {\n if( $user -> created_at && $user -> created_at -> year == $this -> year)\n {\n $this -> data[ self :: REGISTERED ][ $user -> created_at -> month - 1 ]++;\n }\n }\n }", "function getUsersCount()\n\t\t{\n\t\t\tglobal $CFG;\n\t\t\tglobal $objSmarty;\n\t\t\t$sql_qry = \"SELECT count(user_id) as user_count FROM \".$CFG['table']['register'].\"\";\n\t\t \t$res_qry = $this->ExecuteQuery($sql_qry,'select');\n\t\t \treturn $res_qry[0]['user_count'];\n\t\t}", "public function getTotalUsersCount()\n {\n if (array_key_exists(\"totalUsersCount\", $this->_propDict)) {\n return $this->_propDict[\"totalUsersCount\"];\n } else {\n return null;\n }\n }", "public function count()\n {\n return $this->db->count_all('us_user');\n }", "public function stats() {\n\t\t$userCount = 0;\n\t\tif ($this->isAdmin) {\n\t\t\t$countByBackend = $this->userManager->countUsers();\n\n\t\t\tif (!empty($countByBackend)) {\n\t\t\t\tforeach ($countByBackend as $count) {\n\t\t\t\t\t$userCount += $count;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t'@phan-var \\OC\\Group\\Manager $this->groupManager';\n\t\t\t$groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($this->userSession->getUser());\n\n\t\t\t$uniqueUsers = [];\n\t\t\tforeach ($groups as $group) {\n\t\t\t\tforeach ($group->getUsers() as $uid => $displayName) {\n\t\t\t\t\t$uniqueUsers[$uid] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$userCount = \\count($uniqueUsers);\n\t\t}\n\n\t\treturn new DataResponse(\n\t\t\t[\n\t\t\t\t'totalUsers' => $userCount\n\t\t\t]\n\t\t);\n\t}", "function getALlUserCount()\n {\n return $this->db->count_all_results('users');\n }", "public function getUserCount()\n {\n return $this->userCount;\n }", "public function countUsers()\n\t{\n \treturn $this\n \t->createQueryBuilder('u')\n \t->select('COUNT(u)')\n \t->getQuery()->getSingleScalarResult();\n\t}", "public function getUsersCount()\n {\n return count($this->userRepo->findAll());\n }", "function countUsers(){\n return $this->db->count_all('user');\n \t}", "public function getCountUsers(){\n $connect = ConnectionManager::get('default');\n $fila = $connect->execute(\"select count(*) from Usuarios;\")->fetchAll();\n return $fila[0];\n }", "public abstract function get_counts();", "public function getTotalUsers() {\n\t\t//mvds\n\t\t$sql = \"SELECT COUNT(*) AS total FROM `\" . DB_PREFIX . \"user`\";\n\t\tif (isset($this->request->get['filter_status']) && !is_null($this->request->get['filter_status'])) {\n\t\t\t$sql .= \" WHERE status = '\" . (int)$this->request->get['filter_status'] . \"'\";\n\t\t}\n\t\t$query = $this->db->query($sql);\n\t\t//mvde\n\t\treturn $query->row['total'];\n\t}", "public function statistic( $user_ids ) {\n $this->load->library('Socializer/socializer');\n foreach($user_ids as $user_id) {\n $user = new User($user_id);\n $profiles = $user->social_group->get();\n foreach($profiles as $profile) {\n $tokens = $profile->access_token->where_in(\n 'type', array('twitter', 'facebook', 'linkedin', 'google')\n )->get()->all_to_array();\n foreach($tokens as $token) {\n $result = 0;\n try {\n if ($token['type'] == 'twitter') {\n /* @var Socializer_Twitter $twitter */\n $twitter = Socializer::factory('Twitter', $user_id, $token);\n $result += $twitter->get_followers_count();\n unset($twitter);\n } elseif($token['type'] == 'facebook') {\n /* @var Socializer_Facebook $facebook */\n $facebook = Socializer::factory('Facebook', $user_id, $token);\n $result += $facebook->get_page_likes_count();\n unset($facebook);\n } elseif($token['type'] == 'linkedin') {\n /* @var Socializer_Linkedin $linkedin */\n $linkedin = Socializer::factory('Linkedin', $user_id, $token);\n $result += $linkedin->get_conns_count();\n unset($linkedin);\n } elseif($token['type'] == 'google') {\n /* @var Socializer_Google $google */\n $google = Socializer::factory('Google', $user_id, $token);\n $result += $google->getPeopleCount();\n unset($google);\n }\n } catch(Exception $e) {\n log_message('TASK_ERROR', __FUNCTION__ . ' > ' . $e->getMessage());\n }\n $this->_save_values($user_id, $profile->id, $result, $token['type']);\n }\n }\n }\n }", "private function getCount()\n {\n $bd = Core::getBdd()->getDb();\n $u_insc_c = \"SELECT DISTINCT COUNT(u.id) as c FROM c_user u\";\n $insc = 0 + $bd->query($u_insc_c)->fetchObject()->c;\n return ($insc);\n }", "public function getUsersCount()\n {\n return $this->manager->createQuery('SELECT COUNT(u) FROM App\\Entity\\User u')->getSingleScalarResult();\n }" ]
[ "0.72757226", "0.65521216", "0.65357804", "0.6373776", "0.63681424", "0.6217052", "0.6191308", "0.615676", "0.61566746", "0.6114683", "0.610684", "0.61005414", "0.60547996", "0.6028052", "0.602263", "0.5984046", "0.59714913", "0.5970036", "0.59618163", "0.59512293", "0.594643", "0.593565", "0.5933998", "0.59271824", "0.59203595", "0.59155214", "0.59113777", "0.589773", "0.58596087", "0.58586514" ]
0.75726104
0
Return the number of visits made from group members
function statistics_extended_members_views($group){ global $CONFIG; if(!empty($group)){ $query = "SELECT sum(m.string) as count FROM {$CONFIG->dbprefix}annotations a, {$CONFIG->dbprefix}metastrings m "; $views_counter_id = get_metastring_id("views_counter"); $query.= "WHERE name_id={$views_counter_id} "; $query.= "AND entity_guid={$group} "; $query.= "AND owner_guid IN (SELECT guid_one FROM {$CONFIG->dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) "; $query.= "AND a.value_id = m.id"; $count = get_data_row($query); return $count->count; } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNumberOfMembers(){\n\t\t$number = 0;\n\t\tforeach ($this->members as $obj){\n\t\t\t$number++;\n\t\t}\n\t\treturn $number;\n\t}", "public function count()\n\t{\n\t\tif( $this->isDynamic )\n\t\t\tmwarning('unsupported with Dynamic Address Groups');\n\t\treturn count($this->members);\n\t}", "public function getMemberCount()\n {\n return $this->get('members');\n }", "public function countMembers()\n {\n return $this->users->count();\n }", "public function getMemberCount() {\r\n if(is_null($this->cached_member_count )) {\r\n $this->reloadMemberCount();\r\n }\r\n return $this->cached_member_count;\r\n }", "public function getMemberCnt()\n {\n return $this->get(self::_MEMBER_CNT);\n }", "function pull_member_cnt() {\n $query = $this->db->get('members_tbl');\n return $query->num_rows();\n }", "public static function visitorCount() {\n\t\treturn self::$sessionInstance->visitorCount ();\n\t}", "public function count()\n {\n return count($this->groups);\n }", "public function count()\n {\n return count($this->group);\n }", "function countMembers() {\n\t\t$result = $this->MySQL->query(\"SELECT * FROM \".$this->MySQL->get_tablePrefix().\"members WHERE \".$this->strTableKey.\" = '\".$this->intTableKeyValue.\"'\");\n\t\t$num_rows = $result->num_rows;\n\t\t\n\t\t\n\t\treturn $num_rows;\n\t}", "public function getMembersCount()\n {\n return $this->count(self::_MEMBERS);\n }", "public function getMembersCount()\n {\n return $this->count(self::_MEMBERS);\n }", "function getMembersCount(){\n $this->db->select('*');\n $this->db->from('users'); \n $query = $this->db->get();\n\n return $query->num_rows();\n }", "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}", "private function getFacebookGroupMembers(){\n $group_id = $this->container->getParameter('facebook_group_id');\n\n $access_token = \"CAACEdEose0cBAPjsvVz4m7woCUaePQczZCswNhIC4yHGUZCnMG6Pxu9ZAcPHnVQHPEx2WnntUPxqlgFfGHhKFQMBPY7keej5bVHcARbsY8KIXrSM7cJstbZA4NROLNDjcQ1A0ceombbSEJRDklYssZBw7MERMYhGpPBMxFD93fBxcDqZA92KBEAI60eKl8SSBzW1ZCpCRoetRVMAz8KVCu9\";\n $base_url = \"https://graph.facebook.com/\";\n $url = $base_url . $group_id . '/members?access_token=' . $access_token;\n\n $total_members = 0;\n $content = $this->get_fcontent($url);\n $json = json_decode($content[0],true);\n while (!empty($json['paging']['next'])){\n $total_members += count($json['data']);\n $content=$this->get_fcontent($json['paging']['next']);\n $json=json_decode($content[0],true);\n }\n return $total_members;\n }", "public function getBillableMemberCount();", "public static function getNumberOfGroups()\n {\n return ValveGroup::count();\n }", "function getNumMembers(){\n\t\tif($this->num_members < 0){\n\t\t\t$q = \"SELECT * FROM \".TBL_USERS;\n\t\t\t$result = mysql_query($q, $this->connection);\n\t\t\t$this->num_members = mysql_numrows($result);\n\t\t}\n\t\treturn $this->num_members;\n\t}", "function getNumMembers(){\r\n if($this->num_members < 0){\r\n $result = $this->connection->query(\"SELECT username FROM \".TBL_USERS);\r\n $this->num_members = $result->rowCount(); \r\n }\r\n return $this->num_members;\r\n }", "function getNumMembers(){\r\n if($this->num_members < 0){\r\n $q = \"SELECT * FROM \".TBL_USERS;\r\n $result = mysql_query($q, $this->connection);\r\n $this->num_members = mysql_numrows($result);\r\n }\r\n return $this->num_members;\r\n }", "function getNumMembers(){\r\n if($this->num_members < 0){\r\n $q = \"SELECT * FROM \".TBL_USERS;\r\n $result = mysql_query($q, $this->connection);\r\n $this->num_members = mysql_numrows($result);\r\n }\r\n return $this->num_members;\r\n }", "public static function getTotalMembers($_id) {\n global $lC_Database, $lC_Language;\n\n $QadminGroups = $lC_Database->query('select count(*) as total from :table_administrators WHERE access_group_id = :id');\n $QadminGroups->bindTable(':table_administrators', TABLE_ADMINISTRATORS);\n $QadminGroups->bindInt(':id', $_id);\n $QadminGroups->execute();\n\n $total = ($QadminGroups->valueInt('total') > 0) ? $QadminGroups->valueInt('total') : 0;\n\n $QadminGroups->freeResult();\n\n return $total;\n }", "public function count()\n {\n $children = @unserialize($this->attributes['__members']);\n if (!is_array($children)) {\n return 0;\n } else {\n return count($children);\n }\n }", "public function getNumFound()\n {\n $group = $this->getSingleGroup();\n\n return $group->getNumberOfGroups();\n }", "public function getVisitedCount()\n {\n return $this->count(self::visited);\n }", "public function countMembers($filters=array())\n\t{\n\t\t$query = \"SELECT COUNT(DISTINCT v.username) \";\n\t\t$query .= $this->_buildMembersQuery($filters);\n\n\t\t$this->_db->setQuery($query);\n\t\treturn $this->_db->loadResult();\n\t}", "function getTotalMembers() {\n if(\n is_object(\n $oStmt = DB::$PDO->query(\n 'SELECT\n COUNT(1)\n FROM\n users'\n )\n )\n &&\n is_array(\n $aTotalMems = $oStmt->fetch(PDO::FETCH_NUM)\n )\n ){\n return $aTotalMems[0];\n } return 0;\n}", "public function getMembersTagsCount()\r\n {\r\n $tmpUser = new Warecorp_User();\r\n $EntityTypeId = $tmpUser->EntityTypeId;\r\n $EntityTypeName = $tmpUser->EntityTypeName;\r\n unset($tmpUser);\r\n\r\n $group = Warecorp_Group_Factory::loadById($this->getGroupId());\r\n $members = $group->getMembers()->setAssocValue('zua.id')->returnAsAssoc()->getList();\r\n\r\n $query = $this->_db->select();\r\n $query->from(array('ztr' => 'zanby_tags__relations'), array());\r\n $query->joininner(array('ztd' => 'zanby_tags__dictionary'), 'ztr.tag_id = ztd.id', array(new Zend_Db_Expr('COUNT(DISTINCT 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 return $this->_db->fetchOne($query);\r\n }", "static function adminGetVisitsCount($id)\r\n {\r\n if ($id)\r\n {\r\n $sql = \"SELECT COUNT(id) FROM metric_visits WHERE metric_id={$id} LIMIT 1\";\r\n $res = Yii::app()->db->createCommand($sql)->queryScalar();\r\n }\r\n return $res;\r\n }" ]
[ "0.6675838", "0.6396771", "0.63923407", "0.63562346", "0.6297543", "0.62482613", "0.6245175", "0.62274414", "0.6182438", "0.60948545", "0.60932815", "0.6081103", "0.6081103", "0.6004672", "0.59015125", "0.58606404", "0.5816076", "0.5803739", "0.57779264", "0.5748414", "0.57459396", "0.57459396", "0.57454264", "0.574512", "0.57299966", "0.5707974", "0.5707503", "0.5699074", "0.5698904", "0.5695864" ]
0.6676654
0
Return the groups count that have the specified property
function statistics_extended_groups_property_count($property){ global $CONFIG; $properties = $CONFIG->group; $labels = array(); $totals = array(); if(array_key_exists($property,$properties)){ list($type,$values) = $properties[$property]; switch($type){ case "checkboxes": case "radio": foreach($values as $label=>$value){ $options = array("types"=>"group","count"=>true,"metadata_names"=>$property,"metadata_values"=>$value); $total = elgg_get_entities_from_metadata($options); $labels[]=$value; $totals[$value]=$total; } break; case "organizational_unit": $query = "SELECT string FROM {$CONFIG->dbprefix}metastrings WHERE id IN "; $query.="(SELECT value_id FROM {$CONFIG->dbprefix}metadata WHERE name_id="; $query.="(SELECT id FROM {$CONFIG->dbprefix}metastrings WHERE string='{$property}'))"; $categories = get_data($query); if(!empty($categories)){ foreach($categories as $category){ $category = $category->string; $options = array("types"=>"group","count"=>true,"metadata_names"=>$property,"metadata_values"=>$category); $total = elgg_get_entities_from_metadata($options); list($section,$department,$unit) = explode("||",$category); $labels[$section]=$section; $totals[$section]+=$total; } } break; case "status": $options = array("types"=>"group","count"=>true); $all_groups = elgg_get_entities($options); $values = array("preparation"=>"groups:extras:status:preparation", "active"=>"groups:extras:status:active", "inactive"=>"groups:extras:status:inactive", "closed"=>"groups:extras:status:closed"); foreach($values as $value=>$label){ $options = array("types"=>"group","count"=>true,"metadata_names"=>$property,"metadata_values"=>$value); $total = elgg_get_entities_from_metadata($options); $labels[]=$label; $totals[$label]=(int)$total; } $totals["groups:extras:status:active"]=$all_groups-$totals["groups:extras:status:inactive"]-$totals["groups:extras:status:closed"]; break; } } else{ switch($property){ case "content_privacy": $options = array("types"=>"group","count"=>true,"metadata_names"=>$property,"metadata_values"=>"no"); $count_no = elgg_get_entities_from_metadata($options); $options = array("types"=>"group","count"=>true,); $all_groups = elgg_get_entities($options); // How content_privacy is a new feature it is no available for all groups $labels[]="yes"; $totals["yes"]=$all_groups - $count_no; $labels[]="no"; $totals["no"]=$count_no; break; case "membership": $values = array( ACCESS_PRIVATE => elgg_echo('groups:access:private'), ACCESS_PUBLIC => elgg_echo('groups:access:public')); foreach($values as $value=>$label){ $options = array("types"=>"group","count"=>true,"metadata_names"=>$property,"metadata_values"=>$value); $total = elgg_get_entities_from_metadata($options); $labels[]=$value; $totals[$value]=$total; } } } return array($labels,$totals); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return count($this->group);\n }", "public function count()\n {\n return count($this->groups);\n }", "public function getGroupProtectedProperty()\n {\n return $this->attributeGroupToDelete ?\n $this->attributeGroupToDelete->attributes->filter(\n fn ($attribute) => (bool) $attribute->system\n )->count() : false;\n }", "public function __get($property)\n\t{\n\t\tswitch ($property)\n\t\t{\n\t\t\tcase 'children_count': return count($this->children);\n\t\t\tcase 'descendents': return $this->get_descendents();\n\t\t\tcase 'descendents_count': return $this->get_descendents_count();\n\t\t}\n\n\t\treturn $this->record->$property;\n\t}", "public function count($criterio=\"\");", "public function get_property_groups(){\n\t\t$endpoint = 'groups';\n\t\ttry{\n\t\t\treturn json_decode($this->execute_get_request($this->get_request_url($endpoint,null)));\n\t\t}\n\t\tcatch(HubSpot_Exception $e){\n\t\t\tprint_r('Unable to retrieve property groups: '.$e);\n\t\t}\n\n\t}", "public function countUsersByProperty($attribute = null, $value = null)\n {\n\n \\Log::info ( \"===== count query begin\" );\n $query = $this->model;\n\n if ( isset( $attribute ) && isset( $value ) ) {\n\n $query = $query->where ( $attribute, $value );\n }\n\n $count = $query->count ();\n \\Log::info ( \"===== count query end\" );\n\n return $count;\n }", "public function hasCount(){\n return $this->_has(3);\n }", "public function getNumFound()\n {\n $group = $this->getSingleGroup();\n\n return $group->getNumberOfGroups();\n }", "static function countForGroup(Group $group) {\n global $DB;\n\n $count = $DB->request([\n 'COUNT' => 'cpt',\n 'FROM' => self::getTable(),\n 'INNER JOIN' => [\n Notification::getTable() => [\n 'ON' => [\n Notification::getTable() => 'id',\n self::getTable() => 'notifications_id'\n ]\n ]\n ],\n 'WHERE' => [\n 'type' => [\n Notification::SUPERVISOR_GROUP_TYPE,\n Notification::GROUP_TYPE\n ],\n 'items_id' => $group->getID()\n ] + getEntitiesRestrictCriteria(Notification::getTable(), '', '', true)\n ])->next();\n return $count['cpt'];\n }", "public function hasCount(){\n return $this->_has(2);\n }", "public function hasCount() {\n return $this->_has(3);\n }", "public function hasCount() {\n return $this->_has(2);\n }", "public function __get($property)\n {\n switch ($property) {\n case 'columns':\n return $this->getColumnCount();\n case 'rows':\n return $this->getRowCount();\n default:\n return null;\n }\n }", "public function subpropertyJoinCountTest() {}", "public function hasCounts(){\n return $this->_has(6);\n }", "public function hasCount() {\n return $this->_has(1);\n }", "public function countBy($criteria);", "public function count()\n {\n $builder = $this->getCountQuery();\n $result = $builder->get();\n\n if (!empty($this->groups)) {\n return count($result);\n } else {\n return $result[0]['count'] ?? 0;\n }\n }", "public function count()\n {\n // NOTE: Cannot use \\COUNT_RECURSIVE because that counts the arrays\n // as well as their contents. We want a count only of Properties.\n $count = 0;\n foreach ($this->data as $key=>$values)\n {\n if (is_array($this->data[$key]))\n $count += count($values);\n else\n $count += 1;\n }\n return $count;\n }", "function count_groups($field = null, $match = null)\n\t{\n\t\treturn get_instance()->kbcore->groups->count($field, $match);\n\t}", "public static function getNumberOfGroups()\n {\n return ValveGroup::count();\n }", "public function hasCount() {\n return $this->_has(4);\n }", "public function groupBy($property)\n {\n $this->group[] = $this->dbFieldName($property);\n }", "public function countValues($resource, $property, $type = null, $lang = null)\n {\n return count($this->all($resource, $property, $type, $lang));\n }", "public function hasGroups(){\n return $this->_has(3);\n }", "public function has($property);", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_photo_gallery_publications($this->get_condition());\r\n }", "public function testProperty(): void\n {\n $property = $this->getMockBuilder(Property::class)->disableOriginalConstructor()->getMock();\n $property->method('property')->willReturn('test_prop');\n $property->method('value')->willReturn('test value');\n $grouping = new Grouping([], [$property]);\n\n $prop = $grouping->property('test_prop');\n $this->assertNotNull($prop);\n $this->assertSame('test value', $prop->value());\n }", "public function __get($property)\n {\n switch ($property) {\n case 'columns':\n return $this->columnCount;\n case 'rows':\n return $this->rowCount;\n default:\n return null;\n }\n }" ]
[ "0.5938531", "0.5887506", "0.5828145", "0.58240306", "0.5754538", "0.5701774", "0.57008326", "0.5686289", "0.5649677", "0.5640473", "0.5637661", "0.55748826", "0.55392474", "0.5536237", "0.549436", "0.54894674", "0.5483929", "0.5452033", "0.5442724", "0.54257077", "0.54253155", "0.5409586", "0.5319803", "0.53151804", "0.53097016", "0.525459", "0.52221537", "0.521732", "0.52140296", "0.5212708" ]
0.7341043
0
Return an array with total number of objects from the specified subtypes
function statistics_extended_objects_count($object_subtypes,$container_guid=null,$owner_guid=null,$object_type='object'){ if(!is_array($object_types)){ $object_types = array($object_subtypes); } $resp = array(); foreach($object_subtypes as $object_subtype){ $resp[$object_subtype] = statistics_extended_object_count($object_subtype,$owner_guid,$container_guid,$object_type); } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countObjects($subtype = \"\");", "public function count_sub_classes()\n {\n $table = $this->return_table();\n return $this->db->count_all($table);\n }", "function statistics_extended_objects_view_count($object_types,$container_guid=null,$owner_guid=null){\r\n\tif(!is_array($object_types)){\r\n\t\t$object_types = array($object_types);\r\n\t}\r\n\t$resp = array();\r\n\tforeach($object_types as $object_type){\r\n\t\t$resp[$object_type] = statistics_extended_object_view_count($object_type,$owner_guid,$container_guid);\r\n\t}\r\n\treturn $resp;\r\n}", "function statistics_extended_object_count($object_subtype,$owner_guid,$container_guid=null,$object_type='object'){\r\n\t$options = array(\r\n\t\t'types'=>$object_type,\r\n\t\t'subtypes'=>$object_subtype,\r\n\t\t'count'=>true,\r\n\t);\r\n\tif($owner_guid!=null){\r\n\t\t$options['owner_guids']=$owner_guid;\r\n\t}\r\n\tif($container_guid!=null){\r\n\t\t$options['container_guids']=$container_guid;\r\n\t}\r\n\r\n\t$count = elgg_get_entities($options);\r\n\t$count = trigger_plugin_hook(\"cop_statistics:object:count\", \"object\",$options,$count);\r\n\treturn $count;\r\n}", "public function getNumberOfTypes(): int;", "public abstract function countObjects();", "protected function _count ($type, $ou = NULL, $filter = '')\n {\n $this->checkAccess($type);\n return objects::count($type, $ou, $filter);\n }", "public function get_item_counts_by_type($type) {\n $counts = array();\n\n foreach ($type as $key) {\n $counts[$key] = 0;\n }\n\n foreach ($this->get_items_by_type($type) as $key => $content) {\n $counts[$key] = count($content);\n }\n\n return $counts;\n }", "public function typeCounts() : array\n {\n $counts = [\n self::CATEGORICAL => 0,\n self::CONTINUOUS => 0,\n self::RESOURCE => 0,\n ];\n\n return array_replace($counts, array_count_values($this->types()));\n }", "public function getCountList(){\n\t\t$select = $this->getListSelect();\n\t\t$stmt = $select->query();\n\t\t$objects = array();\n\t\treturn count($stmt->fetchAll());\n\t}", "function GetSwarmTypeTotal($type)\n \t{\n \t global $swarmtype_count;\n \t $static_type = array();\n \t $move_type = array();\n \t if(is_array($swarmtype_count)) {\n \t foreach($swarmtype_count as $i) {\n\t\t if($i == 'static') {\n \t \tarray_push($static_type,$i);\n \t } else if($i =='move') {\n \t array_push($move_type,$i);\n \t }\n \t }\n \t }\n \t switch($type)\n \t {\n \t \tcase 'static' : return sizeof($static_type); break;\n \t \tcase 'move' : return sizeof($move_type); break;\n \t }\n\t}", "public function testAggregateCount() {\n $this->setupTestEntities();\n\n $view = Views::getView('test_aggregate_count');\n $this->executeView($view);\n\n $this->assertCount(2, $view->result, 'Make sure the count of items is right.');\n\n $types = [];\n foreach ($view->result as $item) {\n // num_records is an alias for id.\n $types[$item->entity_test_name] = $item->num_records;\n }\n\n $this->assertEquals(4, $types['name1']);\n $this->assertEquals(3, $types['name2']);\n }", "public function getTypesCount(bool $published = true) : int {\n $count = 0;\n if( !$this->dry() ){\n /**\n * @var $group GroupModel\n */\n foreach($groups = $this->getGroups($published) as $group){\n $count += $group->getTypesCount($published);\n }\n }\n return $count;\n }", "function get_counts_by_type($repositoryid=null)\n\t{\n\n\t\t$this->db->select(\"count(surveys.id) as total,type\");\n\t\t$this->db->where(\"surveys.published\",1);\n\t\t$this->db->group_by(\"surveys.type\");\n\n\t\tif($repositoryid){\n\t\t\t$this->db->join('survey_repos', 'surveys.id= survey_repos.sid','inner');\n\t\t\t$this->db->where('survey_repos.repositoryid',$repositoryid);\n\t\t}\n\n\t\t$result=$this->db->get(\"surveys\")->result_array();\n\n\t\t$output=array();\n\t\tforeach($result as $row){\n\t\t\t$output[$row['type']]=$row['total'];\n\t\t}\n\n\t\treturn $output;\n\t}", "public function get_object_subtypes()\n {\n }", "public function get_object_subtypes()\n {\n }", "public function get_object_subtypes()\n {\n }", "public function CountPersonTypes() {\n if ((is_null($this->intId)))\n return 0; \n\n // Get the Database Object for this Class\n $objDatabase = Person::GetDatabase();\n \n $strQuery = sprintf(\"SELECT count(*) as total_count FROM person_persontype_assn WHERE person_id = %s\", $this->intId);\n \n // Perform the Query\n $objDbResult = $objDatabase->Query($strQuery); \n $row = $objDbResult->FetchArray();\n return $row['total_count'];\n }", "public function getObjects($subtype=\"\", $limit = 10, $offset = 0);", "function fetchTotalObjectCount()\n {\n $db = eZDB::instance();\n $objectCount = array();\n $objectCount = $db->arrayQuery( \"SELECT COUNT(*) AS count FROM ezcontentobject\" );\n $totalObjectCount = $objectCount[0][\"count\"];\n return $totalObjectCount;\n }", "function assetTreeCount(\n AssetOperationHandlerService $service,\n Child $child, $params=NULL, &$results=NULL )\n{\n $type = $child->getType();\n\n if( !isset( $results[ F::COUNT ][ $type ] ) )\n $results[ F::COUNT ][ $type ] = 1;\n else\n $results[ F::COUNT ][ $type ] =\n $results[ F::COUNT ][ $type ] + 1;\n}", "function get_all_booktypes_count()\n {\n $this->db->from('booktypes');\n return $this->db->count_all_results();\n }", "public function getTotalPostsByType() {\n $rs = Doo::db()->query('SELECT FOUND_ROWS() as total');\n $total = $rs->fetch();\n return $total['total'];\n }", "function get_n_comments_type($artcl_id, $type) {\n\t$artcl_id = (int)$artcl_id;\n\t\n\t$comment_ns = array();\n\t\n\t$comment_ns_query = mysql_query(\"SELECT COUNT(comment) FROM `comments` WHERE `artcl_id`=$artcl_id AND `type`='$type' GROUP BY `type`\");\n\t\n while ($comment_ns_row = mysql_fetch_assoc($comment_ns_query)) {\n $comment_ns[] = array(\n\t 'count' => $comment_ns_row['COUNT(comment)'] \n );\n }\n return $comment_ns;\n\n}", "private function _countTags($param) {\n\n\t\t$output = ['all' => 0 ];\n\t\t$param['select'] = 'type, count(`type`) as count';\n\t\t$param['group_by'] = 'type';\n\n\t\tunset($param['limit']);\n\n\t\t$count = $this->CI->model->get($param);\n\n\t\tforeach($count as $c) {\n\t\t\t$c['count'] = (int) $c['count'];\n\t\t\t$output['all'] += $c['count'];\n\t\t\tif (!isset($output[$c['type']])) {\n\t\t\t\t$output[$c['type']] = 0;\n\t\t\t}\n\t\t\t$output[$c['type']] += $c['count'];\n\t\t}\n\t\treturn $output;\n\t}", "public function get_object_subtypes() {\n\t\treturn array();\n\t}", "public abstract function get_counts();", "protected function getCount($sType) {\n switch ($sType) {\n case 'final' : {\n $sCount = 'plugin';\n $aCount = array('', 'mkdir', 'cp');\n break;\n }\n case 'total_plugin' : {\n $sCount = 'plugin';\n $aCount = array('', 'mkdir', 'cp', 'rm', 'rmdir');\n break;\n }\n case 'action_plugin' : {\n $sCount = 'plugin';\n $aCount = array('mkdir', 'cp', 'rm', 'rmdir');\n break;\n }\n case 'total_staging' : {\n $sCount = 'staging';\n $aCount = array('', 'mkdir', 'cp', 'rm', 'rmdir');\n break;\n }\n case 'action_staging' : {\n $sCount = 'staging';\n $aCount = array('mkdir', 'cp', 'rm', 'rmdir');\n break;\n }\n case 'remote_plugin' : {\n return isset($this->aMeta['remoteActions']['plugin']) ? count($this->aMeta['remoteActions']['plugin']) : 0;\n }\n case 'remote_staging' : {\n return isset($this->aMeta['remoteActions']['staging']) ? count($this->aMeta['remoteActions']['staging']) : 0;\n }\n default : {\n return 0;\n }\n }\n $iCount = 0;\n foreach (array_keys($this->aSequences[$sCount]) as $sAction) {\n if (in_array($sAction, $aCount)) {\n $iCount += count($this->aSequences[$sCount][$sAction]);\n }\n }\n return $iCount;\n }", "function get_type_relation_type_counts(){\n\t\n\tGLOBAL $cmd_pre;\n\tGLOBAL $cmd_post;\n\t\n\t$qry = \"select ?p ?stype COUNT(DISTINCT ?s) ?otype COUNT(DISTINCT ?o) where { graph ?g { ?s a ?stype . ?s ?p ?o . ?o a ?otype . } FILTER regex(?g, \\\"bio2rdf\\\") }\";\n\t\n\t$cmd = $cmd_pre.$qry.$cmd_post;\n\t\n\t$out = \"\";\n\t\n\ttry {\n\t\t$out = execute_isql_command($cmd);\n\t} catch (Exception $e){\n\t\techo 'iSQL error: ' .$e->getMessage();\n\t\treturn null;\n\t}\n\t\n\t$split_results = explode(\"Type HELP; for help and EXIT; to exit.\\n\", $out);\n\t$split_results_2 = explode(\"\\n\\n\", $split_results[1]);\n\t$results = trim($split_results_2[0]);\n\t\n\tif (preg_match(\"/^0 Rows./is\", $results) === 0) {\n\t\n\t\t$results_arr = array();\n\t\t\n\t\t$lines = explode(\"\\n\", $results);\n\t\tforeach($lines as $line){\n\t\t\t\t$split_line = preg_split('/[[:space:]]+/', $line);\n\t\t\t\t$results_arr[$split_line[0]][\"count\"][\"subject_type\"] = $split_line[1];\n\t\t\t\t$results_arr[$split_line[0]][\"count\"][\"subject_count\"] = $split_line[2];\n\t\t\t\t$results_arr[$split_line[0]][\"count\"][\"object_type\"] = $split_line[3];\n\t\t\t\t$results_arr[$split_line[0]][\"count\"][\"object_count\"] = $split_line[4];\n\t\t}\n\n\t\treturn $results_arr;\n\t} else {\n\t\treturn null;\n\t}\n\n}", "public function countProducts()\n {\n $count = 0;\n foreach($this->products as $product) {\n /** @var ProductAbstract $product */\n switch ($product->getRequiredData()->getType()) {\n case DataAbstract::TYPE_CONFIGURABLE:\n /** @var Configurable $product */\n if (method_exists($product, 'getSimpleProducts')) {\n foreach ($product->getSimpleProducts() as $simple) {\n /** @var Simple $simple */\n $count++;\n }\n }\n $count++;\n break;\n default:\n $count++;\n break;\n }\n }\n\n return $count;\n }" ]
[ "0.8244827", "0.7217893", "0.70527494", "0.67892", "0.67099094", "0.6621057", "0.6307274", "0.6304777", "0.630018", "0.6284013", "0.6238418", "0.62208116", "0.6150595", "0.6129614", "0.61275005", "0.61275005", "0.61275005", "0.6050394", "0.6039399", "0.6014633", "0.60136837", "0.60024554", "0.59979916", "0.5961233", "0.58672595", "0.58412075", "0.58408767", "0.5827671", "0.58079875", "0.57963014" ]
0.79900557
1
Return the number of views from the specified object subtypes
function statistics_extended_objects_view_count($object_types,$container_guid=null,$owner_guid=null){ if(!is_array($object_types)){ $object_types = array($object_types); } $resp = array(); foreach($object_types as $object_type){ $resp[$object_type] = statistics_extended_object_view_count($object_type,$owner_guid,$container_guid); } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countObjects($subtype = \"\");", "function statistics_extended_objects_count($object_subtypes,$container_guid=null,$owner_guid=null,$object_type='object'){\r\n\tif(!is_array($object_types)){\r\n\t\t$object_types = array($object_subtypes);\r\n\t}\r\n\t$resp = array();\r\n\tforeach($object_subtypes as $object_subtype){\r\n\t\t$resp[$object_subtype] = statistics_extended_object_count($object_subtype,$owner_guid,$container_guid,$object_type);\r\n\t}\r\n\treturn $resp;\r\n}", "function statistics_extended_object_view_count($object_type,$owner_guid,$container_guid=null){\r\n set_time_limit(0);\r\n\t$options = array(\r\n\t\t'types'=>'object',\r\n\t\t'subtypes'=>$object_type,\r\n\t\t'owner_guids'=>$owner_guid,\r\n\t\t'count'=>true,\r\n\t);\r\n\tif($container_guid!=null){\r\n\t\t$options['container_guids']=$container_guid;\r\n\t}\r\n\t$total_views = 0;\r\n\t//TODO Add cache\r\n\t$elements_count = elgg_get_entities($options);\r\n\t$options['count']=false;\r\n\t$options['limit']=100;\r\n\tfor($i=0;$i<$elements_count;$i+=100){\r\n\t\t$options['offset']=$i;\r\n\t\t$entities = elgg_get_entities($options);\r\n\t\tif(!empty($entities)){\r\n\t\t\tforeach($entities as $entity){\r\n\t\t\t\t$total_views+=get_views_counter($entity->guid);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t$total_views = trigger_plugin_hook(\"cop_statistics:object:view:count\", \"object\",$options,$total_views);\r\n\r\n\treturn $total_views;\r\n}", "function statistics_extended_object_count($object_subtype,$owner_guid,$container_guid=null,$object_type='object'){\r\n\t$options = array(\r\n\t\t'types'=>$object_type,\r\n\t\t'subtypes'=>$object_subtype,\r\n\t\t'count'=>true,\r\n\t);\r\n\tif($owner_guid!=null){\r\n\t\t$options['owner_guids']=$owner_guid;\r\n\t}\r\n\tif($container_guid!=null){\r\n\t\t$options['container_guids']=$container_guid;\r\n\t}\r\n\r\n\t$count = elgg_get_entities($options);\r\n\t$count = trigger_plugin_hook(\"cop_statistics:object:count\", \"object\",$options,$count);\r\n\treturn $count;\r\n}", "public abstract function countObjects();", "public function count_sub_classes()\n {\n $table = $this->return_table();\n return $this->db->count_all($table);\n }", "public function getViewCount();", "public function getNumberOfTypes(): int;", "function tidy_access_count(tidy $object) {}", "function count_flagged_objects()\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$results = $db->select(tbl($this->flag_tbl.\",\".$this->type_tbl),\"id\",tbl($this->flag_tbl).\".id = \".tbl($this->type_tbl).\".\".$this->type_id_field.\" \r\n\t\t\t\t\t\t\t AND type='\".$this->type.\"' GROUP BY \".tbl($this->flag_tbl).\".id ,\".tbl($this->flag_tbl).\".type \");\r\n\t\treturn count($results);\r\n\t}", "public function get_object_subtypes()\n {\n }", "public function get_object_subtypes()\n {\n }", "public function get_object_subtypes()\n {\n }", "protected function _count ($type, $ou = NULL, $filter = '')\n {\n $this->checkAccess($type);\n return objects::count($type, $ou, $filter);\n }", "public abstract function get_max_num_pages($object_subtype = '');", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_profile_publications($this->get_condition());\r\n }", "public function getCountList(){\n\t\t$select = $this->getListSelect();\n\t\t$stmt = $select->query();\n\t\t$objects = array();\n\t\treturn count($stmt->fetchAll());\n\t}", "public static function count($obj) {\n\t\treturn DB::table(Version::getVersionsTable())->where('object_id', '=', $obj->attributes['id'])->where('object_table', '=', strtolower(get_class($obj)))->count();\n\t}", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_photo_gallery_publications($this->get_condition());\r\n }", "public function wpcd_team_custom_view_count( $views ) {\n\t\tglobal $current_screen;\n\t\tif ( $current_screen->id == 'edit-wpcd_team' && ! wpcd_is_admin() ) {\n\t\t\t$views = $this->wpcd_team_manipulate_views( 'wpcd_team', $views );\n\t\t}\n\t\treturn $views;\n\t}", "public function count() {\r\n return count($this->objects);\r\n }", "abstract public function get_max_num_pages( $object_subtype = '' );", "public function getTypesCount(bool $published = true) : int {\n $count = 0;\n if( !$this->dry() ){\n /**\n * @var $group GroupModel\n */\n foreach($groups = $this->getGroups($published) as $group){\n $count += $group->getTypesCount($published);\n }\n }\n return $count;\n }", "public function testAggregateCount() {\n $this->setupTestEntities();\n\n $view = Views::getView('test_aggregate_count');\n $this->executeView($view);\n\n $this->assertCount(2, $view->result, 'Make sure the count of items is right.');\n\n $types = [];\n foreach ($view->result as $item) {\n // num_records is an alias for id.\n $types[$item->entity_test_name] = $item->num_records;\n }\n\n $this->assertEquals(4, $types['name1']);\n $this->assertEquals(3, $types['name2']);\n }", "function statistics_extended_members_views($group){\r\n\tglobal $CONFIG;\r\n\tif(!empty($group)){\r\n\t\t$query = \"SELECT sum(m.string) as count FROM {$CONFIG->dbprefix}annotations a, {$CONFIG->dbprefix}metastrings m \";\r\n\t\t$views_counter_id = get_metastring_id(\"views_counter\");\r\n\t\t$query.= \"WHERE name_id={$views_counter_id} \";\r\n\t\t$query.= \"AND entity_guid={$group} \";\r\n\t\t$query.= \"AND owner_guid IN (SELECT guid_one FROM {$CONFIG->dbprefix}entity_relationships WHERE relationship='member' AND guid_two={$group}) \";\r\n\t\t$query.= \"AND a.value_id = m.id\";\r\n\t\t$count = get_data_row($query);\r\n\t\treturn $count->count;\r\n\t}\r\n\treturn 0;\r\n}", "public function countCollections($depth = 0, $filter = [], ?CollectionInterface $collection = null);", "public function get_max_num_pages($object_subtype = '')\n {\n }", "public function get_max_num_pages($object_subtype = '')\n {\n }", "public function get_max_num_pages($object_subtype = '')\n {\n }", "public function count()\n {\n return $this->getChildsObject()->count();\n }" ]
[ "0.7797036", "0.72498786", "0.70282423", "0.6789719", "0.64555335", "0.6436275", "0.62862176", "0.61903423", "0.6098783", "0.5949957", "0.590217", "0.590217", "0.590217", "0.5865727", "0.5860707", "0.5815439", "0.58119893", "0.58068335", "0.5776041", "0.5772713", "0.57689816", "0.5745932", "0.5698142", "0.5594252", "0.55307674", "0.55200464", "0.5519971", "0.5519971", "0.5519971", "0.55099666" ]
0.7609666
1
Return the list of objets related with an specific tool
function statistics_extended_tool_object($tool_name){ $resp = array(); switch($tool_name){ case 'forum': $resp[]='groupforumtopic'; break; case 'pages': $resp[]='page'; $resp[]='page_top'; break; case 'photos': $resp[]='album'; break; case 'polls': $resp[]='poll'; break; case 'chat': case 'chat_members': //We don't have information about chats break; default: $resp[]=$tool_name; } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_tools()\n {\n }", "public function getToolAttribute()\n {\n\n return $this->tools->first();\n }", "public function getPublicationsByTool($tool)\n {\n return $this->publicationRepository->findPublicationsByTool($tool);\n }", "public function tools()\n {\n return [\n new Viewcache,\n new PriceTracker(),\n new UpdateOrder(),\n ];\n }", "function get_tool($name)\n {\n }", "public function reviews_toolbox( $tool, $obj ){\n \n // array of tools\n $arr = array(\n \n /* display all the reviews made in garage sale */\n 'display' => function($obj){\n \n /* ====================\n * SQL select all users\n */\n $stmt = $obj->app->db->select('reviews');\n\t\t\t\t$stmt->where('status','i',0);\n \n // get result\n $result = $obj->app->db->statement_result($stmt);\n \n // add to view\n $obj->view->add('reviews_result',$result);\n \n \n // succeed\n return admin::TOOL_SUCCESS;\n },\n\t\t\n\t\t\t'deletereview' => function($obj) {\n \n // validate\n if( !isset( $_GET['r']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the users result using toolbox\n\t\t\t\t\n $stmt = $obj->app->db->update('reviews');\n \n // set where\n $stmt->where('id','i',$_GET['r']);\n\t\t\t\t\n\t\t\t\t// update status\n\t\t\t\t$stmt->values( array(\n \n // userlevel\n array(\n 'name' => 'status',\n 'type' => 'i',\n 'value'=> 1\n )\n ));\n // execute the statement\n $success = $obj->app->db->statement_execute($stmt);\n // test success\n if( $success ){\n \n // redirect\n $obj->app->redirect('admin/reviews');\n }\n \n // so something failed\n $obj->view->add('update_message',\n 'There was an error updating our database.');\n \n return admin::TOOL_FAIL;\n },\n\t\t\t'deleteconfirm' => function($obj){\n \n // validate get\n if( !isset($_GET['r']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the reviews results using toolbox\n $func = $obj->reviews_toolbox('review_result',$obj);\n $result = $func($obj);\n \n // add to view\n $obj->view->add('reviews_result',$result);\n \n // ask for confirmation\n $obj->view->add('confirm_action','deletereview');\n\n $message = <<< MSG\n You are about to delete this review.\nMSG;\n $obj->view->add('confirm_message',$message);\n \n // succeed\n return admin::TOOL_SUCCESS;\n \n },\n\t\t\t\n\t\t\t'review_result' => function($obj){\n \n /* =======================\n * SQL select review\n */\n $stmt = $obj->app->db->select('reviews');\n \n // set where\n $stmt->where('id','i',$_GET['r'],'AND','reviews');\n \n // get result\n return $obj->app->db->statement_result($stmt);\n }\n\t\t);\n\t\t // if we have the tool\n if( isset($arr[$tool]) ){\n \n // send it back\n return $arr[$tool];\n }\n \n return false;\n\t}", "public function reports_toolbox( $tool, $obj ){\n \n // array of tools\n $arr = array(\n \n /* display all the reviews made in garage sale */\n 'display' => function($obj){\n \n /* ====================\n * SQL select all users\n */\n $stmt = $obj->app->db->select('reports');\n\t\t\t\t$stmt->where('status','i',0);\n \n // get result\n $result = $obj->app->db->statement_result($stmt);\n \n // add to view\n $obj->view->add('reports_result',$result);\n \n \n // succeed\n return admin::TOOL_SUCCESS;\n },\n\t\t\n\t\t\t'reportsolved' => function($obj) {\n \n // validate\n if( !isset( $_GET['r']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the users result using toolbox\n\t\t\t\t\n $stmt = $obj->app->db->update('reports');\n \n // set where\n $stmt->where('id','i',$_GET['r']);\n\t\t\t\t\n\t\t\t\t// update status\n\t\t\t\t$stmt->values( array(\n \n // userlevel\n array(\n 'name' => 'status',\n 'type' => 'i',\n 'value'=> 1\n )\n ));\n \n // execute the statement\n $success = $obj->app->db->statement_execute($stmt);\n \n // test success\n if( $success ){\n \n // redirect\n $obj->app->redirect('admin/reports');\n }\n \n // so something failed\n $obj->view->add('update_message',\n 'There was an error updating our database.');\n \n return admin::TOOL_FAIL;\n },\n\t\t\t'solvedconfirm' => function($obj){\n \n // validate get\n if( !isset($_GET['r']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the reviews results using toolbox\n $func = $obj->reports_toolbox('report_result',$obj);\n $result = $func($obj);\n \n // add to view\n $obj->view->add('reports_result',$result);\n \n // ask for confirmation\n $obj->view->add('confirm_action','reportsolved');\n\n $message = <<< MSG\n You are about to resolve this issue.\nMSG;\n $obj->view->add('confirm_message',$message);\n \n // succeed\n return admin::TOOL_SUCCESS;\n \n },\n\t\t\t\n\t\t\t'report_result' => function($obj){\n \n /* =======================\n * SQL select review\n */\n $stmt = $obj->app->db->select('reports');\n \n // set where\n $stmt->where('id','i',$_GET['r'],'AND','reports');\n \n // get result\n return $obj->app->db->statement_result($stmt);\n }\n\t\t);\n\t\t // if we have the tool\n if( isset($arr[$tool]) ){\n \n // send it back\n return $arr[$tool];\n }\n \n return false;\n\t}", "public function users_toolbox( $tool, $obj ){\n \n // array of tools\n $arr = array(\n \n /* display all the users registered with garage sale */\n 'display' => function($obj){\n \n /* ====================\n * SQL select all users\n */\n $stmt = $obj->app->db->select('users');\n \n // join with settings\n $stmt->inner_join( array(\n 'table' => 'profiles',\n 'other' => 'userid',\n 'this' => 'id'\n ) );\n \n // get result\n $result = $obj->app->db->statement_result($stmt);\n \n // add to view\n $obj->view->add('users_result',$result);\n \n \n // succeed\n return admin::TOOL_SUCCESS;\n },\n \n \n /* Advance a users status within the Garage */\n 'advanceuser' => function($obj){\n \n // validate get\n if( !isset($_GET['u']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the users result using toolbox\n $func = $obj->users_toolbox('user_result',$obj);\n $result = $func($obj);\n \n // add to view\n $obj->view->add('users_result',$result);\n \n // ask for confirmation\n $obj->view->add('confirm_action','promoteuser');\n \n \n $lvl_name = 'STANDARD';\n \n // output what the user will now be\n if( $result[0]['userlevel'] >= 20 ){\n // is a manager, go to admin\n $lvl_name = 'ADMIN';\n }else if( $result[0]['userlevel'] >= 10 ){\n \n // is a moderator go to manager\n $lvl_name = 'MANAGER';\n }else if( $result[0]['userlevel'] >= 0 ){\n \n // is standard, go to moderator\n $lvl_name = 'MODERATOR';\n }\n \n $message = <<< MSG\n You are about to promote this user to a(n): <br />\n $lvl_name\nMSG;\n $obj->view->add('confirm_message',$message);\n \n // succeed\n return admin::TOOL_SUCCESS;\n \n },\n \n \n /* ----------------------\n * Perform user promotion\n */\n 'promoteuser' => function($obj){\n \n // validate get\n if( !isset($_GET['u']) ){\n return admin::TOOL_FAIL;\n }\n \n // get user result using toolbox\n $func = $obj->users_toolbox('user_result',$obj);\n $result = $func($obj);\n \n // perform promotion\n if( count($result) < 1 ){\n return admin::TOOL_FAIL;\n }\n \n \n // get previous user level\n if( $result[0]['userlevel'] >= 30 ){\n \n // nope, faile it\n return admin::TOOL_FAIL;\n } elseif( $result[0]['userlevel'] >= 20 ){\n \n // manager, go to admin\n $usrlvl = 30;\n } elseif( $result[0]['userlevel'] >= 10 ){\n \n // moderator, go to manager\n $usrlvl = 20;\n } else {\n \n // standard go to moderator\n $usrlvl = 10;\n }\n \n \n \n /* ========================\n * SQL to execute promotion\n */\n \n $stmt = $obj->app->db->update('users');\n \n // where\n $stmt->where('id','i',$result[0]['id']);\n \n // values\n $stmt->values( array(\n \n // userlevel\n array(\n 'name' => 'userlevel',\n 'type' => 'i',\n 'value'=> $usrlvl\n )\n ));\n \n // attempt\n $success = $obj->app->db->statement_execute($stmt);\n \n if( !$success ){\n \n // good to go\n return admin::TOOL_FAIL;\n }\n \n $obj->app->redirect('admin/users');\n },\n \n \n /* ---------------------\n * Perform user demotion\n */\n 'demoteuser' => function($obj){\n \n // validate get\n if( !isset($_GET['u']) ){\n return admin::TOOL_FAIL;\n }\n \n // get user result using toolbox\n $func = $obj->users_toolbox('user_result',$obj);\n $result = $func($obj);\n \n // perform promotion\n if( count($result) < 1 ){\n return admin::TOOL_FAIL;\n }\n \n \n // get previous user level\n if( $result[0]['userlevel'] >= 30 ){\n \n // admin to manager\n $usrlvl = 20;\n } elseif( $result[0]['userlevel'] >= 20 ){\n \n // manager to moderator\n $usrlvl = 10;\n } elseif( $result[0]['userlevel'] >= 10 ){\n \n // moderator to standard\n $usrlvl = 0;\n } else {\n \n // nope, faile it\n return admin::TOOL_FAIL;\n }\n \n \n \n /* ========================\n * SQL to execute promotion\n */\n \n $stmt = $obj->app->db->update('users');\n \n // where\n $stmt->where('id','i',$result[0]['id']);\n \n // values\n $stmt->values( array(\n \n // userlevel\n array(\n 'name' => 'userlevel',\n 'type' => 'i',\n 'value'=> $usrlvl\n )\n ));\n \n // attempt\n $success = $obj->app->db->statement_execute($stmt);\n \n if( !$success ){\n \n // good to go\n return admin::TOOL_FAIL;\n }\n \n $obj->app->redirect('admin/users');\n },\n \n \n /* --------------------------------------- \n * Lowers a users status within the Garage \n */\n 'devanceuser' => function($obj){\n \n // validate get\n if( !isset($_GET['u']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the users result using toolbox\n $func = $obj->users_toolbox('user_result',$obj);\n $result = $func($obj);\n \n // add to view\n $obj->view->add('users_result',$result);\n \n // ask for confirmation\n $obj->view->add('confirm_action','demoteuser');\n \n \n // level name\n $lvl_name = 'GUEST';\n \n // output what the user will now be\n if( $result[0]['userlevel'] > 20 ){\n \n // is an admin, go to manager\n $lvl_name = 'MANAGER';\n }else if( $result[0]['userlevel'] > 10 ){\n \n // is a manager go to moderator\n $lvl_name = 'MODERATOR';\n }else if( $result[0]['userlevel'] > 0 ){\n \n // is moderator, go to standard\n $lvl_name = 'STANDARD';\n }\n \n $message = <<< MSG\n You are about to demote this user to a(n): <br />\n $lvl_name\nMSG;\n $obj->view->add('confirm_message',$message);\n \n // succeed\n return admin::TOOL_SUCCESS;\n \n },\n \n \n \n /* Get single user data as provided by url get */\n 'user_result' => function($obj){\n \n /* =======================\n * SQL select current user\n */\n $stmt = $obj->app->db->select('users');\n \n // join with settings\n $stmt->inner_join( array(\n 'table' => 'profiles',\n 'other' => 'userid',\n 'this' => 'id'\n ) );\n \n // set where\n $stmt->where('id','i',$_GET['u'],'AND','users');\n \n // get result\n return $obj->app->db->statement_result($stmt);\n }\n \n );\n \n // check if exists\n if( isset( $arr[$tool] ) ){\n return $arr[$tool];\n }\n \n // otherwise fail\n return null;\n \n }", "public function tools($name = NULL) {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n // Verify if the tool is enabled\n if ( $this->options->check_enabled('enable_tools_page') == false ) {\n \n show_404();\n \n }\n \n // Require the Tools interface\n require_once APPPATH . 'interfaces/Tools.php';\n \n if ( $name ) {\n \n if ( file_exists(APPPATH . 'tools' . '/' . $name . '/' . $name . '.php') ) {\n \n // Require the tool\n require_once APPPATH . 'tools' . '/' . $name . '/' . $name . '.php';\n \n // Call the class\n $class = ucfirst(str_replace('-', '_', $name));\n $get = new $class;\n \n \n $page = $get->page(['user_id' => $this->user_id]);\n \n $info = $get->check_info();\n \n // Load view/user/tool.php file\n $this->body = 'user/tool';\n $this->content = ['info' => $info, 'page' => $page];\n $this->user_layout();\n \n } else {\n \n echo display_mess(47);\n \n }\n \n } else {\n \n // Get all available tools.\n $classes = [];\n \n foreach (scandir(APPPATH . 'tools') as $dirname) {\n \n if ( is_dir(APPPATH . 'tools' . '/' . $dirname) && ($dirname != '.') && ($dirname != '..') ) {\n \n require_once APPPATH . 'tools' . '/' . $dirname . '/' . $dirname . '.php';\n \n $class = ucfirst(str_replace('-', '_', $dirname));\n \n $get = new $class;\n \n $classes[] = $get->check_info();\n \n }\n \n }\n \n // Get favourites tools\n $get_favourites = $this->user_meta->get_favourites($this->user_id);\n \n $favourites = '';\n \n if ( $get_favourites ) {\n \n $favourites = unserialize($get_favourites[0]->meta_value);\n \n }\n \n // Get all options\n $options = $this->options->get_all_options();\n \n // Load view/user/tools.php file\n $this->body = 'user/tools';\n $this->content = ['tools' => $classes, 'favourites' => $favourites, 'options' => $options];\n $this->user_layout();\n \n }\n \n }", "public function edit_toolset($toolset_id = FALSE)\n\t{\n\t\tif ($toolset_id === FALSE)\n\t\t{\n\t\t\t$toolset_id = $this->EE->input->get_post('toolset_id');\n\t\t}\n\n\t\tif ( ! is_numeric($toolset_id))\n\t\t{\n\t\t\texit();\n\t\t}\n\n\t\t$this->EE->load->library(array('table','javascript'));\n\t\t$this->EE->load->model(array('rte_toolset_model','rte_tool_model'));\n\n\t\t// new toolset?\n\t\tif ($toolset_id == 0)\n\t\t{\n\t\t\t$toolset['tools'] = array();\n\t\t\t$toolset['name'] = '';\n\t\t\t$is_private = ($this->EE->input->get_post('private') == 'true');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// make sure user can access the existing toolset\n\t\t\tif ( ! $this->EE->rte_toolset_model->member_can_access($toolset_id))\n\t\t\t{\n\t\t\t\t$this->EE->output->send_ajax_response(array(\n\t\t\t\t\t'error' => lang('toolset_edit_failed')\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t// grab the toolset\n\t\t\t$toolset\t= $this->EE->rte_toolset_model->get($toolset_id);\n\t\t\t$is_private\t= ($toolset['member_id'] != 0);\n\t\t}\n\n\n\t\t// get list of enabled tools\n\t\t$enabled_tools = $this->EE->rte_tool_model->get_tool_list(TRUE);\n\n\t\t$unused_tools = $used_tools = array();\n\n\t\tforeach ($enabled_tools as $tool)\n\t\t{\n\t\t\t$tool_index = array_search($tool['tool_id'], $toolset['tools']);\n\n\t\t\t// is the tool in this toolset?\n\t\t\tif ($tool_index !== FALSE)\n\t\t\t{\n\t\t\t\t$used_tools[$tool_index] = $tool;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$unused_tools[] = $tool;\n\t\t\t}\n\t\t}\n\n\t\t// sort used tools by custom order\n\t\tksort($used_tools, SORT_NUMERIC);\n\t\t\n\t\t// set up the form\n\t\t$vars = array(\n\t\t\t'action'\t\t\t=> $this->form_url.AMP.'method=save_toolset'.( !! $toolset_id ? AMP.'toolset_id='.$toolset_id : ''),\n\t\t\t'is_private'\t\t=> $is_private,\n\t\t\t'toolset_name'\t\t=> ( ! $toolset || $is_private ? '' : $toolset['name']),\n\t\t\t'available_tools'\t=> $enabled_tools,\n\t\t\t'unused_tools'\t\t=> $unused_tools,\n\t\t\t'used_tools'\t\t=> $used_tools\n\t\t);\n\t\t\n\t\t// JS\n\t\t$this->EE->cp->add_js_script(array(\n\t\t\t'ui' \t=> 'sortable',\n\t\t\t'file'\t=> 'cp/rte'\n\t\t));\n\t\t\n\t\t// CSS\n\t\t$this->EE->cp->add_to_head($this->EE->view->head_link('css/rte.css'));\n\t\t\n\t\t// return the form\n\t\t$this->EE->output->send_ajax_response(array(\n\t\t\t'success' => $this->EE->load->view('edit_toolset', $vars, TRUE)\n\t\t));\n\t}", "public static function getTools()\n {\n return self::TOOLS;\n }", "function getItemTools($id)\n\t{\n\t\t$qStr = \"SELECT pt.* FROM portfolio_tools pt\n\t\t\t\t\tLEFT JOIN tools t ON pt.tool_id = t.id\n\t\t\t\tWHERE pt.creation_id=?\";\n\t\t$q = $this->db->query($qStr, array(intval($id)));\n\t\t\n\t\tif ($q->num_rows() > 0)\n\t\t\treturn array('success'=>true, 'tools'=>$q->result_array());\n\t\telse\n\t\t\treturn array('success'=>false, 'error'=>\"This item has no tools\");\n\t}", "public abstract function getObjects();", "public function getTools(){\r\n\t\trequire 'classes/view.php';\r\n\t\t$view = new view();\r\n\t\t$view->setTemplate('admin/tools');\r\n\t\treturn $view->loadTemplate(new stdClass());\r\n\t}", "public function publicListId()\n {\n return QcTool::where('type', $this->publicType())->pluck('tool_id');\n }", "public function themes_toolbox( $tool, $obj ){\n \n // set up toolbox\n $arr = array(\n \n 'usetheme' => function($obj)\n {\n // check for theme\n if( !isset($_GET['theme']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the path\n $theme_path = $_GET['theme'];\n \n // test if it exists\n if( file_exists($theme_path) && is_dir($theme_path) )\n {\n // save settings\n $obj->app->settings('theme')->\n set('theme',$theme_path)->\n save('; Configure Garage theme paths');\n \n return admin::TOOL_SUCCESS;\n }\n \n return admin::TOOL_FAIL;\n }\n \n );\n \n // if we have the tool\n if( isset($arr[$tool]) ){\n \n // send it back\n return $arr[$tool];\n }\n \n return false;\n }", "public static function getToolName();", "public function detalhesEquipamentos($objetor) {\n \n $sql = \"\n SELECT \n *\n FROM \n reservas r\n INNER JOIN\n reservas_equipamentos re\n ON\n r.idReserva = re.idReserva\n INNER JOIN\n equipamentos e\n ON\n e.idEquipamento = re.idEquipamento\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.idReserva = '$objetor->idReserva'\n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }", "public function getObjectivesList() {\n return $this->_get(9);\n }", "function getObjectives() {\n return Engine::send('getObjectives');\n}", "function __construct()\n {\n $this->tool = new Tools();\n }", "public static function tool(): \\com_jjcbs\\interfaces\\Tool\n {\n return ServiceTool::getInstance();\n }", "public function test_mod_lti_get_tool_types() {\n // Create a tool proxy.\n $proxy = mod_lti_external::create_tool_proxy('Test proxy', $this->getExternalTestFileUrl('/test.html'), array(), array());\n\n // Create a tool type, associated with that proxy.\n $type = new stdClass();\n $data = new stdClass();\n $type->state = LTI_TOOL_STATE_CONFIGURED;\n $type->name = \"Test tool\";\n $type->description = \"Example description\";\n $type->toolproxyid = $proxy->id;\n $type->baseurl = $this->getExternalTestFileUrl('/test.html');\n $typeid = lti_add_type($type, $data);\n\n $types = mod_lti_external::get_tool_types($proxy->id);\n $this->assertEquals(1, count($types));\n $type = $types[0];\n $this->assertEquals('Test tool', $type['name']);\n $this->assertEquals('Example description', $type['description']);\n }", "protected function generateToolStats()\n {\n $tools = $this->toolRepository->findAll();\n $stats = [];\n\n foreach ($tools as $tool) {\n $users = $this->roleRepository\n ->findOneByName('tools.' . $tool->getPermissionName() . '.user')\n ->getUsers();\n $currentUsers = $users->filter(function ($user) {\n return $user->hasRoleByName(Role::MEMBER_CURRENT);\n });\n $userCount = $currentUsers->count();\n\n $inductorCount = $this->roleRepository\n ->findOneByName('tools.' . $tool->getPermissionName() . '.inductor')\n ->getUsers()\n ->count();\n $maintainerCount = $this->roleRepository\n ->findOneByName('tools.' . $tool->getPermissionName() . '.maintainer')\n ->getUsers()\n ->count();\n\n $bookingsForThisMonth = $this->bookingRepository->findByToolForMonth($tool, Carbon::now());\n $bookingsForLastMonth = $this->bookingRepository->findByToolForMonth($tool, Carbon::now()->subMonthNoOverflow());\n\n $bookedThisMonth = $this->countBookedDuration($bookingsForThisMonth);\n $bookedLastMonth = $this->countBookedDuration($bookingsForLastMonth);\n\n $usagesForThisMonth = $this->usageRepository->findByToolForMonth($tool, Carbon::now());\n $usagesForLastMonth = $this->usageRepository->findByToolForMonth($tool, Carbon::now()->subMonthNoOverflow());\n\n $usedThisMonth = $this->countUsedMinutes($usagesForThisMonth);\n $usedLastMonth = $this->countUsedMinutes($usagesForLastMonth);\n\n $stats[$tool->getDisplayName()] = [\n 'userCount' => $userCount,\n 'inductorCount' => $inductorCount,\n 'maintainerCount' => $maintainerCount,\n 'bookedThisMonth' => $bookedThisMonth,\n 'bookedLastMonth' => $bookedLastMonth,\n 'usedThisMonth' => $usedThisMonth,\n 'usedLastMonth' => $usedLastMonth,\n ];\n }\n\n return $stats;\n }", "function ppom_get_editing_tools( $editing_tools ){\n\n\tparse_str ( $editing_tools, $tools );\n\tif (isset( $tools['editing_tools'] ) && $tools['editing_tools'])\n\t\treturn implode(',', $tools['editing_tools']);\n}", "public function getExperimentInfosList(){\n return $this->_get(2);\n }", "public function contacts_toolbox( $tool, $obj ){\n \n // array of tools\n $arr = array(\n \n /* display all the reviews made in garage sale */\n 'display' => function($obj){\n \n /* ====================\n * SQL select all users\n */\n $stmt = $obj->app->db->select('contact');\n\t\t\t\t$stmt->where('status','i',0);\n \n // get result\n $result = $obj->app->db->statement_result($stmt);\n \n // add to view\n $obj->view->add('contacts_result',$result);\n \n \n // succeed\n return admin::TOOL_SUCCESS;\n },\n\t\t\n\t\t\t'contactsolved' => function($obj) {\n \n // validate\n if( !isset( $_GET['c']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the users result using toolbox\n\t\t\t\t\n $stmt = $obj->app->db->update('contact');\n \n // set where\n $stmt->where('id','i',$_GET['c']);\n\t\t\t\t\n\t\t\t\t// update status\n\t\t\t\t$stmt->values( array(\n \n // userlevel\n array(\n 'name' => 'status',\n 'type' => 'i',\n 'value'=> 1\n )\n ));\n \n // execute the statement\n $success = $obj->app->db->statement_execute($stmt);\n \n // test success\n if( $success ){\n \n // redirect\n $obj->app->redirect('admin/contacts');\n }\n \n // so something failed\n $obj->view->add('update_message',\n 'There was an error updating our database.');\n \n return admin::TOOL_FAIL;\n },\n\t\t\t'solvedconfirm' => function($obj){\n \n // validate get\n if( !isset($_GET['c']) ){\n return admin::TOOL_FAIL;\n }\n \n // get the contacts results using toolbox\n $func = $obj->contacts_toolbox('contact_result',$obj);\n $result = $func($obj);\n \n // add to view\n $obj->view->add('contacts_result',$result);\n \n // ask for confirmation\n $obj->view->add('confirm_action','contactsolved');\n\n $message = <<< MSG\n You are about to resolve this issue.\nMSG;\n $obj->view->add('confirm_message',$message);\n \n // succeed\n return admin::TOOL_SUCCESS;\n \n },\n\t\t\t\n\t\t\t'contact_result' => function($obj){\n \n /* =======================\n * SQL select review\n */\n $stmt = $obj->app->db->select('contact');\n \n // set where\n $stmt->where('id','i',$_GET['c'],'AND','contact');\n \n // get result\n return $obj->app->db->statement_result($stmt);\n }\n\t\t);\n\t\t // if we have the tool\n if( isset($arr[$tool]) ){\n \n // send it back\n return $arr[$tool];\n }\n \n return false;\n\t}", "public function tools()\n\t{\n\t\tif ( ! $this->tools )\n\t\t{\n\t\t\trequire_once dirname( __FILE__ ) . '/class-bdefinite-tools.php';\n\t\t\t$this->tools = new bDefinite_Tools();\n\t\t}\n\n\t\treturn $this->tools;\n\t}", "private function manage_toolbox( $tool, $obj ){\n \n // create the list of our tools\n $arr = array(\n \n // the test function to demonstrate usability\n 'test' => function($obj){\n echo 'test';\n \n // successful return\n return admin::TOOL_SUCCESS;\n },\n \n /* update category information from the manageshop area */\n 'updatecategories' => function($obj){\n \n // make sure there is a category to get\n if( !isset($_GET['c']) ){\n return admin::TOOL_FAIL;\n }\n \n \n /* Check for update request */\n if( $_SERVER['REQUEST_METHOD'] === 'POST' ){\n \n \n // validate\n if(\n !isset( $_POST['display_name'] ) ||\n $_POST['display_name'] == null ||\n !isset( $_POST['name'] ) ||\n $_POST['name'] == null ||\n !isset( $_POST['description'] ) ||\n $_POST['description'] == null ||\n ( isset($_POST['category_order']) && \n !is_numeric($_POST['category_order'])\n )\n ){\n $obj->view->add('update_message',\n 'On or more required fields have not been\n provided or are malformed.');\n } else {\n \n \n // set up default parent id\n $parentid = 0;\n $category_order = 99;\n \n // set up parentid\n if( isset($_POST['parentid']) && \n $_POST['parentid'] != null \n ){\n $parentid = (int) $_POST['parentid'];\n }\n \n // set up category order\n if( isset($_POST['category_order']) && \n $_POST['category_order'] != null \n ){\n $category_order = \n (int)$_POST['category_order'];\n }\n \n \n /* =====================================\n * SQL Insert new category into database\n */\n \n $stmt = $obj->app->db->update('categories');\n \n // never forget to set the where\n $stmt->where('id','i',$_GET['c']);\n \n // set up insert values\n $stmt->values( array(\n \n // display name\n array(\n 'name' => 'display_name',\n 'type' => 's',\n 'value'=> $_POST['display_name']\n ),\n \n // name\n array(\n 'name' => 'name',\n 'type' => 's',\n 'value'=> $_POST['name']\n ),\n \n // description\n array(\n 'name' => 'description',\n 'type' => 's',\n 'value'=> $_POST['description']\n ),\n \n // category order\n array(\n 'name' => 'category_order',\n 'type' => 'i',\n 'value'=> $category_order\n ),\n \n \n // parentid\n array(\n 'name' => 'parentid',\n 'type' => 'i',\n 'value'=> $parentid\n )\n \n ));\n \n \n // finally execute update\n $success = $obj->app->db->\n statement_execute($stmt);\n \n if( !$success ){\n \n // print error message\n $obj->view->add('update_message',\n 'There was an error updating our \n database');\n } \n \n }\n }\n \n /* ====================================\n * SQL to select the category to update\n */\n \n // select\n $stmt = $obj->app->db->select('categories');\n \n // set wheres\n $stmt->where( 'id', 'i' ,$_GET['c'] );\n \n // get results\n $result = $obj->app->db->statement_result($stmt);\n \n \n // check for valid result\n if( count($result) > 0 ){\n \n // and add it\n $obj->view->add('display_name_value',\n $result[0]['display_name']);\n $obj->view->add('name_value',\n $result[0]['name']);\n $obj->view->add('description_value',\n $result[0]['description']);\n $obj->view->add('category_order_value',\n $result[0]['category_order']);\n $obj->view->add('parentid_value',\n $result[0]['parentid']);\n } else {\n \n // else no results\n $obj->view->add('display_name_value','');\n $obj->view->add('name_value','');\n $obj->view->add('description_value','');\n $obj->view->add('category_order_value','');\n $obj->view->add('parentid_value','');\n }\n \n // set correct value\n $obj->view->add('category_info', true);\n \n // successful return\n return admin::TOOL_SUCCESS;\n },\n \n \n /* Displays delete confirmation */\n 'confirmdelete' => function($obj){\n \n // check for valid c\n if( !isset($_GET['c']) ){\n \n //fail\n return admin::TOOL_FAIL;\n }\n \n /* ==================================\n * SQL to select delete category info\n */\n \n $stmt = $obj->app->db->select('categories');\n \n // where\n $stmt->where('id','i',$_GET['c']);\n \n // get results\n $result = $obj->app->db->statement_result($stmt);\n \n // check validity\n if( count($result) > 0 ){\n \n // add\n $obj->view->add('delete_info',$result[0]);\n } else {\n \n // no results\n $obj->view->add('delete_info',null);\n }\n \n // success\n return admin::TOOL_SUCCESS;\n },\n \n \n /* Deletes a category */\n 'deletecategory' => function($obj) {\n \n // validate\n if( !isset( $_GET['c']) ){\n return admin::TOOL_FAIL;\n }\n \n /* =========================================\n * SQL to remove active status from category\n */\n \n $stmt = $obj->app->db->update('categories');\n \n // set where\n $stmt->where('id','i',$_GET['r']);\n \n // execute the statement\n $success = $obj->app->db->statement_execute($stmt);\n \n // test success\n if( $success ){\n \n // redirect\n $obj->app->redirect('admin/reviews');\n }\n \n // so something faily\n $obj->view->add('update_message',\n 'There was an error updating our database.');\n \n return admin::TOOL_FAIL;\n },\n \n /* Inserts a new category */\n 'newcategory' => function($obj) {\n \n // set up attempt vars\n $obj->view->add('create_attempt',true);\n \n \n // check for appropriate post data\n if( $_SERVER['REQUEST_METHOD'] === 'POST' ){\n \n \n /* =====================\n * Set up default values\n */\n \n $display_name_value = $_POST['display_name'];\n $name_value = $_POST['name'];\n $description_value = $_POST['description'];\n $category_order_value = $_POST['category_order'];\n $parentid_value = $_POST['parentid'];\n \n \n // display name default\n $obj->view->add('display_name_value', \n $display_name_value );\n \n // name default\n $obj->view->add('name_value', $name_value );\n \n // description default\n $obj->view->add('description_value', \n $description_value);\n \n // order default\n $obj->view->add('category_order_value', \n $category_order_value);\n \n // parent id default\n $obj->view->add('parentid_value', $parentid_value);\n \n // validate\n if(\n !isset( $_POST['display_name'] ) ||\n $_POST['display_name'] == null ||\n !isset( $_POST['name'] ) ||\n $_POST['name'] == null ||\n !isset( $_POST['description'] ) ||\n $_POST['description'] == null ||\n ( isset($_POST['category_order']) && \n !is_numeric($_POST['category_order'])\n )\n ){\n $obj->view->add('update_message',\n 'On or more required fields have not been\n provided or are malformed.');\n return admin::TOOL_FAIL;\n }\n \n \n // set up default parent id\n $parentid = 0;\n $category_order = 99;\n \n // set up parentid\n if( isset($_POST['parentid']) && \n $_POST['parentid'] != null \n ){\n $parentid = (int) $_POST['parentid'];\n }\n \n // set up category order\n if( isset($_POST['category_order']) && \n $_POST['category_order'] != null \n ){\n $category_order = (int)$_POST['category_order'];\n }\n \n \n /* =====================================\n * SQL Insert new category into database\n */\n \n $stmt = $obj->app->db->insert('categories');\n \n // set up insert values\n $stmt->values( array(\n \n // display name\n array(\n 'name' => 'display_name',\n 'type' => 's',\n 'value'=> $_POST['display_name']\n ),\n \n // name\n array(\n 'name' => 'name',\n 'type' => 's',\n 'value'=> $_POST['name']\n ),\n \n // description\n array(\n 'name' => 'description',\n 'type' => 's',\n 'value'=> $_POST['description']\n ),\n \n // category order\n array(\n 'name' => 'category_order',\n 'type' => 'i',\n 'value'=> $category_order\n ),\n \n \n // parentid\n array(\n 'name' => 'parentid',\n 'type' => 'i',\n 'value'=> $parentid\n )\n \n ));\n \n \n // finally execute insert\n $success = $obj->app->db->statement_execute($stmt);\n \n if( !$success ){\n \n // print error message\n $obj->view->add('update_message',\n 'There was an error updating our database');\n \n // and faile\n return admin::TOOL_FAIL;\n \n } else {\n \n // redirect to main manage shop\n $obj->app->redirect('admin/manageshop');\n }\n \n } else {\n \n // FAILURE!!!!\n return admin::TOOL_FAIL;\n }\n \n return admin::TOOL_SUCCESS;\n }\n \n );\n \n // if we have the tool\n if( isset($arr[$tool]) ){\n \n // send it back\n return $arr[$tool];\n }\n \n return false;\n }", "public function getObjectivesList() {\n return $this->_get(8);\n }" ]
[ "0.56054103", "0.54333484", "0.53957176", "0.531781", "0.5164734", "0.51643836", "0.51368344", "0.5097835", "0.5059703", "0.5037278", "0.5011611", "0.49746934", "0.4939359", "0.49373615", "0.49256197", "0.49144685", "0.4861219", "0.48380214", "0.4835771", "0.4817653", "0.48099452", "0.48043433", "0.47668493", "0.47615996", "0.476064", "0.47529453", "0.47449833", "0.47275668", "0.47234213", "0.47068018" ]
0.5592045
1
Returns an array with the last 3 recent audios of the logged user
public static function getRecentAudios() { $current_user = Users::getCurrentUser(); $columns = implode(',', self::$columns); $query = db()->prepare( "SELECT {$columns} FROM audios WHERE reply_to IS NULL AND status = '1' AND user_id = :user_id ORDER BY date_added DESC LIMIT 3" ); $query->bindValue('user_id', $current_user->id, PDO::PARAM_INT); $query->execute(); $result = array(); foreach ($query->fetchAll() as $array) { $result[] = self::complete($array); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getPopularAudios()\n {\n $columns = self::$columns;\n /**\n * Here we do a JOIN, so before putting the columns,\n * place the 'A.' (for the Audios table) before every\n * column.\n * @var array\n */\n $columns = array_map(\n function ($value) {\n return 'A.' . $value;\n },\n $columns\n );\n $columns = implode(',', $columns);\n $query = db()->prepare(\n \"SELECT DISTINCT\n {$columns}\n FROM audios AS A\n INNER JOIN users AS U\n ON A.user_id = U.id\n AND U.audios_privacy = 'public'\n AND A.reply_to IS NULL\n AND A.status = '1'\n AND A.date_added BETWEEN :oldtime AND :newtime\n ORDER BY A.plays DESC\n LIMIT 3\"\n );\n $query->bindValue(\n 'oldtime',\n time() - strtotime('-30 days'),\n PDO::PARAM_INT\n );\n $query->bindValue('newtime', time(), PDO::PARAM_INT);\n $query->execute();\n $result = array();\n while ($audio = $query->fetch(PDO::FETCH_ASSOC)) {\n $result[] = self::complete($audio);\n }\n return $result;\n }", "function getLast3Liked(){\n global $USER;\n $query = dbQuery(\"SELECT liked FROM user_interests WHERE user_id= '\".$USER['id'].\"'\");\n\n while($row = mysql_fetch_array($query)){\n $allLikes = unserialize($row['liked']);\n }\n if (!$allLikes)\n $allLikes = array();\n $last3 = array_splice($allLikes, -3, 3);\n return $last3;\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 }", "public function recentAlbums(){\n return DB::select('select * from albums order by albums.album_created_at DESC limit 5');\n }", "public function getLastEvents(){\n\t\t$sql = \"SELECT\n\t\t\t\t\tevents.id as id,\n\t\t\t\t\tevents.date_begin as date_begin,\n\t\t\t\t\tevents.date_end as date_end,\n events.time_begin as time_begin,\n\t\t\t\t\tevents.time_end as time_end,\n\t\t\t\t\tevents.name as title,\n\t\t\t\t\tevent_types.color as type_color,\n\t\t\t\t\tevent_types.name as type_name\n\t\t\t\tFROM ag_events as events\n\t\t\t\tINNER JOIN ag_eventtypes as event_types ON event_types.id = events.id_type\n\t\t\t\torder by date_end DESC LIMIT 3;\";\n\t\t$user = $this->runRequest($sql);\n\t\treturn $user->fetchAll();\n\t}", "public function getUserRecentTracks ( $user, $limit = 50 ) {\n\t\tif ( $this->api_key ) {\t\n\t\t\t$url = \n\t\t\t\tself::API_ROOT . $this->urls['UserGetRecentTracks'] . \n\t\t\t\t\"&api_key=\" . $this->api_key .\n\t\t\t\t\"&user=\" . $user .\n\t\t\t\t\"&limit=\" . $limit;\n\t\t\t\t\n\t\t\treturn $this->getResults( $url );\n\t\t}\n\t}", "public function get_lastThree() {\n\n $query = $this->db->query('SELECT * FROM recipes WHERE recipes.published ORDER BY recipes.lastModDate DESC LIMIT 3');\n\n return $result = $query->result();\n }", "public function list_songs_flp($user_id, $limit)\n {\n return $this->db->where('user_id', $user_id)\n ->limit($limit)->order_by('id', 'DESC')\n ->get('audio_song')->result_array();\n }", "public function getLatestTracks ()\n {\n $lastFmService = new LastFmService;\n $limit = $this->app->request->params('limit', 1);\n $data = $lastFmService->getLatestTracks($limit);\n $this->respond($data);\n }", "public function getMaxMusicList(){\n return $this->_get(15);\n }", "public function getHistory()\n {\n \treturn QuizResult::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->limit(5)->get();\n }", "public function list_songs_alp($user_id, $limit)\n {\n return $this->db->where('user_id', $user_id)\n ->group_start()\n ->like('availability', 2)\n ->or_like('availability', 4)\n ->or_like('availability', 5)\n ->group_end()\n ->limit($limit)->order_by('id', 'DESC')\n ->get('audio_song')->result_array();\n }", "public function getUserItems()\n {\n $items = ItemModel::model()->findAll('play_id = :playId ORDER BY id DESC', array(\n ':playId' => $this->playid\n ));\n\n return $items;\n }", "public function get_recentfile_list($u_id){\n\t\t$this->db->select('images.img_id,images.img_name,images.imag_org_name,images.img_create_at,favourite.yes')->from('images');\t\t\n\t\t$this->db->join('favourite', 'favourite.file_id = images.img_id', 'left');\n\n\t\t$curr_date = date('Y-m-d h:i:s A', strtotime('-7 days'));\n\t\t$this->db->where('images.u_id', $u_id);\n\t\t$this->db->where('images.img_create_at >', $curr_date);\n\t\t$this->db->order_by(\"images.img_create_at\", \"DESC\");\n\t\treturn $this->db->get()->result_array();\n\t}", "public function get_last_posts(){\n\t\t$this->db->order_by('posts.created_at', 'DESC');\n\t\t$this->db->where('validated', 1);\n\t\t$this->db->join('categories', 'categories.id = posts.category_id');\n\t\t$this->db->limit(3);\n\t\t$query = $this->db->get('posts');\n\t\treturn $query->result_array();\n\t}", "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}", "function get_top_albums() {\n\t\t$data = $this->_request_data('topalbums');\n\n\t\tif (!$data) return false;\n\n\t\tforeach ($data->album as $album) {\n\t\t\t$album = new LastfmAlbum($album, $this->_connection);\n\t\t\t//$album->artist = $this->name;\n\t\t\t$result[] = $album;\n\t\t}\n\n\t\treturn $result;\n\n\t}", "public static function getAudios($user_id, $page = 1)\n {\n $count = self::getAudiosCount($user_id);\n // default result\n $result = array(\n 'audios' => array(),\n 'load_more' => false,\n 'page' => $page,\n 'total' => $count\n );\n\n if (0 === $count) {\n return $result;\n }\n\n $total_pages = ceil($count / self::$per_page);\n\n if ($page > $total_pages) {\n return $result;\n }\n\n $columns = self::$columns;\n $columns = implode(',', $columns);\n $query = db()->prepare(\n \"SELECT\n {$columns}\n FROM audios\n WHERE reply_to IS NULL\n AND status = '1'\n AND user_id = :user_id\n ORDER BY date_added DESC\n LIMIT :skip, :max\"\n );\n $query->bindValue('user_id', $user_id);\n $query->bindValue(\n 'skip',\n ($page - 1) * self::$per_page,\n PDO::PARAM_INT\n );\n $query->bindValue('max', self::$per_page, PDO::PARAM_INT);\n $query->execute();\n\n while ($audio = $query->fetch(PDO::FETCH_ASSOC)) {\n $result['audios'][] = self::complete($audio);\n }\n\n $result['load_more'] = $page < $total_pages;\n $result['page'] = $page + 1;\n $result['total'] = $count;\n return $result;\n }", "function fetch_latest() {\n global $track;\n $out = array();\n system(\"curl --silent -o temp.json 'http://search.twitter.com/search.json?rpp=100&q=$track'\");\n $js = json_decode(file_get_contents('temp.json'), true);\n foreach ($js['results'] as $m) {\n $out[] = json_encode(array(\n 'id_str' => $m['id_str'],\n 'user' => array(\n 'screen_name' => $m['from_user'],\n 'profile_image_url' => $m['profile_image_url'],\n ),\n 'created_at' => $m['created_at'],\n 'text' => $m['text'],\n ));\n }\n $out = array_reverse($out);\n return $out;\n}", "public function gather_tags($limit = 5) {\n\n\t\t// We need the filenames\n\t\t$album = new Album($this->uid);\n\n\t\t// grab the songs and define our results\n\t\t$songs = $album->get_songs();\n\t\t$data = array();\n\n\t\t// Foreach songs in this album\n\t\tforeach ($songs as $song_id) {\n\t\t\t$song = new Song($song_id);\n\t\t\t// If we find a good one, stop looking\n\t\t\t$getID3 = new getID3();\n\t\t\ttry { $id3 = $getID3->analyze($song->file); }\n\t\t\tcatch (Exception $error) {\n\t\t\t\tdebug_event('getid3', $error->message, 1);\n\t\t\t}\n\n\t\t\tif (isset($id3['asf']['extended_content_description_object']['content_descriptors']['13'])) {\n\t\t\t\t$image = $id3['asf']['extended_content_description_object']['content_descriptors']['13'];\n\t\t\t\t$data[] = array(\n\t\t\t\t\t'song' => $song->file,\n\t\t\t\t\t'raw' => $image['data'],\n\t\t\t\t\t'mime' => $image['mime']);\n\t\t\t}\n\n\t\t\tif (isset($id3['id3v2']['APIC'])) {\n\t\t\t\t// Foreach in case they have more then one\n\t\t\t\tforeach ($id3['id3v2']['APIC'] as $image) {\n\t\t\t\t\t$data[] = array(\n\t\t\t\t\t\t'song' => $song->file,\n\t\t\t\t\t\t'raw' => $image['data'],\n\t\t\t\t\t\t'mime' => $image['mime']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($limit && count($data) >= $limit) {\n\t\t\t\treturn array_slice($data, 0, $limit);\n\t\t\t}\n\n\t\t} // end foreach\n\n\t\treturn $data;\n\n\t}", "public function most_liked($artist)\n {\n $songs = $artist->songs()->withCount('likes')->orderBy('likes_count', 'desc')->get();\n return $songs;\n }", "public function list_songs_epk($user_id, $limit)\n {\n return $this->db->where('user_id', $user_id)\n ->where('availability !=', '6')\n ->limit($limit)->order_by('id', 'DESC')\n ->get('audio_song')->result_array();\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}", "public function getLastVideoPublication($user){\n return $this->getByCategoryTypeLimited('Video', $user);\n }", "public static function getLastGallery()\n {\n return (array) BackendModel::getContainer()->get('database')->getRecord(\n 'SELECT i.*\n FROM slideshow_galleries AS i\n ORDER BY id DESC\n LIMIT 1'\n );\n }", "function get_most_played() {\n\t\t$this->db->select('songs.song_id, songs.title, songs.artist, songs.album_art, count(interactions.song_id) as play')->from('songs')->order_by('play','desc')->limit(15);\n\t\t$this->db->join('interactions', 'songs.song_id = interactions.song_id');\n\t\t$this->db->group_by('songs.song_id');\n\t\t$songs = $this->db->get();\n\t\treturn $songs->result();\n\n\t}", "function getRecentGames($var){\n\t\t$url = BASE . \"/v1.3/game/by-summoner/\" . $var . \"/recent\" . KEY;\n\t\treturn getIt($url);\n\t}", "function get_latest_lfm_track() {\n\t$url = 'http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=' . LFM_USERNAME . '&api_key=' . LFM_API_KEY . '&format=json';\n\t$js = download_json($url);\n\treturn $js['recenttracks']['track'][0];\n}", "public function getTopArtists ()\n {\n $lastFmService = new LastFmService;\n $limit = $this->app->request->params('limit', 20);\n $data = $lastFmService->getTopArtists($limit);\n $this->respond($data);\n }", "public function getTracksAudio () {\n $tracks = [];\n $files = Storage::disk('audio')->allFiles();\n $sDir = storage_path('media/audio') . DIRECTORY_SEPARATOR;\n foreach ($files as $file) {\n $fileName = rawurldecode($file);\n $hash = md5(dirname($fileName) . md5_file($sDir . $fileName));\n if (Storage::disk('meta')->exists($hash)) {\n $meta = collect(json_decode(Storage::disk('meta')->get($hash), TRUE));\n }else{\n $meta = collect([\n 'id' => $hash\n , 'filename' => $fileName\n , 'path' => dirname($fileName)\n , 'title' => basename($fileName)\n , 'name' => $fileName\n , 'size' => Storage::disk('audio')->size($file)\n , 'url' => 'audio/' . $fileName\n , 'added' => time()\n ]);\n Storage::disk('meta')->put($hash, $meta->toJson());\n chmod(storage_path('app/metadata/' . $hash), 0664);\n }\n $tracks[] = $meta;\n }\n return $tracks;\n }" ]
[ "0.6503989", "0.6369029", "0.595663", "0.5936372", "0.57091296", "0.5678862", "0.56748086", "0.56406987", "0.55890363", "0.5557316", "0.5510495", "0.55059195", "0.5490795", "0.5482875", "0.5475868", "0.54381776", "0.540108", "0.53873235", "0.53830063", "0.5364136", "0.5322636", "0.530941", "0.530329", "0.5299144", "0.5297724", "0.52667445", "0.5255047", "0.5232075", "0.5220291", "0.522023" ]
0.772988
0
Returns an array with the 3 most listened audios of the last 30 days
public static function getPopularAudios() { $columns = self::$columns; /** * Here we do a JOIN, so before putting the columns, * place the 'A.' (for the Audios table) before every * column. * @var array */ $columns = array_map( function ($value) { return 'A.' . $value; }, $columns ); $columns = implode(',', $columns); $query = db()->prepare( "SELECT DISTINCT {$columns} FROM audios AS A INNER JOIN users AS U ON A.user_id = U.id AND U.audios_privacy = 'public' AND A.reply_to IS NULL AND A.status = '1' AND A.date_added BETWEEN :oldtime AND :newtime ORDER BY A.plays DESC LIMIT 3" ); $query->bindValue( 'oldtime', time() - strtotime('-30 days'), PDO::PARAM_INT ); $query->bindValue('newtime', time(), PDO::PARAM_INT); $query->execute(); $result = array(); while ($audio = $query->fetch(PDO::FETCH_ASSOC)) { $result[] = self::complete($audio); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRecentAudios()\n {\n $current_user = Users::getCurrentUser();\n $columns = implode(',', self::$columns);\n $query = db()->prepare(\n \"SELECT\n {$columns}\n FROM audios\n WHERE reply_to IS NULL\n AND status = '1'\n AND user_id = :user_id\n ORDER BY date_added DESC\n LIMIT 3\"\n );\n $query->bindValue('user_id', $current_user->id, PDO::PARAM_INT);\n $query->execute();\n $result = array();\n foreach ($query->fetchAll() as $array) {\n $result[] = self::complete($array);\n }\n return $result;\n }", "function get_most_played() {\n\t\t$this->db->select('songs.song_id, songs.title, songs.artist, songs.album_art, count(interactions.song_id) as play')->from('songs')->order_by('play','desc')->limit(15);\n\t\t$this->db->join('interactions', 'songs.song_id = interactions.song_id');\n\t\t$this->db->group_by('songs.song_id');\n\t\t$songs = $this->db->get();\n\t\treturn $songs->result();\n\n\t}", "public function getMaxMusicList(){\n return $this->_get(15);\n }", "function openskydora_get_most_viewed_items($count, $weeks_ago=7, $exclude=NULL) {\n\n $records = openskydora_get_most_viewed($count+20, $weeks_ago, $exclude);\n $item_records = array(); // No collections\n \n // filter out collection citation model\n foreach ($records as $pid=>$data) {\n $data->obj = islandora_object_load($pid);\n if (in_array('islandora:collectionCModel',$data->obj->models)) {\n // dsm ('collection! '. $pid);\n } else {\n $item_records[$pid] = $data;\n }\n }\n return array_slice($item_records, 0, $count, TRUE);\n}", "public function getRecentTracks($limit) {\n require_once \"track.php\";\n\n // Store an array of Track objects to be returned\n $tracks = array();\n \n $response = json_decode($this->getRequest(\"me/player/recently-played?limit=\" . $limit)->getBody()->getContents());\n\n foreach ($response->{\"items\"} as $track) {\n array_push($tracks, new Track($track, $this->access_token));\n }\n\n return array($tracks, $response->{\"next\"});\n }", "public function popular($artist)\n {\n $songs = $artist->songs()->withCount('plays')->orderBy('plays_count', 'desc')->take(5)->get();\n return $songs;\n }", "public function getLatestTracks ()\n {\n $lastFmService = new LastFmService;\n $limit = $this->app->request->params('limit', 1);\n $data = $lastFmService->getLatestTracks($limit);\n $this->respond($data);\n }", "function openskydora_get_most_viewed_collections($count=5, $weeks_ago=5) {\n // get all the views in the window\n $views = openskydora_get_most_viewed (10000, $weeks_ago);\n\n // Kludge to keep number of pids from blowing up Solr\n $views = array_slice($views, 0, 100);\n \n // search for all the unique PIDs that aren't collections\n $query = implode (array_map ('pid_query_clause', array_keys($views)), ' OR ');\n $query = '('.$query.') NOT RELS_EXT_hasModel_uri_t:\"*collectionCModel\"';\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 );\n $params = array(\n 'fl'=>implode($solr_fields, ','),\n 'sort'=>'fgs_createdDate_dt desc',\n 'solrLimit'=>count($views),\n );\n\n $query_results = openskydora_solr_search($query, $params);\n\n // construct most_viewed array to return\n $most_viewed = array();\n foreach($query_results as $item) {\n $pid = $item['PID'];\n //dsm($pid . ' views: ' . $views[$pid]->views);\n $collection = $item['RELS_EXT_isMemberOfCollection_uri_s'];\n $label = $item['fgs_label_s'];\n $coll_views = isset($most_viewed[$collection]) ? $most_viewed[$collection] : 0;\n $coll_views += intval($views[$pid]->views);\n // dsm (\"- $collection coll_views: $coll_views\");\n /* $most_viewed[$collection] = array (\n 'views' =>$coll_views,\n 'label' => $label\n );\n */\n $most_viewed[$collection] = $coll_views;\n }\n\n arsort($most_viewed);\n /*\n usort($most_viewed, function ($a, $b) {\n return $a['views'] <=> $b['views'];\n });\n */\n return array_slice($most_viewed, 0, $count, TRUE);\n}", "public function top_songs($data)\n {\n $limit = $this->di['array_get']($data, 'limit', 10);\n $feed = \"http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topsongs/limit=$limit/xml\";\n $top_songs = $this->di['tools']->file_get_contents($feed);\n $xml = simplexml_load_string($top_songs);\n $array = array();\n $this->_convertXmlObjToArr($xml, $array);\n return $array;\n }", "public function last30Books($lang, $nrOfTitles = 30, $filter = null);", "public function numBeforeWatchLimit(){\n return self::MAX_NUMBER_OF_VIDEOS - $this->getWatchedVideosToday()->count();\n }", "public function most_liked($artist)\n {\n $songs = $artist->songs()->withCount('likes')->orderBy('likes_count', 'desc')->get();\n return $songs;\n }", "public function getTenLatestPhotos();", "function get_counts() {\n\t$artists = @file(\"/var/lib/musica/artists.count\");\n\t$albums = @file(\"/var/lib/musica/albums.count\");\n\t$songs = @file(\"/var/lib/musica/songs.count\");\n\t$counts = array(rtrim($artists[0]), rtrim($albums[0]), rtrim($songs[0]));\n\treturn $counts;\n}", "public function hasMaxMusic(){\n return $this->_has(15);\n }", "public function gather_tags($limit = 5) {\n\n\t\t// We need the filenames\n\t\t$album = new Album($this->uid);\n\n\t\t// grab the songs and define our results\n\t\t$songs = $album->get_songs();\n\t\t$data = array();\n\n\t\t// Foreach songs in this album\n\t\tforeach ($songs as $song_id) {\n\t\t\t$song = new Song($song_id);\n\t\t\t// If we find a good one, stop looking\n\t\t\t$getID3 = new getID3();\n\t\t\ttry { $id3 = $getID3->analyze($song->file); }\n\t\t\tcatch (Exception $error) {\n\t\t\t\tdebug_event('getid3', $error->message, 1);\n\t\t\t}\n\n\t\t\tif (isset($id3['asf']['extended_content_description_object']['content_descriptors']['13'])) {\n\t\t\t\t$image = $id3['asf']['extended_content_description_object']['content_descriptors']['13'];\n\t\t\t\t$data[] = array(\n\t\t\t\t\t'song' => $song->file,\n\t\t\t\t\t'raw' => $image['data'],\n\t\t\t\t\t'mime' => $image['mime']);\n\t\t\t}\n\n\t\t\tif (isset($id3['id3v2']['APIC'])) {\n\t\t\t\t// Foreach in case they have more then one\n\t\t\t\tforeach ($id3['id3v2']['APIC'] as $image) {\n\t\t\t\t\t$data[] = array(\n\t\t\t\t\t\t'song' => $song->file,\n\t\t\t\t\t\t'raw' => $image['data'],\n\t\t\t\t\t\t'mime' => $image['mime']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($limit && count($data) >= $limit) {\n\t\t\t\treturn array_slice($data, 0, $limit);\n\t\t\t}\n\n\t\t} // end foreach\n\n\t\treturn $data;\n\n\t}", "public static function watchedMovies()\n {\n return self::where('user_id', Auth::id())\n ->where('watched', 1)\n ->orderBy('created_at', 'desc')\n ->limit(UserMovie::LIMIT)\n ->get();\n }", "function getLast3Liked(){\n global $USER;\n $query = dbQuery(\"SELECT liked FROM user_interests WHERE user_id= '\".$USER['id'].\"'\");\n\n while($row = mysql_fetch_array($query)){\n $allLikes = unserialize($row['liked']);\n }\n if (!$allLikes)\n $allLikes = array();\n $last3 = array_splice($allLikes, -3, 3);\n return $last3;\n}", "function birthdayCakeCandles($ar) {\n $maxHeight = max($ar); $cnt=0;\n foreach($ar as $candle){\n if($candle == $maxHeight){\n $cnt++;\n }\n }\n return $cnt;\n}", "function birthdayCakeCandles($candles) {\n // Write your code here\n\n // Complete this function\n $max = $candles[0];\n $counts = [];\n foreach($candles as $a) {\n if(isset($counts[$a])) {\n $counts[$a]++;\n }else {\n $counts[$a] = 1;\n }\n \n if($a > $max) {\n $max = $a; \n } \n }\n return $counts[$max];\n\n\n}", "protected function getTopTracks()\r\n {\r\n Application::$app->checkSpotifyToken();\r\n $curl = curl_init();\r\n\r\n curl_setopt_array($curl, array(\r\n CURLOPT_URL => 'https://api.spotify.com/v1/me/top/tracks',\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_ENCODING => '',\r\n CURLOPT_MAXREDIRS => 10,\r\n CURLOPT_TIMEOUT => 0,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n CURLOPT_CUSTOMREQUEST => 'GET',\r\n CURLOPT_HTTPHEADER => array(\r\n 'Accept: application/json',\r\n 'Content-Type: application/json',\r\n 'Authorization: Bearer ' . $_SESSION['user_token']\r\n ),\r\n ));\r\n\r\n $response = curl_exec($curl);\r\n curl_close($curl);\r\n\r\n return json_decode($response, true);\r\n }", "public function getPopularSongsToday($limit = null)\r\n {\r\n $args = array();\r\n if (!empty($limit)) {\r\n $args['limit'] = (int)$limit;\r\n }\r\n\r\n //todo: remove this once we everything is forced dynamically\r\n $sessionID = false;\r\n if (isset($this) && !empty($this->sessionID)) {\r\n $sessionID = $this->sessionID;\r\n }\r\n return self::makeCall('getPopularSongsToday', $args, 'songs', false, $sessionID);\r\n }", "public function getUserRecentTracks ( $user, $limit = 50 ) {\n\t\tif ( $this->api_key ) {\t\n\t\t\t$url = \n\t\t\t\tself::API_ROOT . $this->urls['UserGetRecentTracks'] . \n\t\t\t\t\"&api_key=\" . $this->api_key .\n\t\t\t\t\"&user=\" . $user .\n\t\t\t\t\"&limit=\" . $limit;\n\t\t\t\t\n\t\t\treturn $this->getResults( $url );\n\t\t}\n\t}", "public function getRecentSongCountByShow($show)\n {\n return $this->wpdb->get_var(<<<SQL\nSELECT\n COUNT(`{$this->wpdb->timber_songs}`.`ID`)\nFROM `{$this->wpdb->timber_songs}`\nLEFT JOIN `{$this->wpdb->timber_timeslots}`\n ON `{$this->wpdb->timber_songs}`.`song_timeslot` = `{$this->wpdb->timber_timeslots}`.`ID`\nLEFT JOIN `{$this->wpdb->timber_shows}`\n ON `{$this->wpdb->timber_timeslots}`.`timeslot_show` = `{$this->wpdb->timber_shows}`.`ID`\nWHERE `{$this->wpdb->timber_shows}`.`ID` = '$show'\nAND `{$this->wpdb->timber_songs}`.`song_date` > DATE_SUB(NOW(), INTERVAL 1 WEEK)\nSQL\n );\n }", "public function getWatchedVideosToday(){\n $watched_videos = $this->watchedVideos;\n $watched_videos_today = $watched_videos->filter(function ($v){\n return self::watchedVideoFilter($v);\n });\n\n return $watched_videos_today;\n }", "function searchMoviesFromDuration($iDurationMax, array $aMovies)\n{\n $aSearchMovies = array();\n foreach ($aMovies as $aMovie) {\n $iDuration = $aMovie['duration'];\n if ($iDuration <= $iDurationMax) {\n $aSearchMovies[] = $aMovie;\n }\n }\n\n return $aSearchMovies;\n}", "function openskydora_get_most_viewed($count, $weeks_ago=7, $exclude=NULL) {\n $query = db_select('islandora_usage_stats_object_access_log', 'log');\n $query->join('islandora_usage_stats_objects', 'objects', 'log.pid_id = objects.id');\n $query->addExpression('COUNT(log.pid_id)', 'views');\n $query->fields('objects', array('pid'))\n ->groupBy('log.pid_id')\n ->orderBy('views', 'DESC')\n ->range(0, $count);\n // XXX: This could potentially cause slow down on large data sets.\n if ($exclude) {\n $query->condition('pid', $exclude, 'NOT IN');\n }\n if ($weeks_ago) {\n $query->condition('log.time', strtotime(\"-$weeks_ago week\"), '>');\n }\n $results = $query->execute();\n $records = $results->fetchAllAssoc('pid');\n return $records;\n}", "public function findLatest(): array\n {\n\n return $this->createQueryBuilder('p')\n ->where('p.isOnline = true')\n ->orderBy('p.created_at', 'DESC')\n ->setMaxResults(6)\n ->getQuery()\n ->getResult();\n }", "function count_best($collectionArray)\n{\n\t$countingArray = array();\n\n\tforeach($collectionArray as $value) {\n\t\t$key = $value->get_room() . \": \" . $value->get_position();\n\t\tif (array_key_exists($key, $countingArray)) {\n\t\t\tif ($value->get_difference() < 10) {\n\t\t\t\t$countingArray[$key] = $countingArray[$key] + 1;\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t$countingArray[$key] = $countingArray[$key] + 0;\n\t\t\t\t}\n\t\t\t}\n\t\telse {\n\t\t\tif ($value->get_difference() < 10) {\n\t\t\t\t$countingArray[$key] = 1;\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t$countingArray[$key] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\treturn $countingArray;\n\n}", "public function getUserLovedTracks ( $username, $limit = 50 ) {\n\t\tif ( $this->api_key ) {\n\t\t\t$url = \n\t\t\t\tself::API_ROOT . $this->urls['UserGetLovedTracks'] . \n\t\t\t\t\"&api_key=\" . $this->api_key . \n\t\t\t\t\"&user=\" . $username .\n\t\t\t\t\"&limit=\" . $limit\t;\n\t\t\t\t\n\t\t\treturn $this->getResults( $url );\n\t\t}\n\t}" ]
[ "0.6221539", "0.60475945", "0.59939355", "0.56807876", "0.5507884", "0.54994106", "0.5392966", "0.5356846", "0.5344869", "0.5292495", "0.5268898", "0.526116", "0.5249662", "0.52281034", "0.5145045", "0.5134908", "0.5114248", "0.50410324", "0.5030097", "0.501807", "0.50031793", "0.50015736", "0.49920022", "0.49854544", "0.49780723", "0.49726993", "0.49570122", "0.49569362", "0.49562493", "0.4954851" ]
0.6292235
0
Get the count of audios of the user $id
public static function getAudiosCount($user_id) { $query = db()->prepare( "SELECT COUNT(*) FROM audios WHERE reply_to IS NULL AND status = '1' AND user_id = :user_id" ); $query->bindValue('user_id', $user_id); $query->execute(); $count = (int) $query->fetchColumn(); return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function count_media($user_id, $table)\n {\n $database = Database::instance();\n $sql = \"SELECT COUNT(*) as num FROM \" . $table . \" WHERE active = 1 AND user_id = \" . $user_id;\n $query = $database->prepare($sql);\n $query->execute();\n $result = $query->fetch(\\PDO::FETCH_ASSOC);\n $query->closeCursor();\n if($result === false || $result === null) {\n APIService::response_fail(HttpFailCodes::http_response_fail()->get_media);\n }else{\n return $result;\n }\n }", "function count_playlist_items($id)\r\n\t{\r\n\t\tglobal $db;\r\n\t\treturn $db->count(tbl($this->playlist_items_tbl),\"playlist_item_id\",\"playlist_id='$id'\");\r\n\t}", "public static function getFavoritesCount($user_id)\n {\n $query = db()->prepare(\n \"SELECT\n COUNT(*)\n FROM audios AS A\n INNER JOIN favorites AS F\n ON A.id = F.audio_id\n AND F.user_id = :user_id\n AND A.status = '1'\"\n );\n $query->bindValue('user_id', $user_id);\n $query->execute();\n $count = (int) $query->fetchColumn();\n return $count;\n }", "function getSamplesCount($id){\n\t\n\t\t$query = 'SELECT count(*) AS SampleCount FROM samples As Sample \n\t\t\t\t LEFT JOIN minerals AS Mineral ON Sample.mineral_id=Mineral.id\n\t\t\t\t LEFT JOIN crystal_systems as CrystalSystem ON Mineral.crystal_system_id=CrystalSystem.id\n\t\t\t\t WHERE CrystalSystem.id = '.$id;\n\t\t\n\t\treturn $this->query($query);\n\t\n\t}", "public function getCollectionCount($id){\n $topics = Topic::where('user_id',$id)\n ->whereHas('category',function($q){\n $q->where('is_blocked','no');\n })->select('id')->get();\n $topicId = [];\n foreach ($topics as $topic)\n $topicId[] = $topic->id;\n if(!count($topicId))\n return 0;\n return DB::table('topic_user')->whereIn('topic_id',$topicId)->whereNotIn('user_id',[$id])->count();\n }", "public static function getRepliesCount($audio_id)\n {\n $query = db()->prepare(\n \"SELECT\n COUNT(*)\n FROM audios\n WHERE status = '1'\n AND reply_to = :reply_to\"\n );\n $query->bindValue('reply_to', $audio_id);\n $query->execute();\n $count = (int) $query->fetchColumn();\n return $count;\n }", "function get_unread_forcasts_count($user_id)\n\t{\n\t}", "public function getMixiuserCount()\n {\n $sql = \" SELECT COUNT(id) FROM mixi_user \";\n return $this->_rdb->fetchOne($sql);\n }", "function mobile_avastream_count() \r\n{\r\n $output['count']=0;\r\n $lilo_mongo = new LiloMongo();\r\n $lilo_mongo->selectDB('Assets');\r\n $lilo_mongo->selectCollection('AvatarStream'); \r\n $output['count']=$lilo_mongo->count();\r\n return json_encode($output);\r\n}", "function get_total_infor_of_user_course($id)\n\t{\n\t\t$counts = Activity::where('user_id', Auth::id())->get();\n\t\treturn count($counts);\n\t}", "public function count_items() { \n\n\t\t$sql = \"SELECT COUNT(`id`) FROM `tmp_playlist_data` WHERE `tmp_playlist_data`.`tmp_playlist`='\" . $this->id . \"'\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\t$results = Dba::fetch_row($db_results); \n\n\t\treturn $results['0']; \n\n\t}", "public static function GetEventsRecordingsCount( $user_id )\n {\n\t\t$dend = mktime(0, 0, 0, date('m'), date('d')-30, date('Y'));\n \n\t $count = EventVideoQuery::create()->select(array('Id'))->filterByUserId($user_id)\n ->filterByPdate($dend, Criteria::GREATER_EQUAL)-> count();\n \n\t return $count;\n }", "public function getSongCount()\n {\n return $this->wpdb->get_var(<<<SQL\nSELECT\n COUNT(`{$this->wpdb->timber_songs}`.`ID`)\nFROM `{$this->wpdb->timber_songs}`\nSQL\n );\n }", "public static function countCate($id) {\n\n $taxonomy = \"audio_category\"; // can be category, post_tag, or custom taxonomy name\n \n if( is_numeric($id) ) {\n // Using Term ID\n $term = get_term_by('id', $id, $taxonomy);\n } else {\n // Using Term Slug\n $term = get_term_by('slug', $id, $taxonomy);\n }\n // Fetch the count\n return $term->count;\n\n }", "public function get_song_count() { \n\n\t\t$sql = \"SELECT COUNT(`id`) FROM `playlist_data` WHERE `playlist`='\" . Dba::escape($this->id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_row($db_results);\n\n\t\treturn $results['0'];\n\n\t}", "public function getAudienceCount(): int\n {\n return count($this->getSplitAudiences());\n }", "public function countMedia(CollectionInterface $collection);", "public function getSubscriberCount();", "public function num_songs_epk($user_id)\n {\n return $this->db->where('user_id', $user_id)\n ->group_start()\n ->like('availability', '3')\n ->group_end()\n ->get('audio_song')->num_rows();\n }", "function huifucount($id){\n return Db::name('zixun_huifu')->where(['pid'=>$id,'is_show'=>'y','is_del'=>'n','types'=>'huifu'])->count();\n}", "public function getCount($id) {\n\n $query = \"select * from scope where id=\" . $id;\n $result = mysqli_query($this->plink, $query);\n return mysqli_num_rows($result);\n }", "function getMovieCount(){\n return $this->query(\"SELECT COUNT(id) as number FROM docs WHERE visible=1\");\n }", "public function getUserFilesCount($user)\n {\n $queryBuilder = $this->createQueryBuilder('f');\n $queryBuilder->innerJoin('f.userFiles', 'uf', Expr\\Join::WITH, $queryBuilder->expr()->eq('uf.email', '?1'));\n $queryBuilder->select($queryBuilder->expr()->count('f'));\n $queryBuilder->setParameter(1, $user->getEmail()); \n\n $query = $queryBuilder->getQuery();\n $singleScalar = $query->getSingleScalarResult();\n return $singleScalar;\n }", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();" ]
[ "0.6653265", "0.6578777", "0.62211895", "0.6184071", "0.6182242", "0.6160486", "0.61503094", "0.61069095", "0.6077008", "0.603108", "0.6020434", "0.5923961", "0.59173167", "0.59107983", "0.59019077", "0.58992803", "0.58667624", "0.5860631", "0.5845526", "0.58436733", "0.5825272", "0.581674", "0.5795779", "0.5783781", "0.5783781", "0.5783781", "0.5783781", "0.5783781", "0.5783781", "0.5783781" ]
0.7377949
0
Returns an array with the last 10 audios of $user_id
public static function getAudios($user_id, $page = 1) { $count = self::getAudiosCount($user_id); // default result $result = array( 'audios' => array(), 'load_more' => false, 'page' => $page, 'total' => $count ); if (0 === $count) { return $result; } $total_pages = ceil($count / self::$per_page); if ($page > $total_pages) { return $result; } $columns = self::$columns; $columns = implode(',', $columns); $query = db()->prepare( "SELECT {$columns} FROM audios WHERE reply_to IS NULL AND status = '1' AND user_id = :user_id ORDER BY date_added DESC LIMIT :skip, :max" ); $query->bindValue('user_id', $user_id); $query->bindValue( 'skip', ($page - 1) * self::$per_page, PDO::PARAM_INT ); $query->bindValue('max', self::$per_page, PDO::PARAM_INT); $query->execute(); while ($audio = $query->fetch(PDO::FETCH_ASSOC)) { $result['audios'][] = self::complete($audio); } $result['load_more'] = $page < $total_pages; $result['page'] = $page + 1; $result['total'] = $count; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRecentAudios()\n {\n $current_user = Users::getCurrentUser();\n $columns = implode(',', self::$columns);\n $query = db()->prepare(\n \"SELECT\n {$columns}\n FROM audios\n WHERE reply_to IS NULL\n AND status = '1'\n AND user_id = :user_id\n ORDER BY date_added DESC\n LIMIT 3\"\n );\n $query->bindValue('user_id', $current_user->id, PDO::PARAM_INT);\n $query->execute();\n $result = array();\n foreach ($query->fetchAll() as $array) {\n $result[] = self::complete($array);\n }\n return $result;\n }", "public function list_songs_flp($user_id, $limit)\n {\n return $this->db->where('user_id', $user_id)\n ->limit($limit)->order_by('id', 'DESC')\n ->get('audio_song')->result_array();\n }", "public function list_songs_alp($user_id, $limit)\n {\n return $this->db->where('user_id', $user_id)\n ->group_start()\n ->like('availability', 2)\n ->or_like('availability', 4)\n ->or_like('availability', 5)\n ->group_end()\n ->limit($limit)->order_by('id', 'DESC')\n ->get('audio_song')->result_array();\n }", "public function list_songs_epk($user_id, $limit)\n {\n return $this->db->where('user_id', $user_id)\n ->where('availability !=', '6')\n ->limit($limit)->order_by('id', 'DESC')\n ->get('audio_song')->result_array();\n }", "public function getUserRecentTracks ( $user, $limit = 50 ) {\n\t\tif ( $this->api_key ) {\t\n\t\t\t$url = \n\t\t\t\tself::API_ROOT . $this->urls['UserGetRecentTracks'] . \n\t\t\t\t\"&api_key=\" . $this->api_key .\n\t\t\t\t\"&user=\" . $user .\n\t\t\t\t\"&limit=\" . $limit;\n\t\t\t\t\n\t\t\treturn $this->getResults( $url );\n\t\t}\n\t}", "public static function get_photos_by_user($user_id) {\n\t\t$photos_array = array();\n\n\t\t$sql = \"SELECT * \n\t\t FROM photo_directory \n\t\t WHERE user_id = {$user_id}\n\t\t ORDER BY time_uploaded DESC;\";\n\t\t$photos_dbo = mysql_query($sql);\n\t\twhile ($row = mysql_fetch_assoc($photos_dbo)) {\n\t\t\tarray_push($photos_array, $row);\n\t\t} \n\n\t\tglobal $firephp;\n\t\t$firephp->log('get_photos_by_user:');\n\t\t$firephp->log($photos_array);\n\t\treturn $photos_array;\n\t}", "public static function getFavorites($user_id, $page = 1)\n {\n $count = self::getFavoritesCount($user_id);\n $result = array(\n 'audios' => array(),\n 'load_more' => false,\n 'page' => $page,\n 'total' => $count\n );\n\n if (0 == $count) {\n return $result;\n }\n\n $total_pages = ceil($count / 10);\n\n if ($page > $total_pages) {\n return $result;\n }\n\n $columns = self::$columns;\n $columns = array_map(\n function ($value) {\n return 'A.' . $value;\n },\n $columns\n );\n $columns = implode(',', $columns);\n $query = db()->prepare(\n \"SELECT DISTINCT\n {$columns}\n FROM audios AS A\n INNER JOIN favorites AS F\n ON A.id = F.audio_id\n AND F.user_id = :user_id\n AND A.status = '1'\n ORDER BY F.date_added DESC\n LIMIT :skip, :max\"\n );\n $query->bindValue('user_id', $user_id);\n $query->bindValue(\n 'skip',\n ($page - 1) * self::$per_page,\n PDO::PARAM_INT\n );\n $query->bindValue('max', self::$per_page, PDO::PARAM_INT);\n $query->execute();\n\n while ($audio = $query->fetch(PDO::FETCH_ASSOC)) {\n $result['audios'][] = self::complete($audio);\n }\n \n $result['load_more'] = $page < $total_pages;\n $result['page'] = $page + 1;\n $result['total'] = $count;\n return $result;\n }", "function subscriptions ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `subscription` WHERE user_id = '{$user_id}' ORDER BY id DESC\");\n }", "public function videosFromSubscriptions(User $user,$limit = 5)\n\t{\n\t\treturn $user->subscribedChannels()->with(['videos' => function ($query) use ($limit) \n\t\t\t{\n\t\t\t\t$query->visible()->take($limit); \n\t\t\t}])->get()->pluck('videos')->flatten()->sortByDesc('created_at');\n\n\n\n\t}", "public static function getPopularAudios()\n {\n $columns = self::$columns;\n /**\n * Here we do a JOIN, so before putting the columns,\n * place the 'A.' (for the Audios table) before every\n * column.\n * @var array\n */\n $columns = array_map(\n function ($value) {\n return 'A.' . $value;\n },\n $columns\n );\n $columns = implode(',', $columns);\n $query = db()->prepare(\n \"SELECT DISTINCT\n {$columns}\n FROM audios AS A\n INNER JOIN users AS U\n ON A.user_id = U.id\n AND U.audios_privacy = 'public'\n AND A.reply_to IS NULL\n AND A.status = '1'\n AND A.date_added BETWEEN :oldtime AND :newtime\n ORDER BY A.plays DESC\n LIMIT 3\"\n );\n $query->bindValue(\n 'oldtime',\n time() - strtotime('-30 days'),\n PDO::PARAM_INT\n );\n $query->bindValue('newtime', time(), PDO::PARAM_INT);\n $query->execute();\n $result = array();\n while ($audio = $query->fetch(PDO::FETCH_ASSOC)) {\n $result[] = self::complete($audio);\n }\n return $result;\n }", "public static function get_users($user_id) { \n\n\t\t$user_id = Dba::escape($user_id); \n\t\t$results = array(); \n\n\t\t$sql = \"SELECT `id` FROM `playlist` WHERE `user`='$user_id' ORDER BY `name`\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\twhile ($row = Dba::fetch_assoc($db_results)) { \n\t\t\t$results[] = $row['id']; \n\t\t} \n\n\t\treturn $results; \n\n\t}", "function getFilesByUserId($user_id) {\r\n $sql = '\r\n SELECT\r\n *\r\n FROM\r\n files\r\n WHERE\r\n user_id = ?\r\n ORDER BY\r\n uuid DESC\r\n ';\r\n\r\n return $this->query_result($sql, array($user_id));\r\n }", "function later_video_list_of($user_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT *\n FROM imago_info_video i\n INNER JOIN imago_my_later l\n ON i.content_id = l.content_id\n AND i.section_id = l.section_id\n AND i.episod_id = l.episod_id\n AND i.type = 'tvshow'\n AND l.user_id = ?\n ORDER BY l.add_date DESC\n \");\n\n $request->execute(array($user_id));\n\n return $request->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getLastVideoPublication($user){\n return $this->getByCategoryTypeLimited('Video', $user);\n }", "public function findAllFromUser(string $user_id): array{\n $query = <<<SQL\n select * from activities\n where user_id=:user_id\n order by ended_at desc;\nSQL;\n $query = $this->db->prepare($query);\n $query->execute([':user_id' => $user_id]);\n return $query->fetchAll() ?: [];\n }", "public function get_data_playlist_amp($user_id)\n {\n $this->db->where('user_id', $user_id);\n $data_album = $this->db->get('playlist_amp')->result_array();\n\n return $data_album;\n }", "public static function get_all_with_limit($user_id, $table, $offset = 0, $limit = 50)\n {\n $where = array(\"user_id\" => $user_id);\n $result = DatabaseService::get($table, $where, \"default\", $offset, $limit);\n if($result === false || $result === null) {\n APIService::response_fail(HttpFailCodes::http_response_fail()->get_media);\n }else{\n return Media::build_media_array($table, $result);\n }\n }", "function get_user_images($user_id) {\n $images = DAO_user::DAO_fetch_user_images($user_id);\n if (is_array($images)) {\n $i = 0;\n $result = array();\n foreach ($images as $image) {\n $result[$i++] = $image;\n }\n return $result;\n }\n else return -1;\n }", "public function getUserItems()\n {\n $items = ItemModel::model()->findAll('play_id = :playId ORDER BY id DESC', array(\n ':playId' => $this->playid\n ));\n\n return $items;\n }", "public function getTenLatestPhotos();", "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 }", "static function get_last_used_n_lists_of_user($id, $limit) {\n global $con;\n $lists = array();\n $sql = \"\n SELECT `list_usage`.`list` \n FROM `list_usage`, `list` \n WHERE `list_usage`.`user` = \".$id.\" AND `list_usage`.`list` = `list`.`id` AND `list`.`active` = 1\n GROUP BY `list_usage`.`list`\n ORDER BY MAX(`list_usage`.`time`) DESC\n LIMIT 0 , \".$limit.\";\";\n $query = mysqli_query($con, $sql);\n while ($row = mysqli_fetch_assoc($query)) {\n array_push($lists, intval($row['list']));\n }\n return $lists;\n }", "public function getAllUserAlbums($userId){\n $albums = DB::select('\n select albums.*\n from albums\n where albums.user_id = ?\n order by album_created_at', array($userId));\n return $albums;\n }", "public static function get_all($user_id, $table)\n {\n $where = array(\"user_id\" => $user_id);\n $result = DatabaseService::get($table, $where, \"default\");\n if($result === false || $result === null) {\n APIService::response_fail(HttpFailCodes::http_response_fail()->get_media);\n }else{\n return Media::build_media_array($table, $result);\n }\n }", "public function findOther($user): array\n {\n return $this->createQueryBuilder('c')\n ->where('c.creator != :user')\n ->andWhere('c.private = false')\n ->setParameter('user', $user )\n ->setMaxResults(4)\n ->getQuery()\n ->getResult();\n }", "public function get_user_video($user_id){\n\n $user_id = intval($user_id);\n $uid = $this->get_uid($user_id);\n\n $query = \"SELECT `id`, `source`, `uid`, `filename_or_link` FROM `user_video` WHERE `uid`='$uid';\";\n\n $user_videos = [];\n\n if ($res = sql::$con->query($query, MYSQLI_STORE_RESULT)) {\n\n while ($data = $res->fetch_array(MYSQLI_ASSOC)) {\n if($data['source'] == 'local'){\n $file_path = '/file/video/'.$uid.'/'.$data['filename_or_link'];\n $data['filename_or_link'] = $file_path;\n }\n $user_videos[] = $data;\n }\n\n if(is_object($res)){\n $res->close();\n sql::$con->store_result();\n }\n\n }\n /*\n * FOR EXAMPLE FRAMES\n * <iframe style=\"width: 485px; min-height: 411px;\" src=\"<YOUTUBE-LINK>\" frameborder=\"0\" allowfullscreen allow=\"accelerometer; encrypted-media; gyroscope; picture-in-picture\"></iframe>\n * <iframe style=\"width: 485px; min-height: 411px;\" src=\"<VIMEO-LINK>\" frameborder=\"0\" allowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe>\n *\n * */\n\n return $user_videos;\n }", "public function getUserLovedTracks ( $username, $limit = 50 ) {\n\t\tif ( $this->api_key ) {\n\t\t\t$url = \n\t\t\t\tself::API_ROOT . $this->urls['UserGetLovedTracks'] . \n\t\t\t\t\"&api_key=\" . $this->api_key . \n\t\t\t\t\"&user=\" . $username .\n\t\t\t\t\"&limit=\" . $limit\t;\n\t\t\t\t\n\t\t\treturn $this->getResults( $url );\n\t\t}\n\t}", "public function getByUser($user_id)\n {\n return $this->db->table(static::TABLE)->eq('user_id', $user_id)->desc('date')->asc('start')->findAll();\n }", "public static function getSubscribersId($user_id) {\n $param = ['select' => 'subscribe_id', 'where' => 'user_id'];\n $users_id = self::getUsersId($user_id, $param);\n return is_array($users_id) ? $users_id : [];\n }", "public function getVolleysForUserId( $userId, $limit = 40 ){\n // get latest 10 challenges for user\n $query = \"\n (\n SELECT p.challenge_id, p.joined as created\n FROM `hotornot-dev`.`tblChallengeParticipants` AS p\n JOIN `hotornot-dev`.tblChallenges AS c\n ON p.challenge_id = c.id\n WHERE p.user_id = ? and c.is_private = 0\n )\n UNION\n (\n SELECT id, unix_timestamp(added) as created\n FROM `hotornot-dev`.`tblChallenges`\n WHERE `creator_id` = ? AND is_verify != 1 AND is_private = 0\n )\n order by created desc\n limit $limit\n \";\n $params = array( $userId, $userId );\n $stmt = $this->prepareAndExecute( $query, $params );\n $ids = $stmt->fetchAll( PDO::FETCH_COLUMN, 0 );\n return array_unique($ids);\n }" ]
[ "0.6819318", "0.66039616", "0.64941996", "0.6422933", "0.6272312", "0.61619204", "0.6097867", "0.6077524", "0.58983177", "0.5872854", "0.5860861", "0.5839287", "0.5755814", "0.5712178", "0.5664544", "0.5644869", "0.56433916", "0.5562563", "0.5553308", "0.55049735", "0.54736656", "0.5471358", "0.545884", "0.54560006", "0.54372793", "0.5436155", "0.5427432", "0.54203284", "0.53877544", "0.53616965" ]
0.68402356
0
Get the count of replies of the audio $id
public static function getRepliesCount($audio_id) { $query = db()->prepare( "SELECT COUNT(*) FROM audios WHERE status = '1' AND reply_to = :reply_to" ); $query->bindValue('reply_to', $audio_id); $query->execute(); $count = (int) $query->fetchColumn(); return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReplyCount() : int\n {\n return $this->replyCount;\n }", "public static function replies ( $since_id, $count_replies = false ) {\n\n\t\t$params = array (\n\t\t\t'include_entities' => true,\n\t\t\t'since_id' => $since_id,\n\t\t\t'count' => 100\n\t\t);\n\n\t\t// we need to minimise the payload since we only want a number\n\t\tif ( $count_replies === true ) $params['include_entities'] = false;\n\n\t\tstatic::api()->request('GET', static::api()->url('1.1/statuses/mentions_timeline'), $params);\n\n\t\t$response = static::api()->response['response'];\n\t\t$code = static::api()->response['code'];\n\n\t\tif ($code === 200) {\n\t\t\t$mentions = json_decode($response, false, 512, JSON_BIGINT_AS_STRING);\n\n\t\t\t// We have all replies since the tweet ID we've specified, but\n\t\t\t// here is where twe pick out only the ones that are specifically\n\t\t\t// replies to our ID\n\t\t\t$replies = array_filter($mentions, function ($mention) use ( $since_id ) {\n\t\t\t\tif ($mention->in_reply_to_status_id_str == $since_id) return $mention;\n\t\t\t});\n\n\t\t\tif ( $count_replies === true ) return count($replies);\n\n\t\t\treturn (object) $replies;\n\t\t}\n\n\t\treturn false;\n\n\t}", "public function getAnswerCount();", "public function countRespondents()\n {\n $result = $this->client->run('MATCH (n:Person) RETURN COUNT(n) AS respondents;');\n\n return (int) $result->getRecord()->get('respondents');\n }", "public function countResponses() {\n\t\t\n\t\ttry {\n\t\t\t$select = $this->pdo->select(['id'])->count('*', 'num_ids')->from('posts_'.$this->board)->where('thread', '=', $this->tId);\n\t\t\t$stmt = $select->execute();\n\t\t\t$num_responses = $stmt->fetchColumn(1);\n\t\t\t\n\t\t} catch(\\Exception $e) {\n\t\t\t$this->app->error($e);\n\t\t}\n\t\t\n\t\treturn $num_responses;\n\t}", "public function reply($id)\n {\n $topic = Topic::with(\"photos\")->with(\"author\")->where('relate_id',$id)->paginate(4);\n// $topic = Topic::where('relate_id',$id)->paginate(4);\n if ($topic) {\n return $this->apiPagedSuccess($topic);\n } else {\n return $this->apiError(\"未找到对应的婚庆wish数据\",\"1001\");\n }\n\n }", "function get_total_replies(){\n global $db;\n $query = 'SELECT count(*) FROM replies';\n $statement = $db->prepare($query);\n $statement->execute();\n $total_replies = $statement->fetchAll();\n $total_replies = $statement->rowCount();\n $statement->closeCursor();\n return $total_replies;\n }", "public static function getReplies($audio_id, $page = 1)\n {\n $count = self::getRepliesCount($audio_id);\n // default result\n $result = array(\n 'audios' => array(),\n 'load_more' => false,\n 'page' => $page,\n 'total' => $count\n );\n\n if (0 === $count) {\n return $result;\n }\n\n $total_pages = ceil($count / self::$per_page);\n\n if ($page > $total_pages) {\n return $result;\n }\n\n $columns = self::$columns;\n $columns = implode(',', $columns);\n $query = db()->prepare(\n \"SELECT\n {$columns}\n FROM audios\n WHERE reply_to = :reply_to\n AND status = '1'\n ORDER BY date_added DESC\n LIMIT :skip, :max\"\n );\n $query->bindValue('reply_to', $audio_id);\n $query->bindValue(\n 'skip',\n ($page - 1) * self::$per_page,\n PDO::PARAM_INT\n );\n $query->bindValue('max', self::$per_page, PDO::PARAM_INT);\n $query->execute();\n\n while ($audio = $query->fetch(PDO::FETCH_ASSOC)) {\n $result['audios'][] = self::complete($audio);\n }\n\n $result['load_more'] = ($page < $total_pages);\n $result['page'] = $page + 1;\n $result['total'] = $count;\n return $result;\n }", "function replyCount($topic_id){\n $db = new Database;\n $db->query('SELECT * FROM replies WHERE topic_id = :topic_id');\n $db->bind(':topic_id', $topic_id);\n //Assign Rows\n $rows = $db->resultset();\n //Get Count\n return $db->rowCount();\n}", "public function sentCount();", "function topic_replies($cid, $tid) {\r\n\t$sql = \"SELECT count(*) AS topic_replies FROM posts WHERE category_id='\".$cid.\"' AND topic_id='\".$tid.\"'\";\r\n\t$res = mysql_query($sql) or die(mysql_error());\r\n\t$row = mysql_fetch_assoc($res);\r\n\treturn $row['topic_replies'] - 1;\r\n}", "public function getCommentCounts() {\n $this->allowJSONP(true);\n\n $vanilla_identifier = val('vanilla_identifier', $_GET);\n if (!is_array($vanilla_identifier)) {\n $vanilla_identifier = [$vanilla_identifier];\n }\n\n $vanilla_identifier = array_unique($vanilla_identifier);\n\n $finalData = array_fill_keys($vanilla_identifier, 0);\n $misses = [];\n $cacheKey = 'embed.comments.count.%s';\n $originalIDs = [];\n foreach ($vanilla_identifier as $foreignID) {\n $hashedForeignID = foreignIDHash($foreignID);\n\n // Keep record of non-hashed identifiers for the reply\n $originalIDs[$hashedForeignID] = $foreignID;\n\n $realCacheKey = sprintf($cacheKey, $hashedForeignID);\n $comments = Gdn::cache()->get($realCacheKey);\n if ($comments !== Gdn_Cache::CACHEOP_FAILURE) {\n $finalData[$foreignID] = $comments;\n } else {\n $misses[] = $hashedForeignID;\n }\n }\n\n if (sizeof($misses)) {\n $countData = Gdn::sql()\n ->select('ForeignID, CountComments')\n ->from('Discussion')\n ->where('Type', 'page')\n ->whereIn('ForeignID', $misses)\n ->get()->resultArray();\n\n foreach ($countData as $row) {\n // Get original identifier to send back\n $foreignID = $originalIDs[$row['ForeignID']];\n $finalData[$foreignID] = $row['CountComments'];\n\n // Cache using the hashed identifier\n $realCacheKey = sprintf($cacheKey, $row['ForeignID']);\n Gdn::cache()->store($realCacheKey, $row['CountComments'], [\n Gdn_Cache::FEATURE_EXPIRY => 60\n ]);\n }\n }\n\n $this->setData('CountData', $finalData);\n $this->DeliveryMethod = DELIVERY_METHOD_JSON;\n $this->DeliveryType = DELIVERY_TYPE_DATA;\n $this->render();\n }", "public function getTotalRepliesByPostID($pid) {\n $totalNum = 0;\n\n $wr = new SnWallreplies();\n $totalNum = (object)Doo::db()->fetchRow( 'SELECT COUNT(1) as cnt FROM `'.$wr->_table.'` as wr\n WHERE wr.ID_WALLITEM = ?\n LIMIT 1', array($pid));\n\n return $totalNum->cnt;\n }", "function count_topic_comments($id) {\n global $db;\n $total_comments = $db->count(tbl('comments'), \"comment_id\", \"type='t' AND type_id='$id'\");\n return $total_comments;\n }", "public function count(): int\n {\n return count($this->_responses);\n }", "public function countNotesById($id){\n return $this->createQueryBuilder('c')\n ->select('count(c.id)')\n ->where('c.menu = :id')\n ->setParameter('id', $id)\n ->getQuery()\n ->getSingleScalarResult();\n }", "public static function getAudiosCount($user_id)\n {\n $query = db()->prepare(\n \"SELECT\n COUNT(*)\n FROM audios\n WHERE reply_to IS NULL\n AND status = '1'\n AND user_id = :user_id\"\n );\n $query->bindValue('user_id', $user_id);\n $query->execute();\n $count = (int) $query->fetchColumn();\n return $count;\n }", "public static function countCate($id) {\n\n $taxonomy = \"audio_category\"; // can be category, post_tag, or custom taxonomy name\n \n if( is_numeric($id) ) {\n // Using Term ID\n $term = get_term_by('id', $id, $taxonomy);\n } else {\n // Using Term Slug\n $term = get_term_by('slug', $id, $taxonomy);\n }\n // Fetch the count\n return $term->count;\n\n }", "protected function ask_get_nb_answers($id)\n\t{\n\t\t$sql = \"SELECT COUNT(*) AS nb_ans\n\t\t\t\tFROM \".$this->table_ask.\"\n\t\t\t\tWHERE id_quest = ?\n\t\t\t\tGROUP BY id_quest\";\n\t\t$data = array($id);\n\t\t$query = $this->db->query($sql, $data);\n\t\tif( $query->row() != NULL )\n\t\t\treturn $query->row()->nb_ans;\n\t\telse\n\t\t\treturn 0;\n\t}", "function getNumSpeakerComments(){\n\t\treturn $this->db->count_all($this->tableName);\n\t}", "public function receivedCount();", "public function count() {\n // response without using iterator_count (which actually consumes \n // our iterator to calculate the size, and we cannot perform a rewind)\n return $this->_replySize;\n }", "public function show($id)\n {\n\n $replies = Comment::where('parent_id', $id)->get();\n\n foreach ($replies as $reply) {\n $reply->count = $reply->getRatingCount();\n\n }\n return response()->json([\"data\" => $replies]);\n }", "function getAnswerCount()\n\t{\n\t\treturn count($this->answers);\n\t}", "public function getAnswerQuestionsNumberAction($id)\n {\n $request = $this->getRequest();\n $em = $this->getDoctrine()->getManager();\n\n if ($request->isXmlHttpRequest()) {\n $closeDialog = false;\n $answerRepository = $em->getRepository('TeclliureQuestionBundle:Answer');\n\n $entity = $answerRepository->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Answer entity.');\n }\n\n return new Response(json_encode(count($entity->getDisabledQuestions())));\n }\n else {\n return $this->render(':msg:error.html.twig', array(\n 'msg' => 'Error: Not ajax call'\n ));\n }\n }", "public function getReplyPost();", "function update_comments_count($id) {\n global $db;\n $total_comments = $this->count_topic_comments($id);\n if (!userid())\n $userid = 0;\n else\n $userid = userid();\n\n $db->update(tbl($this->gp_topic_tbl), array(\"total_replies\", \"last_poster\", \"last_post_time\"), array($total_comments, $userid, now()), \" topic_id='$id'\");\n }", "function count_playlist_items($id)\r\n\t{\r\n\t\tglobal $db;\r\n\t\treturn $db->count(tbl($this->playlist_items_tbl),\"playlist_item_id\",\"playlist_id='$id'\");\r\n\t}", "public function getCommentCount();", "public function get_reply_comments($id) {\n $this->db->query(\"SELECT * FROM replies, users WHERE comment_id = :id and replies.user_id = users.id\");\n $this->db->bind(':id', $id);\n $row = $this->db->resultSet();\n if ( $this->db->rowCount() > 0) {\n return $row;\n } else {\n return 'false';\n }\n }" ]
[ "0.6734552", "0.6478069", "0.62196565", "0.6182938", "0.61343837", "0.61330754", "0.6074031", "0.6028171", "0.59325206", "0.591335", "0.5906567", "0.5856853", "0.58226687", "0.58001465", "0.5738689", "0.57301414", "0.57224286", "0.5710537", "0.56864846", "0.5652078", "0.5647122", "0.56123185", "0.5586078", "0.5569396", "0.5556474", "0.5553242", "0.5551891", "0.5539256", "0.550412", "0.54943174" ]
0.8117453
0
Returns an array with the last 10 replies of $audio_id
public static function getReplies($audio_id, $page = 1) { $count = self::getRepliesCount($audio_id); // default result $result = array( 'audios' => array(), 'load_more' => false, 'page' => $page, 'total' => $count ); if (0 === $count) { return $result; } $total_pages = ceil($count / self::$per_page); if ($page > $total_pages) { return $result; } $columns = self::$columns; $columns = implode(',', $columns); $query = db()->prepare( "SELECT {$columns} FROM audios WHERE reply_to = :reply_to AND status = '1' ORDER BY date_added DESC LIMIT :skip, :max" ); $query->bindValue('reply_to', $audio_id); $query->bindValue( 'skip', ($page - 1) * self::$per_page, PDO::PARAM_INT ); $query->bindValue('max', self::$per_page, PDO::PARAM_INT); $query->execute(); while ($audio = $query->fetch(PDO::FETCH_ASSOC)) { $result['audios'][] = self::complete($audio); } $result['load_more'] = ($page < $total_pages); $result['page'] = $page + 1; $result['total'] = $count; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRecentReplies($id, $number=10 ){\n return Reply::where('user_id',$id)->orderBy('created_at','desc')\n ->whereHas('topic.category',function($q){\n $q->where('is_blocked','no');\n })->take($number)->get();\n }", "public function getAllReplies($id,$number=10)\n {\n return Reply::where('user_id',$id)\n ->whereHas('topic.category',function($q){\n $q->where('is_blocked','no');\n })->paginate($number);\n }", "public function getReplies($id)\n {\n $replies = Msgs::where('original', $id);\n return $replies;\n }", "public static function getRecentAudios()\n {\n $current_user = Users::getCurrentUser();\n $columns = implode(',', self::$columns);\n $query = db()->prepare(\n \"SELECT\n {$columns}\n FROM audios\n WHERE reply_to IS NULL\n AND status = '1'\n AND user_id = :user_id\n ORDER BY date_added DESC\n LIMIT 3\"\n );\n $query->bindValue('user_id', $current_user->id, PDO::PARAM_INT);\n $query->execute();\n $result = array();\n foreach ($query->fetchAll() as $array) {\n $result[] = self::complete($array);\n }\n return $result;\n }", "public static function getRepliesCount($audio_id)\n {\n $query = db()->prepare(\n \"SELECT\n COUNT(*)\n FROM audios\n WHERE status = '1'\n AND reply_to = :reply_to\"\n );\n $query->bindValue('reply_to', $audio_id);\n $query->execute();\n $count = (int) $query->fetchColumn();\n return $count;\n }", "public function getReplys()\n {\n\t $q = Doctrine_Query::create()\n ->from('SpeakoutReply sr')\n ->leftJoin('sr.NetworkUser nu')\n ->where('sr.topic_id = ?', $this->getId()); \n\t\n return Doctrine_Core::getTable('NetworkUser')->getWithUsers($q);\n }", "function thereply() {\n\tglobal $replies_index, $reply, $replies;\n\n\t$reply = $replies[$replies_index - 1];\n\treturn $reply;\n}", "function get_all_replies() {\n global $db;\n $query = \"SELECT * FROM replies\";\n $statement = $db->prepare($query);\n $statement->execute();\n $replies = $statement->fetchAll();\n $statement->closeCursor();\n return $replies; \n }", "public static function replies ( $since_id, $count_replies = false ) {\n\n\t\t$params = array (\n\t\t\t'include_entities' => true,\n\t\t\t'since_id' => $since_id,\n\t\t\t'count' => 100\n\t\t);\n\n\t\t// we need to minimise the payload since we only want a number\n\t\tif ( $count_replies === true ) $params['include_entities'] = false;\n\n\t\tstatic::api()->request('GET', static::api()->url('1.1/statuses/mentions_timeline'), $params);\n\n\t\t$response = static::api()->response['response'];\n\t\t$code = static::api()->response['code'];\n\n\t\tif ($code === 200) {\n\t\t\t$mentions = json_decode($response, false, 512, JSON_BIGINT_AS_STRING);\n\n\t\t\t// We have all replies since the tweet ID we've specified, but\n\t\t\t// here is where twe pick out only the ones that are specifically\n\t\t\t// replies to our ID\n\t\t\t$replies = array_filter($mentions, function ($mention) use ( $since_id ) {\n\t\t\t\tif ($mention->in_reply_to_status_id_str == $since_id) return $mention;\n\t\t\t});\n\n\t\t\tif ( $count_replies === true ) return count($replies);\n\n\t\t\treturn (object) $replies;\n\t\t}\n\n\t\treturn false;\n\n\t}", "public function reply($id)\n {\n $topic = Topic::with(\"photos\")->with(\"author\")->where('relate_id',$id)->paginate(4);\n// $topic = Topic::where('relate_id',$id)->paginate(4);\n if ($topic) {\n return $this->apiPagedSuccess($topic);\n } else {\n return $this->apiError(\"未找到对应的婚庆wish数据\",\"1001\");\n }\n\n }", "protected function getReplies()\n {\n // Localise stuff\n $con = $this->con;\n $reviewId = $this->id;\n $accId = $this->parent;\n $replies = array();\n $type = Reply::TYPE;\n // Get the replies\n $stmt = $con->prepare(\"SELECT post_id FROM rposts WHERE post_parent_id = '$reviewId' AND post_type = \" . $type);\n try\n {\n if(!$stmt->execute())\n {\n throw new Exception(\"Error getting replies from database\", 1);\n }\n\n // Go through every reply\n $stmt->bindColumn(1, $replyId);\n while($reply = $stmt->fetch())\n {\n // Prepare the params\n $params['id'] = $replyId;\n // Make new replies having the ids\n $reply = new Reply($con, 'get', $params);\n // Skip if we have any error with a reply\n if($reply->getError())\n {\n $this->errorMsg .= \"Error with reply $replyId: \" . $reply->getError();\n continue;\n }\n array_push($replies, json_decode($reply->toJson(), 1));\n }\n\n // Close and Return the replies\n return $replies;\n }\n catch (Exception $e)\n {\n $this->errorMsg = \"Error with review $reviewId: \" . $e->getMessage();\n }\n }", "public function getReply($id) {\n $id = (int)$id;\n if($id) {\n $wr = Doo::db()->find('SnWallreplies', array('limit'=>1, 'desc' => 'ReplyNumber', 'where' => 'ID_WALLITEM = '.$id));\n return $wr;\n }\n return new SnWallitems();\n }", "public function getPreviousAnswers($answerID, $limit, $truncateSize) {\n if(!Framework::isValidID($answerID)){\n return $this->getResponseObject(null, null, \"Answer ID provided was not numeric.\");\n }\n\n $response = $this->getResponseObject(null);\n\n if (!$this->CI->session->canSetSessionCookies()) {\n //If cookies are disabled, we don't have any information so bail out\n return $response;\n }\n\n if(!($sessionUrlParams = $this->CI->session->getSessionData('urlParameters'))) {\n return $response;\n }\n\n foreach($sessionUrlParams as $param) {\n if(is_array($param) && key($param) === 'a_id') {\n $answerIDs[] = $param['a_id'];\n }\n }\n\n if (!$answerIDs) {\n return $response;\n }\n else {\n // Either string (single value) or array (multiple values)\n $answerIDs = is_array($answerIDs)\n ? array_filter($answerIDs, 'is_numeric')\n : array($answerIDs);\n }\n //we want to display latest view first, and don't need duplicates\n $answerIDs = array_unique(array_reverse($answerIDs));\n //Filter out this answer id\n $answerIDs = array_diff($answerIDs, array($answerID));\n if(count($answerIDs) === 0){\n return $response;\n }\n\n //restrict to the first n values as specified by limit (also happens to reindex array by default)\n $answers = ($limit === 0) ? $answerIDs : array_slice($answerIDs, 0, $limit);\n\n // Create the AccessLevels query for ROQL to pull the correct answers based on the contacts answer access levels.\n $visQuery = Api::contact_answer_access();\n if($visQuery)\n $whereClause .= \" AND A.AccessLevels.NamedIDList.ID IN ($visQuery)\";\n\n try{\n $queryResult = Connect\\ROQL::query('SELECT A.ID, A.Summary FROM Answer A WHERE A.ID IN (' . implode(',', $answers) . ') ' . $whereClause . ' AND A.StatusWithType.StatusType.ID = ' . STATUS_TYPE_PUBLIC)->next();\n }\n catch(Connect\\ConnectAPIErrorBase $e){\n $response->error = $e->getMessage();\n return $response;\n }\n\n $previousAnswers = array();\n while($row = $queryResult->next()){\n if($truncateSize){\n $row['Summary'] = Text::truncateText($row['Summary'], $truncateSize);\n }\n $row = $this->expandAnswerFields($row);\n //We need to keep the answers in reverse order they were seen in (i.e. most recent first), so key them here and sort once we're done\n $previousAnswers[array_search($row['ID'], $answers)] = array($row['ID'], $row['Summary']);\n }\n\n if (count($previousAnswers) === 0) {\n return $response;\n }\n\n ksort($previousAnswers);\n\n return $this->getResponseObject(array_values($previousAnswers), 'is_array');\n }", "public function getRepliesList($id, $limit = 0) {\n $id = (int)$id;\n\t\t$order = 'asc';\n if ($limit == 0) {\n $limit = 99999;\n } else {\n\t\t\t$order = 'desc';\n\t\t}\n if($id) {\n $SnWallreplies = Doo::db()->relate('SnWallreplies', 'Players', array(\n 'limit' => '0,'.$limit,\n $order =>'ReplyNumber',\n 'where' => 'ID_WALLITEM = ? AND OwnerType = ?',\n 'param' => array($id, WALL_OWNER_PLAYER),\n 'match' => true\n ));\n\n return $SnWallreplies;\n }\n\n return array();\n }", "public static function listAudioRel($id,$from,$limit = null,$sort = null) {\n \n // Switch $id to ID from slug\n if( !is_numeric($id) ) {\n // get slug from id\n $post = get_page_by_path($id, OBJECT, 'audio');\n $id = $post->ID;\n };\n\n\n if ($from > 0) {$from = $from - 1;} else if ($from <= 0) {$from = 0;};\n\n //Divide amount to get from three sources\n if ($limit == null || $limit > 30) { \n $limit = 30;\n $search_num = 10;\n } else {\n $search_num = (int) ($limit/3) + ($limit%3);\n }\n\n $other_num = ($limit - $search_num)/2;\n\n $offset = $limit*$from;\n\n //Get audio from keyword\n $keyword_value = get_post_meta( $id, '_yoast_wpseo_focuskw', true );\n // check if the custom field has a value\n if( ! empty( $keyword_value ) ) {\n $search_res = self::search(no_mark($keyword_value)); \n $res = array_splice($search_res, ($offset+1), $search_num);\n } else {\n $other_num = (int)($limit /2);\n }\n\n //Get audio random from category\n $cat = wp_get_post_terms($id,'audio_category');\n $idcat = $cat[0]->term_id;\n $random_CateAudio = self::listAudioCate($idcat,$offset,$other_num);\n $res = array_merge($res,$random_CateAudio);\n\n //Get audio random from audio\n $randomAudio = self::listAudio($offset,$other_num,'view');\n $res = array_merge($res,$randomAudio);\n\n //Search for the same post\n $same_post_key = array_search($id, array_column($res, 'id'));\n\n //Remove same post \n unset($res[$same_post_key]);\n //Reset array\n array_values($res);\n\n // Replace another post to fill out array \n if (count($res) < $limit) {\n $missing = $limit - count($res);\n //Get replace post(s).\n $re_post = self::listAudio(0,$missing,'new');\n $res = array_merge($res,$re_post);\n }\n\n\n if(count($res) > 0) {\n foreach($res as $p) {\n $p['thumbnail'] = wp_get_attachment_image_src( get_post_thumbnail_id( $p['id'] ), 'thumbnail' )[0];\n\t\t\t\t$p['view'] = get_post_meta( $p['id'], '_count-views_all', true );\n $p['like'] = get_post_meta( $p['id'], 'oneway_like', true );\n\t\t\t\t// Audio Duration\n\t\t\t\t$duration = get_post_meta( $p['id'], 'oneway_audioduration', true );\t\t\t\t\n\t\t\t\t$p['duration'] = ( is_numeric( $duration) && $duration != '' ) ? intval($duration): 0;\n\t\t\t\t\n $output[] = $p;\n }\n\n return $output;\n } else {\n return [];\n }\n\n }", "public function getOlderMessages(){\n\n\t\tuser_login_required();\n\n\t\t//Get the ID of the conversation to refresh\n\t\t$conversationID = $this->getSafePostConversationID(\"conversationID\");\n\n\t\t//Get the ID of the oldest message ID\n\t\t$maxID = postInt(\"oldest_message_id\") - 1;\n\n\t\t//Get the limit\n\t\t$limit = postInt(\"limit\");\n\n\t\t//Security\n\t\tif($limit < 1)\n\t\t\t$limit = 1;\n\t\tif($limit > 30)\n\t\t\t$limit = 30;\n\t\t\n\t\t//Retrieve the list of messages in the database\n\t\t$messages = components()->conversations->getOlderMessages($conversationID, $maxID, $limit);\n\n\t\t//Process the list of messages\n\t\tforeach($messages as $num => $process)\n\t\t\t$messages[$num] = self::ConvMessageToAPI($process);\n\t\t\n\t\treturn $messages;\n\t}", "public static function listAudioTag($id = null) {\n \n if( $id === null ) {\n return [];\n }\n \n $fields = [\n 'id' => 'ID',\n 'title' => 'post_title',\n 'date' => 'post_date',\n 'thumbnail' => ''\n ];\n \n \n if( is_numeric($id) ) {\n // Using Term ID\n $raw = new WP_Query([\n 'post_status' => 'publish',\n 'post_type' => 'audio',\n 'tax_query' => [\n [\n 'taxonomy' => 'audio_tag',\n 'field' => 'term_id',\n 'terms' => $id,\n ]\n ],\n 'orderby' => 'rand',\n 'posts_per_page' => LIMIT \n ]);\n } else {\n // Using Term Slug\n $raw = new WP_Query([\n 'post_status' => 'publish',\n 'post_type' => 'audio',\n 'tax_query' => [\n [\n 'taxonomy' => 'audio_tag',\n 'field' => 'slug',\n 'terms' => $id,\n ]\n ],\n 'orderby' => 'rand',\n 'posts_per_page' => LIMIT \n ]);\n }\n \n $pre = sanitize($raw->posts, $fields);\n \n if(count($pre) > 0) {\n foreach($pre as $p) {\n $p['thumbnail'] = wp_get_attachment_image_src( get_post_thumbnail_id( $p['id'] ), 'thumbnail' )[0];\n\t\t\t\t\n\t\t\t\t// Audio Duration\n\t\t\t\t$duration = get_post_meta( $p['id'], 'oneway_audioduration', true );\t\t\t\t\n\t\t\t\t$p['duration'] = ( is_numeric( $duration) && $duration != '' ) ? intval($duration): 0;\n\t\t\t\t\n $output[] = $p;\n }\n\n return $output;\n } else {\n return [];\n }\n\n }", "function getReplies(object $pdo, int $commentId)\n{\n $commentId = trim(filter_var($commentId, FILTER_SANITIZE_NUMBER_INT));\n $statement = $pdo->prepare('SELECT * FROM replys WHERE comment_id = :comment_id');\n $statement->bindParam(':comment_id', $commentId, PDO::PARAM_INT);\n $statement->execute();\n\n $replies = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n return $replies;\n}", "public function getReplyPost();", "function pmess_get_all_received_comments($receiver_id, $sort_date, $next_page){\n\t\n\tglobal $wpdb;\n\t$query_all = \"SELECT * FROM {$wpdb->prefix}private_messages WHERE receiver_id = $receiver_id AND message_parent = 0\";\n\t$wpdb->get_results( $query_all, ARRAY_A );\n\t\n\tif( ! isset($next_page))\n\t\t$next_p = 0;\n\telse\n\t\t$next_p = $next_page;\n\t\n\t// echo '<br>next_p = ' . $next_p . '<br>';\n\t\n\t$number_rows = $wpdb->num_rows;\n\t$num_pages = ceil($number_rows / 10);\n\t\n\tif($next_page > $num_pages)\n\t\treturn FALSE;\n\t\n\t// echo 'sort_date = ' . $sort_date;\n\t\n\tswitch($sort_date){\n\t\tcase 'ASC': \n\t\t$sort = 'ORDER BY date_created ASC';\n\t\tbreak;\n\t\t\n\t\tcase 'DESC': \n\t\t$sort = 'ORDER BY date_created DESC';\n\t\tbreak;\n\t\t\n\t\tcase 'not_read': \n\t\t$sort = \"ORDER BY FIELD(comment_status, 'not_read', 'read')\";\n\t\tbreak;\n\t\t\n\t\tcase 'read': \n\t\t$sort = \"ORDER BY FIELD(comment_status, 'read', 'not_read')\";\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t$sort = 'ORDER BY date_created DESC';\n\t}\t\t\t\t\n\t\n\t// echo '<br>sort: ' . $sort;\n\t\t\n\t$query = \"SELECT * FROM {$wpdb->prefix}private_messages WHERE receiver_id = $receiver_id $sort LIMIT 10 OFFSET $next_p\";\n\t$result = $wpdb->get_results( $query, ARRAY_A );\n\t\n\treturn $result;\n}", "function createQuickReplies ($title, $arr) {\n $i = 0;\n $qrs = array ();\n foreach ($arr as $key => $value) {\n $i = $i + 1;\n if ($i > 10) {\n break;\n }\n array_push($qrs, array (\n \"content_type\" => \"text\",\n \"title\" => (strlen($key) > 19) ? substr($key,0,16).'...' : $key,\n \"payload\" => $value\n ));\n }\n\n $bot_resp = array ();\n $bot_resp['text'] = $title;\n $bot_resp['quick_replies'] = $qrs;\n return $bot_resp;\n }", "public function replies()\n {\n return $this->hasMany(Reply::class, 'conversation_id');\n }", "function get_blog_reply($website_id, $blog_id, $parent_id)\n \t{\n\t\t$this->db->select('*'); \n \t$this->db->where(array('website_id' => $website_id, 'blog_id' => $blog_id, 'parent_id' => $parent_id, 'status' => 1, 'is_deleted' => 0)); \n\t\t$this->db->order_by('sort_order', 'DESC'); \n \t$query = $this->db->get('blog_rating');\n \t$records = array();\n\n \tif ($query->num_rows() > 0) :\n \t\tforeach ($query->result() as $row) :\n \t\t$records[] = $row;\n \t\tendforeach;\n \tendif;\n\n \treturn $records;\n \t}", "protected function getItem($id)\n {\n $reply = new Reply();\n $reply->setDb($this->di->get(\"db\"));\n $replies = [\"-1\" => \"Choose an object\"];\n $obj = $reply->find(\"id\", $id);\n $replies[$obj->id] = \"{$obj->email} ({$obj->id})\";\n\n return $replies;\n }", "public function get_referral_chats($referral_id){\n\t\tglobal $con;\n\t\t$query=\"SELECT * FROM referral_chat\n\t\t\t\tWHERE referral_id=\\\"$referral_id\\\"\n\t\t\t\tORDER BY message_id DESC\n\t\t\t\tLIMIT 20\";\n\t\t$result=array();\n\t\t$result=$this->select($con,$query);\n\n\t\treturn $result;\n\t}", "public function replies()\n {\n return $this->hasMany('App\\CommentReply', 'comment_id')->orderBy('created_at');\n }", "public function replies()\n {\n return $this->hasMany('Reflex\\Forum\\Entities\\Replies\\Reply')->latest();\n }", "public static function listAudioCate($id,$from,$limit = null, $sort=null) {\n \n $fields = [\n 'id' => 'ID',\n 'title' => 'post_title',\n 'date' => 'post_date',\n 'thumbnail' => '',\n\t\t\t'permalink' => ''\n ];\n\n if ($from > 0) {$from = $from - 1;} else if ($from <= 0) {$from = 0;};\n if ($limit == null) { $limit = 30; };\n if ($sort == null) { $sort = 'new';};\n\n $offset = intval($from)*intval($limit);\n\n $arg = [\n 'post_status' => 'publish',\n 'post_type' => 'audio',\n 'offset' => $offset,\n 'posts_per_page' => $limit, \n ];\n\n \n\n if ($sort == 'view') {\n $arg['orderby'] = 'meta_value_num';\n $arg['meta_key'] = '_count-views_all';\n $arg['order'] = 'DESC';\n \n } else {\n $arg['orderby'] = ['date' => 'DESC'];\n \n }\n\n if( is_numeric($id) ) {\n // By ID\n $arg['tax_query'] = [\n [\n 'taxonomy' => 'audio_category',\n 'field' => 'term_id',\n 'terms' => $id,\n ]\n ];\n } else {\n // By Slug\n $arg['tax_query'] = [\n [\n 'taxonomy' => 'audio_category',\n 'field' => 'slug',\n 'terms' => $id,\n ]\n ];\n }\n\n $raw = new WP_Query($arg);\n\n $pre = sanitize($raw->posts, $fields);\n\n if(count($pre) > 0) {\n foreach($pre as $p) {\n $p['thumbnail'] = wp_get_attachment_image_src( get_post_thumbnail_id( $p['id'] ), 'thumbnail' )[0];\n\t\t\t\t$p['permalink'] = get_permalink($p['id']);\n\t\t\t\t\n\t\t\t\t// Audio Duration\n\t\t\t\t$duration = get_post_meta( $p['id'], 'oneway_audioduration', true );\t\t\t\t\n\t\t\t\t$p['duration'] = ( is_numeric( $duration) && $duration != '' ) ? intval($duration): 0;\n\t\t\t\t\n $output[] = $p;\n }\n\n return $output;\n } else {\n return [];\n }\n\n }", "public function getLastReply()\n {\n }", "public function getAllRepliesById($postingUser, $ID) {\n $sqlQuery = \"select r.replyID, r.replyMessage, r.replyDate, r.replyFrom, r.replyTo, r.postID,\n p.title, p.message, u.firstName, u.lastName, u.photo\n from laf873.replies r\n inner join laf873.posts p on r.postID = p.ID\n inner join laf873.users u on u.userID = r.replyFrom\n where r.replyTo = '{$postingUser}'\n and p.ID = '{$ID}'\n order by r.replyDate asc\";\n\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute();\n\n $replies = [];\n while ($row = $statement->fetch()) {\n $replies[] = new ReplyDisplay($row);\n }\n return $replies;\n }" ]
[ "0.6306994", "0.60159594", "0.5876157", "0.5849225", "0.57261604", "0.56673294", "0.5547444", "0.55383193", "0.5500149", "0.54420614", "0.5438333", "0.5381488", "0.53342456", "0.52923995", "0.5285662", "0.5273473", "0.52718896", "0.5267431", "0.52459586", "0.5238401", "0.5224866", "0.5222493", "0.5218134", "0.5200965", "0.5199084", "0.5188287", "0.51625955", "0.51526296", "0.5140543", "0.5136741" ]
0.7228862
0
Get the count of favorites of the $audio_id
public static function getFavoritesCount($user_id) { $query = db()->prepare( "SELECT COUNT(*) FROM audios AS A INNER JOIN favorites AS F ON A.id = F.audio_id AND F.user_id = :user_id AND A.status = '1'" ); $query->bindValue('user_id', $user_id); $query->execute(); $count = (int) $query->fetchColumn(); return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function total_favorites()\r\n\t{\r\n\t\tglobal $db;\r\n\t\treturn $db->count(tbl($this->fav_tbl),\"favorite_id\",\" type='\".$this->type.\"'\");\r\n\t}", "public function getFavoritesCountAttribute()\n {\n return $this->favorites->count();\n }", "public function getFavoritesCountAttribute()\n {\n return $this->favorites->count();\n }", "public function getFavoriteCount() {\n\t\treturn count($this->favorite_users);\n\t}", "public static function getRepliesCount($audio_id)\n {\n $query = db()->prepare(\n \"SELECT\n COUNT(*)\n FROM audios\n WHERE status = '1'\n AND reply_to = :reply_to\"\n );\n $query->bindValue('reply_to', $audio_id);\n $query->execute();\n $count = (int) $query->fetchColumn();\n return $count;\n }", "public function favorited($userId=null)\n\t{\n\t\tif(is_null($userId)) {\n\t\t\t$userId = $this->loggedInUserId();\n\t\t}\n\n\t\treturn (bool) $this->favorites()\n\t\t\t->where('user_id', '=', $userId)\n\t\t\t->count();\n\t}", "public function favorited($userId=null)\n {\n if (is_null($userId)) {\n $userId = Auth()->id();\n }\n \n return (bool) $this->favorites()\n ->where('user_id', '=', $userId)\n ->count();\n }", "function count_playlist_items($id)\r\n\t{\r\n\t\tglobal $db;\r\n\t\treturn $db->count(tbl($this->playlist_items_tbl),\"playlist_item_id\",\"playlist_id='$id'\");\r\n\t}", "public function getFavoriteCountAttribute()\n {\n return $this->favoriteCounter ? $this->favoriteCounter->count : 0;\n }", "public function favorites() {\n\t\t$favoriteSounds = Sound::whereHas('favorite', function($query) {\n\t\t\t$user = Auth::user();\n\n\t\t\t$query->where('userId', '=', $user->id);\n\t\t});\n\n\t\treturn Responder::success([\n\t\t\t'favoriteSounds' => $favoriteSounds->get()\n\t\t]);\n\t}", "function count_wishlist() {\n $total_items = 0;\n if (is_array($this->wishID)) {\n reset($this->wishID);\n while (list($wishlist_id, ) = each($this->wishID)) {\n $total_items++;\n }\n }\n\n return $total_items;\n }", "public function getFavoriteCountAttribute()\n\t{\n\t\treturn $this->favoriteCounter ? $this->favoriteCounter->count : 0;\n\t}", "function getFavouriteCount($bossId, $bossNo = 0)\n {\n// if ($bossId == 0) return 0;\n $this->db->select(\"no\");\n $this->db->from(\"favourite\");\n if ($bossNo != 0)\n $this->db->where(\"boss_no\", $bossNo);\n else\n $this->db->where(\"boss_id\", $bossId);\n $query = $this->db->get();\n $result = $query->result();\n return count($result);\n }", "public function count_items() { \n\n\t\t$sql = \"SELECT COUNT(`id`) FROM `tmp_playlist_data` WHERE `tmp_playlist_data`.`tmp_playlist`='\" . $this->id . \"'\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\t$results = Dba::fetch_row($db_results); \n\n\t\treturn $results['0']; \n\n\t}", "private function incrementFavoriteCount()\n\t{\n\t\t$counter = $this->favoriteCounter()->first();\n\n\t\tif($counter) {\n\t\t\t$counter->count++;\n\t\t\t$counter->save();\n\t\t} else {\n\t\t\t$counter = new FavoriteCounter;\n\t\t\t$counter->count = 1;\n\t\t\t$this->favoriteCounter()->save($counter);\n\t\t}\n\t}", "public function get_song_count() { \n\n\t\t$sql = \"SELECT COUNT(`id`) FROM `playlist_data` WHERE `playlist`='\" . Dba::escape($this->id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_row($db_results);\n\n\t\treturn $results['0'];\n\n\t}", "function getArtistLikeCount($artist_id){\r\n\t$countads = \"SELECT count(article_id) as thenum FROM user_follow WHERE following=$artist_id\";\r\n\t$b1 = mysql_fetch_array(mysql_query($countads));\r\n\t$totaladcount = $b1[thenum];\r\n if (!$totaladcount) {$totaladcount = 0;}\r\n\treturn $totaladcount;\t\r\n}", "public function favoriteCounter()\n {\n return $this->morphOne(FavoriteCounter::class, 'favoriteable');\n }", "public function favoriteCounter()\n\t{\n\t\treturn $this->morphOne(FavoriteCounter::class, 'favoriteable');\n\t}", "function getMovieCount(){\n return $this->query(\"SELECT COUNT(id) as number FROM docs WHERE visible=1\");\n }", "private function incrementFavoriteCount()\n {\n $counter = $this->favoriteCounter()->first();\n\n if ($counter) {\n $counter->count++;\n $counter->save();\n } else {\n $counter = new FavoriteCounter;\n $counter->count = 1;\n $this->favoriteCounter()->save($counter);\n }\n }", "function favorites() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($id, $auth)) {\n $this->response('', 400);\n }\n if ($id > 0) {\n $query = \"select * from favorites where user_id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n } \n }", "public function up_favorite($product_id, $up = true) {\n $product_id = (int)$product_id;\n $up = (bool)$up;\n if ($product_id <= 0) return false;\n\n $res = $this->db->select('favorite_count')->from('site_catalog')->where('id', $product_id)->where('visible', 1)->limit(1)->get();\n if ($res->num_rows() <= 0) return false;\n $res = $res->row_array();\n\n $count = (int)$res['favorite_count'];\n if ($up && $count < PHP_INT_MAX - 10) {\n ++$count;\n } elseif ($count > 0) {\n --$count;\n }\n\n $this->db->set('favorite_count', $count)->where('id', $product_id)->update('site_catalog');\n\n return $count;\n }", "function fn_wishlist_get_count()\n{\n $wishlist = array();\n $result = 0;\n\n if (!empty(Tygh::$app['session']['wishlist'])) {\n $wishlist = & Tygh::$app['session']['wishlist'];\n $result = !empty($wishlist['products']) ? count($wishlist['products']) : 0;\n }\n\n /**\n * Changes wishlist items count\n *\n * @param array $wishlist wishlist data\n * @param int $result wishlist items count\n */\n fn_set_hook('wishlist_get_count_post', $wishlist, $result);\n\n return empty($result) ? -1 : $result;\n}", "public function isFavorited(){\n // return ! $this->favorites->where('user_id', auth()->id())->isEmpty();\n\n //so we do: \n //we are casting to boolean \"!!\"\n //if there is a reply, the user favorites the reply\n return !! $this->favorites->where('user_id', auth()->id())->count();\n }", "public function getFavorites();", "public function getSongCount()\n {\n return $this->wpdb->get_var(<<<SQL\nSELECT\n COUNT(`{$this->wpdb->timber_songs}`.`ID`)\nFROM `{$this->wpdb->timber_songs}`\nSQL\n );\n }", "function total_wished($product_id)\n {\n $num = 0;\n $users = $this->db->get('user')->result_array();\n foreach ($users as $row) {\n $wishlist = json_decode($row['wishlist']);\n if (is_array($wishlist)) {\n if (in_array($product_id, $wishlist)) {\n $num++;\n }\n }\n \n }\n return $num;\n }", "public function likesCount()\n\t{\n\t\treturn $this->ratings()->where('value', 1)->count();\n\t}", "function total_wished($product_id)\n {\n $num = 0;\n $users = $this->db->get('user')->result_array();\n foreach ($users as $row) {\n $wishlist = json_decode($row['wishlist']);\n if (is_array($wishlist)) {\n if (in_array($product_id, $wishlist)) {\n $num++;\n }\n }\n\n }\n return $num;\n }" ]
[ "0.7185652", "0.671975", "0.671975", "0.6601404", "0.63860273", "0.6323772", "0.6288845", "0.62252754", "0.612096", "0.6113667", "0.601822", "0.6016271", "0.5994217", "0.59604967", "0.59495807", "0.5947114", "0.59391356", "0.59052634", "0.5904304", "0.590403", "0.58794427", "0.5862559", "0.5813103", "0.57610863", "0.575995", "0.5705853", "0.56885755", "0.56590545", "0.5656656", "0.56010157" ]
0.7429231
0
Returns an array with the last 10 favorites of $user_id
public static function getFavorites($user_id, $page = 1) { $count = self::getFavoritesCount($user_id); $result = array( 'audios' => array(), 'load_more' => false, 'page' => $page, 'total' => $count ); if (0 == $count) { return $result; } $total_pages = ceil($count / 10); if ($page > $total_pages) { return $result; } $columns = self::$columns; $columns = array_map( function ($value) { return 'A.' . $value; }, $columns ); $columns = implode(',', $columns); $query = db()->prepare( "SELECT DISTINCT {$columns} FROM audios AS A INNER JOIN favorites AS F ON A.id = F.audio_id AND F.user_id = :user_id AND A.status = '1' ORDER BY F.date_added DESC LIMIT :skip, :max" ); $query->bindValue('user_id', $user_id); $query->bindValue( 'skip', ($page - 1) * self::$per_page, PDO::PARAM_INT ); $query->bindValue('max', self::$per_page, PDO::PARAM_INT); $query->execute(); while ($audio = $query->fetch(PDO::FETCH_ASSOC)) { $result['audios'][] = self::complete($audio); } $result['load_more'] = $page < $total_pages; $result['page'] = $page + 1; $result['total'] = $count; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllFavorites($user_id);", "function get_favorites($user_id){\n $ch = curl_init();\n $url = $GLOBALS['App-Logic'].\"?\" .http_build_query([\n 'get_favorites' => true, //a flag to execute the right code in App-Logic! \n 'user_id' => $user_id,\n ]);\n\n curl_setopt($ch,CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);\n \n $response = curl_exec($ch);\n curl_close($ch);\n\n return json_decode($response,true);\n\n }", "public function favorites($user, $options = []);", "function favorites() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($id, $auth)) {\n $this->response('', 400);\n }\n if ($id > 0) {\n $query = \"select * from favorites where user_id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n } \n }", "public function getUserRecentTracks ( $user, $limit = 50 ) {\n\t\tif ( $this->api_key ) {\t\n\t\t\t$url = \n\t\t\t\tself::API_ROOT . $this->urls['UserGetRecentTracks'] . \n\t\t\t\t\"&api_key=\" . $this->api_key .\n\t\t\t\t\"&user=\" . $user .\n\t\t\t\t\"&limit=\" . $limit;\n\t\t\t\t\n\t\t\treturn $this->getResults( $url );\n\t\t}\n\t}", "private function getByFavorite($user)\n {\n $q = $this\n ->getUserPublicationQueryBuilder($user)\n ->andWhere('p.isFavorite = 1')\n ->orderBy('p.publishedAt', 'desc')\n ->getQuery()\n ;\n\n return $q->getResult();\n }", "function favorites_getList ($user_id = NULL, $per_page = 25, $page = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.favorites.getList';\n\t\tif ($user_id) $params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\tif ($extras) $params['extras'] = $extras;\n $response = $this->execute($params, 10);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getFavoritesPublications($user)\n {\n return $this->getByFavorite($user);\n }", "public function get_user_fav_ids($username = '', $count = 10, $offset = 0) {\n\n\t\t$ids = array();\n\t\t\n\t\tif ($username == '') return $ids;\n\t\t\n\t\t$key = $this->_get_user_fav_key($username);\n\n \t// fix offset_score for sort desc\n \tif ($offset == 0) {\n \t\t$offset = '+inf';\n \t} else {\n \t\t$offset = '('.$offset;\n \t}\n \t//\n\n\t\t// get from redis\n\t\tif ($count == 'all') {\n\t\t\t$ids = Redis::zrevrangebyscore($key, '+inf', '-inf');\n\t\t} else {\n\t\t\t$ids = Redis::zrevrangebyscore($key, $offset, '-inf', array('limit'=> array(0,$count)));\n\t\t}\n\t\t\n\t\treturn $ids;\n\t }", "public function myfavorites_get()\n {\n $user = $this->getCurrentUser();\n $criteria = new \\Doctrine\\Common\\Collections\\Criteria();\n //AQUI TODAS LAS EXPRESIONES POR LAS QUE SE PUEDE BUSCAR CON TEXTO\n $expresion = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"favorite\", \\Doctrine\\Common\\Collections\\Expr\\Comparison::EQ, 1);\n $criteria->where($expresion);\n $criteria->orderBy(array(\"visited_at\"=>\"DESC\"));\n $relacion = $user->getUserservices()->matching($criteria)->toArray();\n $result[\"desc\"] = \"Listado de los servicios marcados como favoritos por el usuario\";\n $result[\"data\"] = array();\n foreach ($relacion as $servicerel) {\n $service_obj = $servicerel->getService();\n $service_obj->loadRelatedData($user, null, site_url());\n $result[\"test\"] = $service_obj->loadRelatedUserData($user);\n $result[\"data\"][] = $service_obj;\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n\n }", "public function getFavoritos(){\n\t\t$user_id = $_SESSION['activeUser']->getId();\n\t\tUtilidades::_log(\"getFavoritos($user_id)\");\n\t\t\n\t\t$query = \"SELECT book.*, book_lang.*\n\t\t\t\t\tFROM favourites,book, book_lang\n\t\t\t\t\tWHERE favourites.user_id = $user_id\n\t\t\t\t\t AND favourites.book_id = book.id\n\t\t\t\t\t AND favourites.book_id = book_lang.book_id\n\t\t\t\t\t and favourites.book_lang = book_lang.lang \";\n\t\t$query.= \" ORDER BY sold DESC, rating DESC\";\n\t\t\n\t\tUtilidades::_log(\"query: \".$query);\n\t\t$res = array();\n\t\t\n\t\tforeach(DB::ejecutarConsulta($query) as $row) {\n\t\t\t// Añadimos un objeto por cada elemento obtenido\n\t\t\t$res[] = new BookVO($row);\n\t\t}\n\t\treturn $res;\n\t}", "public function find_favorites() {\n\t\tstatic $favorites;\n\n\t\tif (!is_array($favorites)) {\n\t\t\t$favorites = array();\n\t\t\tif ($this->loaded()) {\n\t\t\t\t$users = db::build()->select('user_id')->from('favorites')->where('event_id', '=', $this->id)->execute()->as_array();\n\t\t\t\tforeach ($users as $user) {\n\t\t\t\t\t$favorites[(int)$user['user_id']] = (int)$user['user_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $favorites;\n\t}", "public function getFavoriteSongs($userId){\n return $this->DB->queryFetchAllAssoc(\"SELECT s.* FROM user u, song s, favorite_songs fs WHERE fs.user_id = u.id AND fs.song_id = s.id AND u.id = $userId\");\n }", "public function findPraiseTopTen(){\n $sql = \"SELECT p.`id`, u.`nickname`, p.`favorite`, p.`pic` FROM `photo` AS p, `user` AS u WHERE p.`uid` = u.`uid` ORDER BY p.`favorite` DESC, p.`created` LIMIT 0, 10\";\n $res = $this->connect()->query($sql);\n $list = $res->fetch_all($resulttype = MYSQLI_ASSOC);\n if($list) {\n return $list;\n }\n return FALSE;\n }", "public function my_favs(){\n $current_user=Auth::user();\n if(!$current_user){ return false; }\n\n $favorites=Favorites::where('user_id',$current_user->id)->orderBy('id', 'desc')->get();\n\n $return=[];\n foreach ($favorites as $key => $value) {\n $data = json_decode(app('App\\Http\\Controllers\\GiphyController')->single($value->gif_uid));\n $return[]=($data->data);\n }\n\n return $return;\n\n }", "public static function getFavoritesCount($user_id)\n {\n $query = db()->prepare(\n \"SELECT\n COUNT(*)\n FROM audios AS A\n INNER JOIN favorites AS F\n ON A.id = F.audio_id\n AND F.user_id = :user_id\n AND A.status = '1'\"\n );\n $query->bindValue('user_id', $user_id);\n $query->execute();\n $count = (int) $query->fetchColumn();\n return $count;\n }", "function getFavoritesWithIDs(){\n\n\t$id = getUserID();\n\t$query = \"SELECT unique_networks.unique_network_id, networks.area, networks.state, activities.activity_name FROM favorites, networks, activities, unique_networks WHERE user_id = \".$id.\"\"\n\t.\" AND favorites.unique_network_id = unique_networks.unique_network_id\"\n\t.\" AND unique_networks.activity_id = activities.activity_id\"\n\t.\" AND unique_networks.network_id = networks.network_id\";\n\t$result = mysql_query($query) or die(mysql_error());\n\t$favs = array();\n\twhile($row = mysql_fetch_array($result)){\n\t\t$favs[] = $row;\n\t}\n\treturn $favs;\n}", "function followingFav($userID, $postID){\n\n\t$result = getAllFollowingList($user_id);\n\t$i=0;\n\twhile($row = mysql_fetch_assoc($result))\n\t{\n\t\t$following[$i] = $row['profile_ID'];\n\t\t$i++;\n\t}\n\n\tif($i < 20 )\n\t{\n\t\tif($following)$following = \"('\".implode(\"', '\", $following).\"')\";\n\t\t$list = isFav($following, $postID);\n\t\treturn $list;\n\t}\n\n\tif($following && $i > 19)\n\t{\n\t\t$following = array_chunk($following, 20);\n\t\tfor($i=0;$i<count($following, 0);$i++)\n\t\t\t$following[$i] = \"('\".implode(\"', '\", $following[$i]).\"')\";\n\t\t$cnt = $i;\n\t}\n\t$arr =array();\n\t$list =array();\n\tfor($i=0;$i<$cnt;$i++){\n\t\tif(isFav($following[$i]))\n\t\t{\n\t\t\t$arr = isFav($following[$i], $postID);\n\t\t\t$list = array_merge( $list, $arr);\n\t\t}\n\t}\n\n\treturn $list;\n}", "public function favourites($id)\n\t{\n\t\tif (!isset($_SESSION['user']))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/session/new\");\n\t\t\texit;\n\t\t}\n\t\t// this page is only accessable by self and admin (type 2)\n\t\tif (($_SESSION['user']['type'] != 2) && ($_SESSION['user']['id'] != $id))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/{$_SESSION['user']['id']}\");\n\t\t\texit;\n\t\t}\n\t\n\t\tif(!$user = User::findUser(array('user_id' => $id)))\n\t\t{\n\t\t\t// something has gone wrong with db request\n\t\t\theader(\"Location: /myrecipe/users/\".$id);\n\t\t\texit;\n\t\t}\n\t\t$this->template->user = $user[0];\n\t\t\n\t\t// find all the favourites\n\t\t$data = array('favourites.user_id'=>$id, 'recipe_images.is_cover'=>'yes');\n\t\t$favourites = Favourites::findFavourites($data);\n\t\t$this->template->favourites = $favourites;\n/*\t\techo \"<pre>\";\n\t\tprint_r($favourites);\n\t\techo \"</pre>\";\n*/\n\t\t$this->template->display('favourites.html.php');\n\t}", "public function isFavOfUser($user)\n {\n if(!$user)\n return false;\n $favs = $this->favourites;\n $usersHavingFaved = array();\n\n foreach ($favs as $fav) {\n $usersHavingFaved[] = $fav->user_id;\n }\n return (in_array($user->id, $usersHavingFaved));\n }", "public function getFanartsOfUser($id){\n $sql = \"SELECT f.title, f.pathFile, f.pubDate, f.id FROM fanart f\n WHERE f.author=\".intval($id).\" ORDER BY f.pubDate DESC;\";\n $res = mysqli_query($this->link, $sql);\n $fanarts = mysqli_fetch_all($res);\n return $fanarts;\n }", "protected function favorited($username)\n {\n $user = User::whereUsername($username)->first();\n\n $presentIds = $user ? $user->favorites()->pluck('id')->toArray() : [];\n\n return $this->builder->whereIn('id', $presentIds);\n }", "public function getAllUserpreferences()\n {\n $dbHandler = Lib\\DbHandler::getDbHandler();\n $restaurantID = array();\n $userlist = $dbHandler->getUsers();\n $numberOfUsers = count($userlist);\n foreach ($userlist as $user) {\n $restaurants = $user->getPreferedRestaurantIds();\n\n foreach ($restaurants as $restaurant) {\n $restaurantID[] .= $restaurant[ID];\n\n }\n\n }\n $this->getMostlikedRestaurants($restaurantID);\n }", "public function getFavorites();", "function get_product_favourite( $conds = array(), $limit = false, $offset = false )\n\t{\n\t\t$this->db->select('rt_products.*'); \n\t\t$this->db->from('rt_products');\n\t\t$this->db->join('rt_favourites', 'rt_favourites.product_id = rt_products.id');\n\n\t\tif(isset($conds['user_id'])) {\n\n\t\t\tif ($conds['user_id'] != \"\" || $conds['user_id'] != 0) {\n\t\t\t\t\t\n\t\t\t\t\t$this->db->where( 'user_id', $conds['user_id'] );\t\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( $limit ) {\n\t\t// if there is limit, set the limit\n\t\t\t\n\t\t\t$this->db->limit($limit);\n\t\t}\n\t\t\n\t\tif ( $offset ) {\n\t\t// if there is offset, set the offset,\n\t\t\t$this->db->offset($offset);\n\t\t}\n\t\t\n\t\treturn $this->db->get();\n \t}", "function getItems($user_id)\n {\n $this->db->select(\"*\");\n $this->db->from('favourite_goods');\n $this->db->where('user_id', $user_id);\n $query = $this->db->get();\n return $query->result();\n }", "public function favourites(){\n return $this->hasMany('App\\Favourite', 'user_id');\n }", "function getFavoriteIDs(){\n\t$id = getUserID();\n\t$query = \"SELECT unique_network_id FROM favorites WHERE user_id = $id\";\n\t$result = mysql_query($query) or die(mysql_error());\n\t$favIDs = array();\n\twhile($row = mysql_fetch_array($result)){\n\t\t$favIDs[] = $row[0];// this is unique_network_id\n\t}\n\treturn $favIDs;\n}", "public static function loop_my_favorites() {\n $paged = ( get_query_var('paged')) ? get_query_var('paged') : 1;\n $favorites = get_user_meta( get_current_user_id(), 'favorites', true );\n if( ! is_array( $favorites ) || count( $favorites ) == 0 ) {\n $favorites = array( '', );\n }\n\n query_posts( array(\n 'post_type' => 'property',\n 'paged' => $paged,\n 'post__in'\t\t=> $favorites,\n 'post_status' => 'publish',\n ) );\n }", "public function get_top_strings($user_id)\n {\n $sql = \"SELECT ufav.id,\n ufav.user_id,\n ufav.topic_id,\n ufav.created_at,\n t.color,\n t.coverphoto,\n t.string_alias,\n t.slug\n FROM userfavoritestrings ufav\n INNER JOIN topic t ON t.id = ufav.topic_id\n WHERE t.deleted_at IS NULL AND ufav.user_id={$user_id}\n ORDER BY ufav.created_at DESC\n LIMIT 3\";\n \n return collect($this->_helper->convert_sql_to_array( DB::select(DB::raw($sql)) )); \n }" ]
[ "0.7652619", "0.68314135", "0.6743355", "0.662164", "0.65979654", "0.6571624", "0.6554089", "0.645185", "0.6444338", "0.63392836", "0.63107365", "0.6307082", "0.6277917", "0.6248008", "0.62316215", "0.6198474", "0.6125882", "0.6121173", "0.6106445", "0.6096151", "0.60165745", "0.5984416", "0.5955175", "0.59236246", "0.59214556", "0.5914451", "0.59003943", "0.5884681", "0.5858652", "0.5839216" ]
0.7302038
1
Inserts an audio|reply in the database
public static function insert(array $options) { if (empty($options['audio_url']) && empty($options['reply_to'])) { // come on! need one of both throw new \ProgrammerException( 'Missing option audios_url || reply' ); } $is_reply = ! empty($options['reply_to']) && empty($options['audio']); if (! $is_reply) { // required keys for audios $required_options = array( 'description', 'duration', 'is_voice', 'send_to_twitter', 'audio_url', ); } else { $required_options = array( 'reply', 'send_to_twitter', 'reply_to', 'twitter_id', 'user_id' ); } if (0 !== count( array_diff($required_options, array_keys($options)) ) ) { // ups throw new \ProgrammerException('Missing required options'); } $audio_id = generate_id('audio'); $current_user = Users::getCurrentUser(); $query = db()->prepare( 'INSERT INTO audios SET id = :id, user_id = :user_id, audio_url = :audio_url, reply_to = :reply_to, description = :description, date_added = :date_added, duration = :duration, is_voice = :is_voice' ); $query->bindValue('id', $audio_id); $query->bindValue('user_id', $current_user->id, PDO::PARAM_INT); $query->bindValue('date_added', time(), PDO::PARAM_INT); if (! $is_reply) { // it's an audio, so, set the audio URL: $query->bindValue('audio_url', $options['audio_url']); // reply_to must be NULL cause it's not a reply: $query->bindValue('reply_to', null, PDO::PARAM_NULL); // it's an audio, insert the description: $query->bindValue('description', $options['description']); // it's an audio, so it has a duration $query->bindValue( 'duration', $options['duration'], PDO::PARAM_INT ); // it's an audio, so it can be recorded $query->bindValue('is_voice', $options['is_voice']); } else { // it's a reply, so there's no player: $query->bindValue('audio_url', null, PDO::PARAM_NULL); // and it's replying to other audio: $query->bindValue('reply_to', $options['reply_to']); // it's a reply, use the reply key: $query->bindValue('description', $options['reply']); // it's a reply, it does not have a duration $query->bindValue('duration', 0, PDO::PARAM_INT); // it's a reply, it does not have player $query->bindValue('is_voice', '0'); } $query->execute(); $audio = self::get($audio_id); // now proceed to tweet if (! $options['send_to_twitter']) { // we got nothing else to do return $audio; } if (! $is_reply) { /** * Make the tweet for audios. * I'll explain this nightmare. **/ // here's the link, forget about www here $link = 'https://twitaudio.com/'. $audio_id; $link_length = strlen($link); $description = $options['description']; if (mb_strlen($description, 'utf-8') > (140-$link_length)) { // if the description is longer than (140 - the link length) // then make it shorter $description = substr( $description, 0, 140-$link_length-4 // 4= the 3 periods below + space ); $description .= '...'; } // we're done :) $tweet = $description . ' ' . $link; } else { /** * Make the tweet for replies * This nightmare is bigger than * the one above. **/ // we got the final part $link = ' - https://twitaudio.com/'. $audio_id; $link_length = strlen($link); $query = db()->prepare( 'SELECT username FROM users WHERE id = :id' ); $query->bindValue('id', $options['user_id']); $query->execute(); $username = $query->fetchColumn(); $reply = sprintf('@%s %s', $username, $options['reply']); if (mb_strlen($reply, 'utf-8') > (140-$link_length)) { $reply = substr($reply, 0, 140-$link_length-3); $reply .= '...'; } $tweet = $reply . $link; } $twitteroauth = new TwitterOAuth(...Twitter::getTokens()); $result = $twitteroauth->post( 'statuses/update', array( 'status' => $tweet, 'in_reply_to_status_id' => $is_reply ? $options['twitter_id'] : 0 ) ); if (array_key_exists('id', $result)) { $tweet_id = $result->id; } else { $tweet_id = 0; } if ($tweet_id) { // now re-update the ID in the db $query = db()->prepare( 'UPDATE audios SET twitter_id = :tweet_id WHERE id = :audio_id ' ); // tweet id inserted as string instead of integer // because PHP can't handle a big integer like this // 744638714954002432 // :( $query->bindValue('tweet_id', $tweet_id); $query->bindValue('audio_id', $audio_id, PDO::PARAM_INT); $query->execute(); } return $audio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_media($data){\n db_insert(\"tbl_medias\", $data);\n}", "public function addReply()\r\n{\r\n $query_string = \"INSERT INTO replies \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"replycontent = :replycontent, \";\r\n $query_string .= \"replytopic = :replytopic, \";\r\n $query_string .= \"replyauthor = :replyauthor\";\r\n\r\n return $query_string;\r\n}", "public function test_audio_upload() {\n global $CFG, $DB;\n list(, , $talkpoint) = $this->_setup_single_user_in_single_talkpoint();\n // request the page\n $client = new Client($this->_app);\n $crawler = $client->request('GET', '/' . $talkpoint->id . '/add');\n $this->assertTrue($client->getResponse()->isOk());\n\n // post some data\n $form = $crawler->selectButton(get_string('savechanges'))->form();\n $client->submit($form, array(\n 'form[title]' => 'Title 001',\n 'form[nimbbguid]' => 'ABC123',\n 'form[mediatype]' => 'audio',\n ));\n $created = $DB->get_record('talkpoint_talkpoint', array('instanceid' => $talkpoint->id));\n $url = $CFG->wwwroot . SLUG . $this->_app['url_generator']->generate('talkpoint', array(\n 'id' => $created->id,\n ));\n $this->assertTrue($client->getResponse()->isRedirect($url));\n\n $this->assertTrue($DB->record_exists('talkpoint_talkpoint', [\n 'id' => $created->id,\n 'title' => 'Title 001',\n 'nimbbguid' => 'ABC123',\n 'mediatype' => 'audio',\n ]));\n }", "function insert_request_entry($Song, $Artist) {\r\n\r\n $conn = db_connect();\r\n\r\n\r\n // insert new log entry\r\n $query = \"insert into REQUESTS values\r\n (null, '\".$Song.\"', \r\n '\".$Artist.\"')\";\r\n\r\n $result = $conn->query($query);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "function db_add_response($art_id, $user_id, $message, $id)\n{\n $mysqli = db_connect();\n $sql = \"INSERT INTO review (fk_article_id, fk_user_id, message, response_id) VALUES (?,?,?,?)\";\n $con = $mysqli->prepare($sql);\n $con->bind_param(\"iisi\", $art_id, $user_id, $message, $id);\n if ($con->execute() == TRUE) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function insert_song($song_name, $artist_name, $song_release_date, $album_name,\n $song_genre, $song_medium, $db) {\n try {\n $sql = \"INSERT INTO Songs (name, artist, release_date, album, genre, medium)\n VALUES (:name, :artist, :release_date, :album, :genre, :medium);\";\n $stmt = $db->prepare($sql);\n $params = array(\"name\" => $song_name,\n \"artist\" => $artist_name,\n \"release_date\" => $song_release_date,\n \"album\" => $album_name,\n \"genre\" => $song_genre,\n \"medium\" => $song_medium);\n $stmt->execute($params);\n success(\"Added \" . $song_name . \" by \" . $artist_name . \" to the database.\");\n }\n catch (PDOException $ex) {\n catch_error(\"There was an issue inserting the song into the database.\", $ex);\n }\n }", "function question_answer_insert($data)\n\t{\n\t$this->db->insert('question_answer', $data);\n\t}", "function media_upload_audio()\n {\n }", "public function insert($mambot);", "private function addMusic($conn){\t\n\t\t\t$postdata = file_get_contents(\"php://input\");\n\t\t\t$request = json_decode($postdata);\n\t\t\t$user_id = $request->user_id;\n\t\t\t$track_code = $request->music_id;\n\t\t\t$query_track = 'SELECT track_id FROM tracks where track_code ='.$track_code;\n\t\t\t$sql_track = $conn->query($query_track);\n\t\t\t$result_track = $sql_track->fetch_assoc();\n\t\t\t$track_id = $result_track['track_id'];\n\t\t\t$query = 'SELECT playlist_id FROM playlist where user_id ='.$user_id;\n\t\t\t$sql = $conn->query($query);\n\t\t\tif($sql->num_rows > 0){\n\t\t\t\t$result = $sql->fetch_assoc();\n\t\t\t\t$query_teste = 'select * from rel_playlist_tracks where playlist_id = '.$result['playlist_id'].' and track_id= '.$track_id.' and rel_playlist_tracks_status=0'; \n\t\t\t\t\n\t\t\t\t$sql_teste = $conn->query($query_teste);\n\t\t\t\tif($sql_teste->num_rows == 0){\n\t\t\t\t\t$query2 = 'INSERT INTO `rel_playlist_tracks`(`playlist_id`, `track_id`, `rel_playlist_tracks_status` ) VALUES ('.$result['playlist_id'].', '.$track_id.', 0)';\n\t\t\t\t\t$sql2 = $conn->query($query2);\n\t\t\t\t\t$query3 = 'SELECT rel_playlist_tracks_id FROM rel_playlist_tracks where playlist_id = '.$result['playlist_id'].' and track_id = '.$track_id;\n\t\t\t\t\t$sql3 = $conn->query($query3);\n\t\t\t\t\tif($sql3->num_rows > 0){\n\t\t\t\t\t\t$this->response('',200);\n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t}\n\t\t\t$this->response('',204); \n\t\t}", "function do_store_post_reply($post_id) {\r\n // echo '<pre>'; print_r($_POST); die();\r\n foreach(array(\"description\",\"replied_by\") as $i)\r\n\t\t\t$$i=$this->input->post($i);\r\n $replied_on = time();$status=1;\r\n $this->db->query(\"insert into m_stream_post_reply(description,post_id,replied_by,replied_on,status) values(?,?,?,?,?)\",array($this->prep($description),$post_id,$replied_by,$replied_on,$status));\r\n }", "private function insert_entry_qual()\n {\n global $DB;\n $params = $this->get_params();\n $this->id = $DB->insert_record('subject', $params);\n }", "function insertMessages2() {\n global $db;\n if (isset($_POST['submit2M'])) {\n $message = htmlspecialchars($_POST['my_message2']);\n $responseFromWatson = getResponseFromWatson2($message);\n\n if (!empty($message) && !empty($responseFromWatson)) {\n\n $quer = \"INSERT INTO messages2(s, r, user_message, watson_response) VALUES (:s, :r, :user_message, :watson_response)\";\n $query = $db->prepare($quer);\n\n $query->execute(array(\n \"s\" => \"ilyes ouakouak\",\n \"r\" => \"IlyBot\",\n \"user_message\" => $message,\n \"watson_response\" =>$responseFromWatson\n\n ));\n } else {\n echo \"can't send an empty message\";\n }\n\n }\n\n }", "function submitNote() {\n $stmt = $GLOBALS['con']->prepare(\"INSERT INTO customerNotes (customer_id, note) VALUES (?, ?)\");\n $stmt->bind_param(\"ss\", $uid, $note);\n \n $note = validateInput('notepad', 'post');\n $uid = validateInput('uid', 'post');\n\n $stmt->execute();\n $stmt->close(); \n }", "function add_note($module_key) {\r\n\r\n\tglobal $CONN, $CONFIG;\r\n\t$body = $_POST['body'];\r\n\t$sql = \"INSERT INTO {$CONFIG['DB_PREFIX']}notes(module_key,note) values ('$module_key','$body')\";\r\n\t\r\n\tif ($CONN->Execute($sql) === false) {\r\n\t\r\n\t\t$message = 'There was an error adding your note: '.$CONN->ErrorMsg().' <br />';\r\n\r\n\t\treturn $message;\r\n\t\t\r\n\t} else {\t \r\n\t\r\n\t\t\treturn true; \r\n\t}\r\n\t\r\n\r\n}", "public function add()\n {\n $sql = \"INSERT INTO\n Songs (ComposersID, MusicalForm, Title, Opus, Movement, Length, Difficulty, WantToPlay,ConcertReady)\n VALUES (?,?,?,?,?,?,?,?,?)\";\n $sth = $this->con->prepare($sql);\n\n // Catch error if connection fails\n // todo: throw Exception instead of echo and die\n if (!$sth) {\n echo \"\\nPDO::errorInfo():\\n\";\n print_r($this->con->errorInfo());\n die();\n }\n $sth->bindParam(1, $this->ComposersID, PDO::PARAM_INT);\n $sth->bindParam(2, $this->MusicalForm, PDO::PARAM_STR);\n $sth->bindParam(3, $this->Title, PDO::PARAM_STR);\n $sth->bindParam(4, $this->Opus, PDO::PARAM_INT);\n $sth->bindParam(5, $this->Movement, PDO::PARAM_INT);\n $sth->bindParam(6, $this->Length, PDO::PARAM_STR);\n $sth->bindParam(7, $this->Difficulty, PDO::PARAM_STR);\n $sth->bindParam(8, $this->WantToPlay, PDO::PARAM_INT);\n $sth->bindParam(9, $this->ConcertReady, PDO::PARAM_INT);\n $sth->execute();\n\n // Catch error if connection fails\n // todo: throw Exception instead of echo and die\n if($sth->errorCode() != '00000'){\n echo \"\\nPDO::errorInfo()\\n\";\n print_r($sth->errorInfo());\n die();\n }\n }", "public function insert($recording)\n {\n $query=\"INSERT INTO recording ( \".\n\t \"id,\".\n \"gid,\".\n \"name,\".\n \"artist_credit,\".\n \"length,\".\n \"comment,\".\n \"edits_pending,\".\n \"last_updated,\".\n \"video \". \n \")\".\n \"VALUES (\".\n \"null,\".\n \"'\".$this->sqlSafe($recording->gid).\"',\".\n \"'\".$this->sqlSafe($recording->name).\"',\".\n \" \".$recording->artist_credit.\" ,\".\n \" \".$recording->length.\" ,\".\n \"'\".$this->sqlSafe($recording->comment).\"',\".\n \" \".$recording->edits_pending.\" ,\".\n \"'\".$this->sqlSafe($recording->last_updated).\"',\".\n \"'\".$this->sqlSafe($recording->video).\"' \". \n \")\"; \n\n $this->executeQuery($query);\n }", "function insertMessages() {\n global $db;\n\n if (isset($_POST['submitM'])) {\n $message = htmlspecialchars($_POST['my_message']);\n $responseFromWatson = getResponseFromWatson($message);\n\n if (!empty($message) && !empty($responseFromWatson)) {\n\n $quer = \"INSERT INTO messages(s, r, user_message, watson_response) VALUES (:s, :r, :user_message, :watson_response)\";\n $query = $db->prepare($quer);\n\n $query->execute(array(\n \"s\" => \"ilyes ouakouak\",\n \"r\" => \"IlyBot\",\n \"user_message\" => $message,\n \"watson_response\" =>$responseFromWatson\n ));\n } else {\n echo \"can't send an empty message\";\n }\n\n }\n\n }", "function insertSong($conn, $songName, $albumID, $artistID, $genreName, $trackNumber, $addUserID) {\n $query = insertSongStringBuilder($songName, $genreName, $addUserID);\n $result = mysqli_query($conn, $query);\n if ($result) {\n $songID = mysqli_insert_id($conn);\n insertArtistSong($conn, $artistID, $songID);\n insertAlbumSong($conn, $albumID, $songID, $trackNumber);\n return $songID;\n } else {\n return 0;\n }\n }", "public function add() {\n if ($this->id == 0) {\n $reponse = $this->bdd->prepare('INSERT INTO chapitres SET title = :title, body = :body');\n $reponse->execute([\n 'body'=>$this->body, \n 'title'=>$this->title\n ]);\n }\n }", "function create_reply($reply, $user_id, $comment_id, $today){\n global $db;\n $query = 'INSERT INTO replies\n (reply, user_id, comment_id, created)\n VALUES\n (:reply, :user_id, :comment_id, :created)';\n $statement = $db->prepare($query);\n $statement->bindValue(':reply', $reply);\n $statement->bindValue(':user_id', $user_id);\n $statement->bindValue(':comment_id', $comment_id);\n $statement->bindValue(':created', $today);\n $statement->execute();\n $statement->closeCursor();\n }", "public function insert_() {\n\n\n\t\t\t$podcast = Model\\Podcast::get_instance();\n\n\t\t}", "function insertComment() {\n if ($this->getRequestMethod() != \"POST\") {\n $this->response('', 406);\n }\n $comment = json_decode(file_get_contents(\"php://input\"),true);\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($comment['user_id'], $auth)) {\n $this->response('', 406);\n }\n \n $columns = 'user_id, video_id, text';\n $values = $comment['user_id'] . ',' . $comment['video_id'] . ',\\'' . $comment['text'] . \"'\";\n \n $query = \"insert into comments(\". $columns . \") VALUES(\". $values . \");\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => \"Success\", \"msg\" => \"Comment Posted.\", \"data\" => $comment);\n $this->response(json_encode($success),200);\n }", "function insertAlbumSong($conn, $albumID, $songID, $trackNumber) {\n $query = \"INSERT INTO album_song (album_id, song_id, song_track_number) \"\n . \"VALUES (${albumID}, ${songID}, ${trackNumber})\";\n mysqli_query($conn, $query);\n }", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }", "function db_add_review($art_id, $user_id, $stars, $message)\n{\n $mysqli = db_connect();\n $sql = \"INSERT INTO review (fk_article_id, fk_user_id, stars, message) VALUES (?,?,?,?)\";\n $con = $mysqli->prepare($sql);\n $con->bind_param(\"iiis\", $art_id, $user_id, $stars, $message);\n if ($con->execute() == TRUE) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "function insertArtistSong($conn, $artistID, $songID) {\n $query = \"INSERT INTO artist_song (artist_id, song_id) \"\n . \"VALUES (${artistID}, ${songID})\";\n mysqli_query($conn, $query);\n }", "public function addAudio(AudioMedia $audio);", "function saveMsgForLater()\n{\n global $db, $errors, $successes;\n $query = $db->prepare(\"INSERT INTO messages(type, text, session_id) VALUES(:type, :text, :session_id)\");\n $params = [\n \"type\" => \"error\",\n \"text\" => \"\",\n \"session_id\" => session_id()\n ];\n\n if (count($errors) > 0) {\n foreach ($errors as $msg) {\n $params[\"text\"] = $msg;\n $query->execute($params);\n }\n }\n\n $params[\"type\"] = \"success\";\n if (count($successes) > 0) {\n foreach ($successes as $msg) {\n $params[\"text\"] = $msg;\n $query->execute($params);\n }\n }\n}", "function insertTextQuestion($question,$conn)\n {\n $qns = $question['question'];\n $type = getQuestionTypeInt($question['type']);\n $ans = $question['answer'];\n\n $sql=\"INSERT INTO TextQns (type,qns,ans) VALUES (\".$type.\",'\".$qns.\"','\".$ans.\"'); SELECT LAST_INSERT_ID() as yoo;\";\n\n $response = -1;\n\n if ($conn -> multi_query($sql)) \n {\n do \n {\n\n if ($result = $conn -> store_result()) \n {\n while ($row = $result -> fetch_row()) \n {\n $response = $row[0];\n }\n $result -> free_result();\n }\n\n }while ($conn -> next_result());\n }\n\n return $response;\n }" ]
[ "0.6357442", "0.6353131", "0.6282276", "0.6212347", "0.6092689", "0.5940964", "0.5905077", "0.5884839", "0.58557755", "0.5853174", "0.5809987", "0.5806459", "0.580191", "0.5782808", "0.57693744", "0.5754767", "0.5744876", "0.57378304", "0.5709642", "0.5706538", "0.56858295", "0.56821847", "0.5678351", "0.5677036", "0.5646624", "0.5630076", "0.5612261", "0.56091106", "0.5606287", "0.55810004" ]
0.6995912
0
Will delete an audio or a reply This function is BLIND It will delete the audio without any comprobation.
public static function delete($id) { $audio = self::get($id, array('audio_url')); if (! $audio) { // does not exist. return; } $query = db()->prepare( "DELETE FROM audios WHERE id = :id" ); $query->bindValue('id', $id); $query->execute(); /* I tried making only one query but it generated a lot of warnings and did not delete the audio :( */ $query = db()->prepare("DELETE FROM audios WHERE reply_to = :id"); $query->bindValue('id', $id); $query->execute(); if ($audio['audio_url']) { @unlink( DOCUMENT_ROOT . '/assets/audios/' . $audio['original_name'] ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function deleteAudio(){\n if($this->checkStatus()){\n chdir('..');\n $return = 'false';\n $fileName = $this->sanitizeString($this->json->fileName);\n if(unlink('aud/'.$fileName)) $return='true';\n header('content-type: text/plain');\n echo $return;\n } else {\n $this->notFound404();\n } \n }", "public function remove_audio()\n {\n // Load all groups\n $groups = Group::loadMultiple();\n foreach ($groups as $group) {\n $group_type_id = $group->getGroupType()->id();\n if($group_type_id == \"program\") {\n echo \"Process program \" . $group->label() . PHP_EOL;\n\n $audio_contents = $group->getContent(null, [\"type\"=>\"program-group_media-audio\"]);\n foreach($audio_contents as $audio_content) {\n echo \"Delete group audio \" . $audio_content->label() . PHP_EOL;\n $audio_content->delete();\n }\n }\n else if($group_type_id == \"project\") {\n echo \"Process project \" . $group->label() . PHP_EOL;\n $audio_contents = $group->getContent(null, [\"type\"=>\"project-group_media-audio\"]);\n foreach($audio_contents as $audio_content) {\n echo \"Delete group audio \" . $audio_content->label() . PHP_EOL;\n $audio_content->delete();\n }\n }\n }\n }", "function delete_audio($id_content='', $user_id=''){\n\t\ttry\n\t\t{\n\t\t\t$data = array(\n\t\t\t 'state' => 0\n\t\t\t );\n\t\t\t$this->db->where('user_id', $user_id);\n\t\t\t$this->db->where('id',$id_content);\n\t\t\t$result\t=\t$this->db->update('audio',$data);\n\t\t\treturn $result;\n\n\t\t\t/*$this->db->where('id_content', $id_content);\n\t\t\t$this->db->where('tipo', 'audio');\n\t\t\tif($this->db->delete('content_wapp')){\n\t\t\t\t$this->db->where('user_id', $user_id);\n\t\t\t\t$this->db->where('id', $id_content);\n\t\t\t\tif($this->db->delete('audio')){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}else{\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}*/\n\t\t}catch(ErrorInsertBatchFields $e){\n\t\t\tlog_message('debug','Error tratando de eliminar campos din�micos');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function delete(&$yogurt_audio, $force = false)\r\n\t{\r\n\t\tif (get_class($yogurt_audio) != 'yogurt_audio') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$sql = sprintf(\"DELETE FROM %s WHERE audio_id = %u\", $this->db->prefix(\"yogurt_audio\"), $yogurt_audio->getVar('audio_id'));\r\n\t\tif (false != $force) {\r\n\t\t\t$result = $this->db->queryF($sql);\r\n\t\t} else {\r\n\t\t\t$result = $this->db->query($sql);\r\n\t\t}\r\n\t\tif (!$result) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static function EliminarMedia($request,$response,$args){\n\n $retorno=new stdClass();\n $retorno->Mensaje=\"No se pudo borrar\";\n \n\n $param=$request->getParsedBody();\n $id=$param['id'];\n\n if(Media::Eliminar($id)){\n $retorno->Mensaje=\"Se borro la media con id: \".$id.\".\";\n return $response->withJson($retorno,200);\n }\n\n return $response->withJson($retorno,409);\n \n \n }", "function mDELETE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DELETE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:14:3: ( 'delete' ) \n // Tokenizer11.g:15:3: 'delete' \n {\n $this->matchString(\"delete\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function destroy($id)\n {\n $datos = Audio::findOrFail($id);\n $id_capitulo = $datos->capitulo_id;\n unlink($datos->archivo);\n $datos->delete();\n return redirect()->route('libro.audios', $id_capitulo);\n }", "private function delete()\n {\n $webhookId = $this->ask('Please enter Webhook ID');\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->delete($webhookId);\n\n if ($response) {\n $this->info(\"WebhookId {$webhookId} is deleted successfully\");\n }\n\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "function delete_reply($reply_id){\n global $db;\n $query = 'DELETE FROM replies\n WHERE reply_id = :reply_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':reply_id', $reply_id);\n $statement->execute();\n $statement->closeCursor();\n }", "public function destroy(Reply $reply)\n {\n //\n }", "public function destroy(Reply $reply)\n {\n //\n }", "protected function deleted()\n {\n $this->response = $this->response->withStatus(204);\n $this->jsonBody($this->payload->getOutput());\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 }", "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() {}", "public function delete() {}" ]
[ "0.75131696", "0.67571235", "0.66466856", "0.64739585", "0.6116661", "0.60945874", "0.6075951", "0.6049778", "0.60482335", "0.600084", "0.600084", "0.5929248", "0.59248084", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.59234715", "0.5921944", "0.5920187" ]
0.7268157
1
Registers a play for $audio_id
public static function registerPlay($audio_id) { $user_ip = get_ip(); // ← /application/functions.php $query = db()->prepare( 'SELECT COUNT(*) FROM plays WHERE user_ip = :user_ip AND audio_id = :audio_id' ); $query->bindValue('user_ip', $user_ip, PDO::PARAM_INT); $query->bindValue('audio_id', $audio_id); $query->execute(); $was_played = !! $query->fetchColumn(); if ($was_played) { return false; } $query = db()->prepare( 'UPDATE audios SET plays = plays + 1 WHERE id = :id' ); $query->bindValue('id', $audio_id); $query->execute(); $query = db()->prepare( 'INSERT INTO plays SET user_ip = :user_ip, audio_id = :audio_id, date_added = :date_added' ); $query->bindValue('user_ip', $user_ip, PDO::PARAM_INT); $query->bindValue('audio_id', $audio_id); $query->bindValue('date_added', time(), PDO::PARAM_INT); $query->execute(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addAudio(AudioMedia $audio);", "function media_upload_audio()\n {\n }", "public function hasAudio() {}", "function play( $id, $id_param, $back_url ) {\n\t\t\n\t}", "abstract public function playCard(int $card_id);", "function play_number($num){\r\n\t\t$out = '';\r\n\r\n\t\t$out .= \"<audio controls autoplay>\";\r\n\t\t$out .= \"<source src=sound/\".$num.\".wav type='audio/mpeg'>\";\r\n\t\t/*$out .= \"sleep(1)\";\r\n\t\t$out .= \"<source src=sound/\".$x1.\".wav type='audio/mpeg'>\";\r\n\t\t$out .= \"sleep(1)\";\r\n\t\t$out .= \"<source src=sound/\".$x0.\".wav type='audio/mpeg'>\";\r\n\t\t$out .= \"sleep(1)\";*/\r\n\t\t$out .= \"</audio>\";\r\n\t \r\n\t return $out;\r\n\t}", "public function add_new_song_amp($id_song, $id_playlist)\n {\n $playlit_amp = $this->db->where('album_root', $id_playlist)->get('playlist_amp')->result();\n foreach ($playlit_amp as $playlist) {\n $insertArr = array(\n 'audio_song_id' => $id_song,\n 'playlist_amp_id' => $playlist->id,\n );\n $this->db->insert('audio_amp', $insertArr);\n }\n }", "function wp_embed_handler_audio($matches, $attr, $url, $rawattr)\n {\n }", "private function PlayOnDevice($partyid) {\n\t\t\t\tglobal $JUKE;\n\n\t\t\t\tglobal $PARTY;\n\t\t\t\t$row = $PARTY->FindPartyWithID($partyid);\n\n\t\t\t\tif(isset($_GET[\"DeviceID\"]))\n\t\t\t\t{\n\t\t\t\t\t$deviceid = $_GET[\"DeviceID\"];\n\t\t\t\t}\n\t\t\t\telseif(isset($_POST[\"DeviceID\"]))\n\t\t\t\t{\n\t\t\t\t\t$deviceid = $_POST[\"DeviceID\"];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result = $JUKE->PutRequest(\n\t\t\t\t\t\"https://api.spotify.com/v1/me/player\",\n\t\t\t\t\tarray( \n\t\t\t\t\t\t\"Content-Type: application/json\",\n\t\t\t\t\t\t\"Accept: application/json\",\n\t\t\t\t\t\t\"Authorization: Bearer \" . $row[\"AuthAccessToken\"]\n\t\t\t\t\t),\n\t\t\t\t\tjson_encode(array(\"device_ids\" => array($deviceid))),\n\t\t\t\t\tNULL,\n\t\t\t\t\tNULL\n\t\t\t\t);\n\t\t\t\t$this->DropNetMessage(array( \"Status\"\t=>\t\"Success\"));\n\t\t\t}", "public static function addAudio($url, $type = null, $secureUrl = null)\n {\n self::$Sounds[] = array(\n 'og:audio' => $url,\n 'og:audio:secure_url' => $secureUrl,\n 'og:audio:type' => $type\n );\n }", "public function playlist($id)\n {\n try {\n $playList = AudioPlaylist::where('playlist_type', 'g')->find($id);\n if ($playList) {\n $this->solrController->kiki_playlist_delete_by_id($id);\n $this->playListSolr($playList);\n return \"Playlist ID -$id record successfully updated\";\n } else {\n return \"Playlist ID -$id not found. Please recheck ID\";\n }\n } catch (Exception $exception) {\n Log::error(\"single playlist solr bulk upload error \" . $exception->getMessage());\n }\n }", "public function play() {\n\n\t\t/* A play when it's already playing causes a track restart\n\t\t * which we don't want to doublecheck its state\n\t\t */\n\t\tif ($this->_httpq->state() == 'play') {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (is_null($this->_httpq->play())) { return false; }\n\t\treturn true;\n\n\t}", "public function it_should_have_soundtrack()\n {\n $this->shouldHaveSoundtrack();\n }", "public function add_songs($song_ids=array()) { \n\n\t\t/* We need to pull the current 'end' track and then use that to\n\t\t * append, rather then integrate take end track # and add it to \n\t\t * $song->track add one to make sure it really is 'next'\n\t\t */\n\t\t$sql = \"SELECT `track` FROM `playlist_data` WHERE `playlist`='\" . $this->id . \"' ORDER BY `track` DESC LIMIT 1\";\n\t\t$db_results = Dba::read($sql);\n\t\t$data = Dba::fetch_assoc($db_results);\n\t\t$base_track = $data['track'];\n\t\tdebug_event('add_songs', 'Track number: '.$base_track, '5');\n\n\t\tforeach ($song_ids as $song_id) { \n\t\t\t/* We need the songs track */\n\t\t\t$song = new Song($song_id);\n\t\t\t\n\t\t\t$track\t= Dba::escape($song->track+$base_track);\n\t\t\t$id\t= Dba::escape($song->id);\n\t\t\t$pl_id\t= Dba::escape($this->id);\n\n\t\t\t/* Don't insert dead songs */\n\t\t\tif ($id) { \n\t\t\t\t$sql = \"INSERT INTO `playlist_data` (`playlist`,`object_id`,`object_type`,`track`) \" . \n\t\t\t\t\t\" VALUES ('$pl_id','$id','song','$track')\";\n\t\t\t\t$db_results = Dba::write($sql);\n\t\t\t} // if valid id\n\n\t\t} // end foreach songs\n\n\t}", "public function audioAction()\n {\n Dm_Log::Debug('Start ' . __METHOD__);\n $this->getRequest()->setParam('type', 'audio');\n $this->_forward('index');\n Dm_Log::Debug('End ' . __METHOD__);\n }", "public function makeSound()\n {\n echo 'Maw Maw....<br>';\n }", "function asalah_format_audio_save_post($post_id) {\n\tif (!defined('XMLRPC_REQUEST') && isset($_POST['_format_audio_embed'])) {\n\t\tupdate_post_meta($post_id, '_format_audio_embed', $_POST['_format_audio_embed']);\n\t}\n}", "function mpd_add_track($track, $port){ \n\t\tshell_exec(\"mpc -p $port add \".escapeshellarg($track));\n\t}", "public function makeSound()\n {\n echo 'Wow wow....<br>';\n }", "function play_song($array){\n\tglobal $searchquery;\n\tglobal $song_returned_id, $number_of_moods;\n\tif ($array != NULL) {\n\t$randomnumber = rand(0, count($array)-1);\n\t//echo $randomnumber;\n\t//echo count($array);\n\tforeach ($array as $key => & $sub_array) {\n\t\tif ($key == $randomnumber) {\n\t\t\techo \"you are listening to {$sub_array[\"name\"]} by {$sub_array[\"artist\"]} tagged \" . $GLOBALS['searchquery'] .\"<br />\";\n\t\t\techo \"<audio controls id=\\\"player\\\" src=\" . $sub_array[\"path\"] .\">\n\t\t\tYour browser does not support the audio element.\n\t\t\t</audio>\"; \n\t\t\t$song_returned_id = $sub_array[\"songid\"];\n\t\t\t//echo \"song\".$song_returned_id;\n\t\t}\n\t}\n\t\techo \"tags: \";\n\t\t// echo the tags for the song\n\tforeach ($array as $key => & $sub_array) {\n\t\tif ($sub_array['songid'] == $song_returned_id) {\n\t\t\techo $sub_array['mood'] . \" \";\n\t\t}\n\n\t}\n\t} else { \n\t\tif ($searchquery != \"random\"){\n\t\t\techo \"Sorry we don't have \" . $searchquery . \" in our database. \";\n\t\t\techo \"To see all the tagged moods, please check out <a href=\\\"sensation2.php\\\"> All the moods </a><br />\";\n\t\t}\n\t\t// free mysqli result\n\t\tmysqli_free_result($GLOBALS['dbresult']);\n\t\t// make a new query to get all the songs in the database, and then to play a random one from that selection\n\t\t$sqlquery = \"SELECT * FROM moods\";\n\t\t$sqlquery .= \" INNER JOIN map\";\n \t$sqlquery .= \" ON moods.tagid = map.tagid\";\n \t$sqlquery .= \" INNER JOIN songs\";\n \t$sqlquery .= \" ON songs.songid = map.songid\";\n\n\t\t$dbresult = mysqli_query($GLOBALS['connection'], $sqlquery);\n\t// test if query succeeded./ if there was a query error\n\tif (!$dbresult){\n\t\tdie(\"Database query failed.\");\n\t}\n\n\t\t// get the first row from that result set and asign it to row, store all of those rows in an array of arrays called $dbarray, which can be used to compare to the original one\n\t$db_rand_song = array();\n\twhile($row = mysqli_fetch_assoc($dbresult)){\n \t\t$db_rand_song[] = $row;\n\t\t}\n\n\t\t// play a random song from the database\n\t\tif ($db_rand_song != NULL) {\n\t$randomnumber = rand(0, count($db_rand_song)-1);\n\t//echo $randomnumber;\n\t//echo count($array);\n\t//print_r($db_rand_song);\n\tforeach ($db_rand_song as $key => & $sub_array) {\n\t\tif ($key == $randomnumber) {\n\n\t\t\techo \"Now playing a random mood from our database: {$sub_array['name']} by {$sub_array['artist']} <audio controls id=\\\"player\\\" src=\" . $sub_array[\"path\"] .\">\n\t\t\tYour browser does not support the audio element.\n\t\t\t</audio>\";\n\t\t\t$song_returned_id = $sub_array[\"songid\"];\n\t}}}}\n\t//mysqli_free_result($dbresult);\n}", "public function playerAudio($item) {\r\n\t\t$link_audio = ConfigVO::getUrlAudio().$item;\r\n \t$html_player = \"<object type=\\\"application/x-shockwave-flash\\\" data=\\\"\".ConfigVO::URL_SITE.\"FlowPlayerDark.swf\\\" width=\\\"320\\\" height=\\\"29\\\" id=\\\"FlowPlayer\\\"><param name=\\\"allowScriptAccess\\\" value=\\\"sameDomain\\\" /><param name=\\\"movie\\\" value=\\\"\".ConfigVO::URL_SITE.\"FlowPlayerDark.swf\\\" /><param name=\\\"quality\\\" value=\\\"high\\\" /><param name=\\\"scale\\\" value=\\\"noScale\\\" /><param name=\\\"wmode\\\" value=\\\"transparent\\\" /><param name=\\\"flashvars\\\" value=\\\"config={videoFile: '\".$link_audio.\"', autoBuffering: false, streamingServer: 'lighttpd', initialScale: 'orig', loop: false }\\\" /></object>\";\r\n return $html_player;\r\n }", "function addSongsToQueue($accountId, $soundtrackId, $startSong, $startingSequence = 1)\n{\n \n $sql = \"SELECT * FROM soundtrack_playlist WHERE soundtrack_id = $soundtrackId\";\n \n $rows = mysql_query($sql);\n $songs = array();\n $songIds = array();\n\n if ($startSong)\n {\n $startSongId = intval($startSong['song_id']);\n $songIds[] = $startSongId;\n }\n\n while ($row = mysql_fetch_array($rows, MYSQL_ASSOC))\n {\n $playlistId = $row['playlist_id'];\n $weight = $row['weight'];\n\n // TODO: What if there aren't enough songs from this playlist?\n \n $sql = \"SELECT * FROM playlist_song JOIN song ON playlist_song.song_id = song.song_id WHERE playlist_id = $playlistId \" .\n \"AND (playlist_song.song_id NOT IN (SELECT song_id FROM account_queue WHERE account_id = $accountId)) \" .\n \"AND (playlist_song.song_id NOT IN (SELECT song_id FROM account_song WHERE account_id = $accountId AND action = (-2))) \" .\n \"AND (playlist_song.song_id NOT IN (SELECT song_id FROM account_song WHERE account_id = $accountId AND `timestamp` >= DATE_SUB(NOW(), INTERVAL 1 DAY))) \" .\n \"AND (playlist_song.song_id NOT IN (SELECT song_id FROM soundtrack_exclude_song WHERE soundtrack_id = $soundtrackId)) \";\n\n if (count($songIds) > 0)\n {\n $sql .= \"AND (playlist_song.song_id NOT IN (\" . implode(',', $songIds) . \")) \";\n } \n \n $sql .= \"AND playlist_song.status = 0 AND song.status = 0 ORDER BY RAND() LIMIT $weight\";\n \n //echo $sql;\n \n $songRows = mysql_query($sql);\n $songCount = 0;\n\n while ($row = mysql_fetch_array($songRows, MYSQL_ASSOC))\n {\n $songId = intval($row['song_id']);\n $songIds[] = $songId;\n\n $songs[] = $row;\n $songCount++;\n }\n }\n \n // Randomize the songs\n\n shuffle($songs);\n \n // Prepend the start song\n \n if ($startSong)\n {\n array_unshift($songs, $startSong);\n }\n \n // Try to make sure the same artist isn't too close to themselves\n // Some soundtracks don't want this\n\n $separateArtists = true; \n $sql = \"SELECT shuffle FROM soundtrack WHERE soundtrack_id = $soundtrackId\";\n $rows = mysql_query($sql);\n\n if ($row = mysql_fetch_array($rows, MYSQL_ASSOC))\n {\n $separateArtists = intval($row['shuffle']);\n }\n \n if ($separateArtists)\n {\n $songCount = count($songs);\n \n for ($i = 1; $i < ($songCount - 1); $i++)\n {\n $artistA = $songs[$i-1]['artist'];\n $artistB = $songs[$i]['artist'];\n \n if (strcmp(strtolower($artistA), strtolower($artistB)) == 0)\n {\n // Found a match\n // Just swap B with C\n \n $save = $songs[$i];\n $songs[$i] = $songs[$i+1];\n $songs[$i+1] = $save;\n }\n }\n }\n \n // Append to the queue\n \n $sequence = $startingSequence;\n \n foreach ($songs as $song)\n {\n $songId = $song['song_id'];\n $playlistId = $song['playlist_id'];\n \n mysql_query(\"INSERT INTO account_queue (account_id, soundtrack_id, playlist_id, song_id, sequence) VALUES ($accountId, $soundtrackId, $playlistId, $songId, $sequence)\");\n $sequence++;\n }\n \n \n}", "protected function setAudio($index = 0)\n\t{\n\t\tif (isset($this->audio[$index]))\n\t\t{\n\t\t\t$this->_tmp_audio = $this->audio[$index];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_tmp_audio = new stdClass;\n\t\t}\n\t}", "public function sendAudio($chat_id,$audio,$caption=null,$reply_to_message_id=null,$reply_markup=null,$title=null,$duration=null,$performer=null,$disable_notification=null){\n return $this->make_http_request(__FUNCTION__,(object) get_defined_vars());\n }", "public function recordSoundAction()\n {\n $this->_helper->viewRenderer->setNoRender(true);\n $recipient = $this->_getParam('recipient');\n if ($recipient) {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n $contentName = 'Enregistrement audio ' . date('d/m/Y H:i:s');\n $return = $contentService->contentsRecord($recipient, $contentName);\n if ($return->success != 1) {\n throw new Exception('Error during record');\n }\n $this->_helper->json->sendJson(array('contentName' => $contentName));\n return true;\n }\n return false;\n }", "function type_url_form_audio()\n {\n }", "function sp_audio_sc( $atts ) {\n\n\textract( shortcode_atts( array(\n\t\t'mp3' => '',\n\t\t'ogg' => '',\n\t\t'width' => '',\n\t\t'height' => '',\n\t\t'preload' => false,\n\t\t'autoplay' => false,\n\t), $atts ) );\n\n\tglobal $post;\n\n\tif ( $mp3 )\n\t\t$mp3 = '<source src=\"' . $mp3 . '\" type=\"audio/mp3\" />';\n\n\tif ( $ogg )\n\t\t$ogg = '<source src=\"' . $ogg . '\" type=\"audio/ogg\" />';\n\n\tif ( $preload )\n\t\t$preload = 'preload=\"' . $preload . '\"';\n\n\tif ( $autoplay )\n\t\t$autoplay = 'autoplay';\n\n\t$output = \"<audio id='AudioPlayerV1-id-$post->ID' class='AudioPlayerV1' width='100%' height='29' controls {$preload} {$autoplay} data-fallback='\" . SP_BASE_URL . \"js/audioplayerv1.swf'>\n\t\t\t\t\t{$mp3}\n\t\t\t\t\t{$ogg}\n\t\t\t\t</audio>\";\n\n\treturn $output;\n\n}", "public function play($guess){\n\t\t$this->startTimer();\n\n\t\t// determine state of guess\n\t\t$this->moves++;\n\t\tif($guess>$this->secretNumber){\n\t\t\t$this->state=\"too high\";\n\t\t} else if($guess<$this->secretNumber){\n\t\t\t$this->state=\"too low\";\n\t\t} else {\n\t\t\t$this->state=\"correct\";\n\t\t}\n\t\t$this->history[] = \"Guess #$this->moves was $guess and was $this->state.\";\n\t}", "public function setAudio($var)\n {\n GPBUtil::checkMessage($var, \\Volc\\Service\\Vod\\Models\\Business\\Audio::class);\n $this->Audio = $var;\n\n return $this;\n }", "public function sendAudio(string $chat_id, string $audio, string $caption = null, string $thumb = null, int $duration = null, string $title = null, string $performer = null): Request\n {\n return $this\n ->request('sendAudio', [\n 'chat_id' => $chat_id,\n 'audio' => $audio,\n 'caption' => $caption,\n 'title' => $title,\n 'performer' => $performer,\n 'thumb' => $thumb,\n 'duration' => $duration,\n ], Request::CAN_SET_PARSE_MODE | Request::CAN_DISABLE_NOTIFICATION | Request::CAN_REPLY_TO_MESSAGE | Request::CAN_ADD_REPLY_MARKUP)\n ->setParseMode($this->default_parse_mode);\n }" ]
[ "0.65401083", "0.5676714", "0.56575793", "0.5565213", "0.55511856", "0.550142", "0.54916763", "0.5488554", "0.54193914", "0.5415905", "0.54157925", "0.5397654", "0.5315797", "0.5236449", "0.5207749", "0.51866233", "0.5186494", "0.5178837", "0.51688945", "0.51611245", "0.51505345", "0.50775397", "0.50689876", "0.50543916", "0.50074154", "0.49997574", "0.4997787", "0.49935994", "0.49860957", "0.4970057" ]
0.750331
0
get class all const
static function getConstants() { $oClass = new ReflectionClass(__CLASS__); return $oClass->getConstants(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConstList(){\n\t\treturn $this->getConstantsList();\n\t}", "public function getConsts() {\n $const = $this->get('const');\n return null !== $const ? $const : array();\n }", "public function getConstants()\n {\n return array();\n }", "private static function getConstants() {\n if (self::$constCacheArray == NULL) {\n self::$constCacheArray = [];\n }\n\n $calledClass = get_called_class();\n \n if (!array_key_exists($calledClass, self::$constCacheArray)) {\n $reflect = new ReflectionClass($calledClass);\n self::$constCacheArray[$calledClass] = $reflect->getConstants();\n }\n\n return self::$constCacheArray[$calledClass];\n }", "public static function getConstList()\n\t{\n\t\t$reflect = new ReflectionClass(get_called_class());\n\t\treturn $reflect->getConstants();\n\t}", "static function getCollection(){\n $class = new ReflectionClass(get_called_class());\n return collect($class->getConstants());\n }", "public static function getConstants(): array\n {\n $oClass = new ReflectionClass(__CLASS__);\n return $oClass->getConstants();\n }", "private static function getConstants(): array\n {\n $calledClass = get_called_class();\n\n if (!array_key_exists($calledClass, self::$constCacheArray)) {\n $reflect = new ReflectionClass($calledClass);\n self::$constCacheArray[$calledClass] = $reflect->getConstants();\n }\n\n return self::$constCacheArray[$calledClass];\n }", "public static function getConstants()\n {\n $self = new ReflectionClass(static::class);\n\n return $self->getConstants();\n }", "public function getConstants()\n {\n return $this->constants;\n }", "public function getConstants()\n {\n return $this->constants;\n }", "public function getConstants(): Collection\n {\n return $this->constants;\n }", "public function getConstants()\n\t{\n\t\treturn $this->constants;\n\t}", "public static function values()\n {\n $class = get_called_class();\n\n if (!isset(self::$cache[$class])) {\n $reflected = new \\ReflectionClass($class);\n self::$cache[$class] = $reflected->getConstants();\n }\n\n return self::$cache[$class];\n }", "public static function getValues()\n\t\t{\n\n\t\t\t$reflectionClass = new ReflectionClass(static::class);\n\t\t\treturn array_values($reflectionClass->getConstants());\n\n\t\t}", "final static private function getConstants()\n\t{\n $class = get_called_class();\n\t\tif(!isset(self::$_consts[$class])) {\n\t\t\tif($class == __CLASS__) {\n\t\t\t\tthrow new \\BadMethodCallException('You can\\'t access constants from Enum class');\n\t\t\t}\n\t\t\t$reflection = new \\ReflectionClass($class);\n\t\t\tself::$_consts[$class] = $reflection->getConstants();\n\t\t}\n\t\treturn self::$_consts[$class];\n\t}", "public static function getConstants()\n {\n if (empty(self::$_constantsCache)) {\n $reflectionClass = new \\ReflectionClass(get_called_class());\n self::$_constantsCache = $reflectionClass->getConstants();\n }\n return self::$_constantsCache;\n }", "final static public function toArray()\n {\n return self::getConstants();\n }", "public static function getValues(): array\n {\n $reflectionClass = new ReflectionClass(static::class);\n\n return array_values($reflectionClass->getConstants());\n }", "public static function toArray()\n\t{\n\t\treturn array_flip((new \\ReflectionClass(new self))->getConstants());\n\t}", "public static function toArray()\n\t{\n\t\treturn array_flip((new \\ReflectionClass(new self))->getConstants());\n\t}", "public static function getAllNames(): array\n {\n $reflection = new \\ReflectionClass(__CLASS__);\n\n return \\array_values($reflection->getConstants());\n }", "public static function getAllNames(): array\n {\n $reflection = new \\ReflectionClass(__CLASS__);\n\n return \\array_values($reflection->getConstants());\n }", "static function getCodes() {\n $oClass = new ReflectionClass(__CLASS__);\n return $oClass->getConstants();\n }", "public function getConstants(): Collection\n {\n return collection($this->reflectionObject->getImmediateReflectionConstants())->map(function (ReflectionClassConstant $constant) {\n return new ConstantEntity($constant);\n });\n }", "public function getSubrogationConstantes() {\n return $this->subrogationConstantes;\n }", "public function getConsts($prefix)\n {\n if (isset(self::$consts[$prefix])) {\n return self::$consts[$prefix];\n }\n\n // 1. Get all class constants\n $class = new \\ReflectionClass($this);\n $consts = $class->getConstants();\n\n // 2. Use exiting constant configs\n $property = lcfirst(str_replace('_', '', ucwords($prefix, '_'))) . 'Names';\n if (isset($this->{$property})) {\n $names = $this->{$property};\n } else {\n $names = [];\n }\n\n // 3. Generate id and name\n $prefix .= '_';\n $data = [];\n $length = strlen($prefix);\n foreach ($consts as $name => $id) {\n if (0 !== stripos($name, $prefix)) {\n continue;\n }\n if (in_array($name, $this->constExcludes, true)) {\n continue;\n }\n $data[$id]['id'] = $id;\n $data[$id]['key'] = strtolower(strtr(substr($name, $length), ['_' => '-']));\n if (isset($names[$id])) {\n $data[$id]['name'] = $names[$id];\n }\n }\n\n self::$consts[$prefix] = $data;\n\n return $data;\n }", "public static function toArray(): array\n {\n return self::getConstants();\n }", "public static function values() {\n return parent::membersOf(__CLASS__);\n }", "public static function values() {\n return parent::membersOf(__CLASS__);\n }" ]
[ "0.7634188", "0.7620217", "0.76185644", "0.7600437", "0.75861204", "0.7456084", "0.74307096", "0.73866737", "0.73817515", "0.7297303", "0.7297303", "0.7243859", "0.72354656", "0.71708405", "0.71030277", "0.70428365", "0.702577", "0.6968413", "0.69491553", "0.6906526", "0.6906526", "0.6779222", "0.6779222", "0.6774957", "0.6744208", "0.67104423", "0.6664946", "0.6619848", "0.65937513", "0.65937513" ]
0.777794
0
Display a Bootstrap nav item.
private function bootstrapNav(?string $item): string { return static::coreHtmlElement("li", $item, ["role" => "presentation"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printItemNavbar( $text, $link, $actual, $index ) {\n\n // seta a classe\n $cl = $index == $actual ? 'active' : '';\n\n // imprime o item\n echo \"<a href='\".site_url( $link ).\"' class='nav-link $cl'>$text</a>\"; \n}", "public function show(nav $nav)\n {\n //\n }", "public function run() {\n\t\t\n\t\techo CHtml::openTag('nav', $this->htmlOptions);\n\t\techo '<div class=\"' . $this->getContainerCssClass() . '\">';\n\t\t\n\t\techo '<div class=\"navbar-header\">';\n\t\tif($this->collapse) {\n\t\t\t$this->controller->widget('booster.widgets.TbButton', array(\n\t\t\t\t'label' => '<span class=\"icon-bar\"></span><span class=\"icon-bar\"></span><span class=\"icon-bar\"></span>',\n\t\t\t\t'encodeLabel' => false,\n\t\t\t\t'htmlOptions' => array(\n\t\t\t\t\t'class' => 'navbar-toggle',\n\t\t\t\t\t'data-toggle' => 'collapse',\n\t\t\t\t\t'data-target' => '#'.self::CONTAINER_PREFIX.$this->id,\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t}\n\t\t\n\t\tif ($this->brand !== false) {\n\t\t\tif ($this->brandUrl !== false) {\n\t\t\t\tif($this->toggleSideBar){\n\t\t\t\t\techo \t\t\n\t\t\t\t\t'<button id=\"sidebar-toggle\">\n\t\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t\techo CHtml::openTag('a', $this->brandOptions) . $this->brand . '</a>';\n\t\t\t} else {\n\t\t\t\tunset($this->brandOptions['href']); // spans cannot have a href attribute\n\t\t\t\techo CHtml::openTag('span', $this->brandOptions) . $this->brand . '</span>';\n\t\t\t}\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"collapse navbar-collapse\" id=\"'.self::CONTAINER_PREFIX.$this->id.'\">';\n\t\tforeach ($this->items as $item) {\n\t\t\tif (is_string($item)) {\n\t\t\t\techo $item;\n\t\t\t} else {\n\t\t\t\tif (isset($item['class'])) {\n\t\t\t\t\t$className = $item['class'];\n\t\t\t\t\tunset($item['class']);\n\n\t\t\t\t\t$this->controller->widget($className, $item);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo '</div></div></nav>';\n\n\t\t$this->registerClientScript();\n\t}", "function render_nav_item( \\WP_Post $page ) {\n\n\t$classes = ['NavAccordion_Item'];\n\n\tif ( 'private' === get_post_status( $page->ID ) ) {\n\t\t$classes[] = 'Nav_Item-Private';\n\t}\n\n\tif ( is_nav_item_current( $page ) ) {\n\t\t$classes[] = 'NavAccordion_Item-Active';\n\t}\n\n\tprintf(\n\t\t'<li class=\"%s\"><a href=\"%s\" class=\"NavAccordion_Anchor\">%s</a>',\n\t\tesc_attr( implode( ' ', array_map( 'sanitize_html_class', $classes ) ) ),\n\t\tesc_url( get_permalink( $page->ID ) ),\n\t\tesc_html( $page->post_title )\n\t);\n\n\trender_nav_list( $page->ID );\n\n\techo '</li>';\n}", "function viewNav() {\n\t$view = new viewModel();\n\t$view->showNav();\t\n}", "public function show(Navbar $navbar)\n {\n }", "private function displayNav()\n {\n\n $links = array(\n 'home',\n 'browse',\n 'about',\n 'contact',\n );\n\n //Navbar\n $html = '<div id=\"navbar\">' . \"\\n\";\n $html .= '<ul>' . \"\\n\";\n\n // Loop through the links\n foreach ($links as $link) {\n\n $html .= '<li><a href=\"index.php?page=' . $link . '\"';\n\n if ($link == $_GET['page']) {\n $html .= ' class=\"active\"';\n }\n\n $html .= '>';\n\n if ($this->model->userLoggedIn && $link == 'home') {\n $html .= 'My Profile';\n } else {\n $html .= ucfirst($link);\n }\n\n $html .= '</a></li>' . \"\\n\";\n\n }\n\n $html .= '</ul>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n return $html;\n }", "public function show(Navbar $navbar)\n {\n //\n }", "function showMenu()\n {\n $menu = config('app.menu') ;\n\n $text = '' ;\n \n\n foreach ($menu as $name => $item)\n {\n $active = false ;\n \n if(isset($item['dropdown']))\n {\n $text .= '<li class=\"dropdown menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> '. PHP_EOL;\n }\n else \n {\n $text .= '<li class=\"menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($item['action']) ? route($item['action']) : '' ).'\">' . PHP_EOL;\n }\n\n $text .= '<i class=\"'. $item['icon'] .'\"></i>'. PHP_EOL;\n $text .= '<span>'. $item['title'] .'</span>'. PHP_EOL;\n \n if(isset($item['dropdown']))\n {\n $text .= '<b class=\"caret\"></b>';\n $text .= '</a>'. PHP_EOL;\n $text .= '<ul class=\"dropdown-menu\">' ;\n foreach ($item['dropdown'] as $subName => $subItem) \n {\n $text .= '<li>' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($subItem['action']) ? route($subItem['action']) : '' ).'\">' . PHP_EOL;\n $text .= '<span>'. $subItem['title'] .'</span>'. PHP_EOL;\n $text .= '</a>'. PHP_EOL; \n $text .= '</li>'. PHP_EOL;\n\n $active = (!$active && isset($subItem['action'])) \n ? $subItem['action'] == Request::route()->getName() : $active ; \n }\n $text .= '</ul>' ;\n }\n else \n {\n $text .= '</a>'. PHP_EOL;\n $active = (!$active && isset($item['action'])) \n ? $item['action'] == Request::route()->getName() : $active ;\n }\n\n $text .= '</li>'. PHP_EOL;\n\n if($active)\n {\n $text = str_replace('menu-'. $name , 'active', $text);\n }\n }\n\n return $text ;\n }", "public function navbar() {\n $items = $this->page->navbar->get_items();\n $breadcrumbs = array();\n foreach ($items as $item) {\n $item->hideicon = true;\n $breadcrumbs[] = $this->render($item);\n }\n $divider = '<span class=\"divider\">/</span>';\n $list_items = '<li>'.join(\" $divider</li><li>\", $breadcrumbs).'</li>';\n $title = '<span class=\"accesshide\">'.get_string('pagepath').'</span>';\n return $title . \"<ul class=\\\"breadcrumb\\\">$list_items</ul>\";\n }", "public function render()\n {\n return view('components.nav.menu-sub-item');\n }", "public function render()\n {\n return view('components.navbar-nav');\n }", "public function render_navbar($items, $active = NULL) {\n $this->config['type_class'] = 'navbar-nav';\n return $this->render($items, $active); \n }", "public function render()\n {\n if ($this->shown) {\n return view('components.navigation-item');\n }\n return '';\n }", "function showLocalNav()\n {\n $nav = new LoginGroupNav($this);\n $nav->show();\n }", "protected function navbar()\n\t{\n\t\tif($this->action->Id == 'show')\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\treturn parent::navbar();\n\t}", "public function show(Item $item)\n {\n \n }", "public function show(Item $item)\n {\n //\n }", "public function show(Item $item)\n {\n //\n }", "public function show(Item $item)\n {\n }", "public function show($id)\n {\n $item = $this->itemCRUD->find($id);\n\n $this->load->view('theme/header');\n $this->load->view('items/show',array('item'=>$item));\n $this->load->view('theme/footer');\n }", "function simple_bootstrap_display_main_menu() {\n wp_nav_menu(\n array( \n 'theme_location' => 'main_nav', /* where in the theme it's assigned */\n 'menu_class' => 'navbar-nav mr-auto',\n 'container' => false, /* container class */\n 'depth' => 2,\n 'walker' => new simple_bootstrap_Bootstrap_walker(),\n )\n );\n}", "public function render()\n\t{\n\t\treturn view('components.navbar');\n\t}", "public function navbarNav(array $items, $currentPath = null, array $option = [])\n {\n $option = array_replace_recursive([\n // ul class\n 'class' => 'nav navbar-nav',\n // append ul class\n 'appendClass' => '',\n // ul > li attr\n 'parentAttr' => [\n 'class' => 'dropdown',\n ],\n // ul > li > a attr\n 'parentItemAttr' => [\n 'class' => 'dropdown-toggle',\n 'data-toggle' => 'dropdown',\n 'role' => 'button',\n 'aria-haspopup' => 'true',\n 'aria-expanded' => 'false',\n ],\n // ul > li > ul attr\n 'childGroupAttr' => [\n 'class' => 'dropdown-menu',\n ],\n // ul > li > ul > li\n 'childAttr' => [\n ],\n // ul > li > ul > li > a\n 'childItemAttr' => [\n ],\n 'useCaret'=>true,\n ], $option);\n\n $app = App::instance();\n $role = $app->service(User::class)->get('role');\n $str = '';\n foreach ($items as $item) {\n $item += [\n 'path' => null,\n 'label' => null,\n 'items' => [],\n 'roles' => [],\n ];\n if ($item['roles'] && !in_array($role, $item['roles'])) {\n continue;\n }\n $list = '';\n $strChild = '';\n $active = $currentPath === $item['path'];\n $parentAttr = [];\n $parentItemAttr = [];\n $childGroupAttr = $option['childGroupAttr'];\n $childAttr = $option['childAttr'];\n $childItemAttr = $option['childItemAttr'];\n $childCounter = 0;\n\n if (count($item['items'])) {\n $activeFromChild = false;\n foreach ($item['items'] as $child) {\n $child += [\n 'path' => null,\n 'label' => null,\n 'roles' => [],\n ];\n\n if ($child['roles'] && !in_array($role, $child['roles'])) {\n continue;\n }\n\n $childCounter++;\n $childActive = $currentPath === $child['path'];\n if (!$activeFromChild) {\n $activeFromChild = $childActive;\n $active = $activeFromChild;\n }\n $url = '#'===$child['path']?'#':$app->url($child['path']);\n $strChild .= '<li'\n . $this->renderAttributes($childAttr, ['class'=>$childActive?'active':''])\n . '>'\n . '<a'\n . $this->renderAttributes(['href'=>$url]+$childItemAttr)\n . '>'\n . $child['label']\n . '</a>'\n . '</li>';\n }\n if ($childCounter) {\n $parentAttr += $option['parentAttr'];\n $parentItemAttr += $option['parentItemAttr'];\n $strChild = '<ul'\n . $this->renderAttributes($childGroupAttr)\n . '>'\n . $strChild\n . '</ul>';\n if ($option['useCaret']) {\n $item['label'] .= ' <span class=\"caret\"></span>';\n }\n } else {\n $strChild = '';\n }\n }\n\n if (count($item['items']) && 0 === $childCounter) {\n continue;\n }\n $url = '#'===$item['path']?'#':$app->url($item['path']);\n $str .= '<li'\n . $this->renderAttributes($parentAttr, ['class'=>$active?'active':''])\n . '>'\n . '<a'\n . $this->renderAttributes(['href'=>$url]+$parentItemAttr)\n . '>'\n . $item['label']\n . '</a>'\n . $strChild\n . '</li>';\n }\n $str = '<ul'\n . $this->renderAttributes(['class'=>$option['class']], ['class'=>$option['appendClass']])\n . '>'\n . $str\n . '</ul>';\n\n return $str;\n }", "private function menu()\n {\n $data['links'] = ['create', 'read', 'update', 'delete'];\n\n return $this->view->render($data, 'home/menu');\n }", "public function render()\n {\n return view('components.bottom-nav-item');\n }", "function displayNav() {\n\t\t\n\t\t$menu = getList(0);\n\t\t$count = 1;\n\t\t$nav = preg_replace('/xx/', 'nav', $menu, $count);\n\t\treturn $nav;\n\t\t\n\t\t\n\t}", "public function show(Item $item)\n {\n return view('items::show_item',compact('item'));\n }", "public function showMenu() {\n return view('user.menu'); \n }", "function get_navbar($menu) \n{\n\t$html = \"<nav class='navbar'>\\n\";\n\tforeach($menu['items'] as $item) \n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t$html .= \"<p><a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\\n</p>\";\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}" ]
[ "0.64215195", "0.62156564", "0.6157794", "0.59607846", "0.595352", "0.59473926", "0.5920532", "0.58791655", "0.58746207", "0.5839474", "0.58216494", "0.57767886", "0.5764409", "0.5718459", "0.56758004", "0.56319344", "0.5626114", "0.5593575", "0.5593575", "0.5593471", "0.5534553", "0.54939175", "0.54931235", "0.5467567", "0.54611415", "0.54345655", "0.54298097", "0.5428546", "0.5417963", "0.54099536" ]
0.6733969
0
Tests that an image with the sizes attribute is output correctly.
public function testThemeImageWithSizes() { // Test with multipliers. $sizes = '(max-width: ' . rand(10, 30) . 'em) 100vw, (max-width: ' . rand(30, 50) . 'em) 50vw, 30vw'; $image = [ '#theme' => 'image', '#sizes' => $sizes, '#uri' => reset($this->testImages), '#width' => rand(0, 1000) . 'px', '#height' => rand(0, 500) . 'px', '#alt' => $this->randomMachineName(), '#title' => $this->randomMachineName(), ]; $this->render($image); // Make sure sizes is set. $this->assertRaw($sizes, 'Sizes is set correctly.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetImageSize()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'Expected image size to be 516x710 pixels.'\n );\n\n if (extension_loaded('imagick')) {\n $img = new P4Cms_Image();\n try {\n $img->getImageSize();\n $this->fail('Expected failure with empty Imagick object.');\n } catch (P4Cms_Image_Exception $e) {\n $this->assertSame(\n $e->getMessage(),\n \"Can not get image size: no image data were set.\"\n );\n } catch (Exception $e) {\n $this->fail('Unexpected exception: '. $e->getMessage());\n }\n } else {\n $this->markTestIncomplete(\"Cannot verify default driver, 'imagick' extension not found.\");\n }\n }", "public function testMultipleSizesAsString() {\n $this->assertEquals([\n ['width' => 200],\n ['width' => 400],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200,400,600'));\n }", "function has_image_size($name)\n {\n }", "public function test_resize() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$imagick_image_editor->resize( 100, 50 );\n\n\t\t$this->assertSame(\n\t\t\tarray(\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t),\n\t\t\t$imagick_image_editor->get_size()\n\t\t);\n\t}", "public function add_image_sizes() {\n\t\tif ( ! is_array( $this->image_sizes ) || empty( $this->image_sizes ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ( $this->image_sizes as $key => $value ) {\n\t\t\tforeach ( $value as $name => $attributes ) {\n\t\t\t\tif ( empty( $attributes ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( isset( $attributes->width ) && ! empty( $attributes->width ) && isset( $attributes->height ) && ! empty( $attributes->height ) && isset( $attributes->crop ) ) {\n\t\t\t\t\tadd_image_size( $name, $attributes->width, $attributes->height, $attributes->crop );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function test_resize() {\n\n\t\t$file = DIR_TESTDATA . '/images/gradient-square.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$imagick_image_editor->resize( 100, 50 );\n\n\t\t$this->assertEquals( array( 'width' => 50, 'height' => 50 ), $imagick_image_editor->get_size() );\n\t}", "function testImageSize()\r\n {\r\n $nautilus = $this->nautilus->uploadDir('/tmp');\r\n $nautilus->limitSize(array(\"min\" => 1, \"max\" => 33122));\r\n $image = array('name' => $this->testingImage,\r\n 'type' => 'image/jpeg',\r\n 'size' => 542,\r\n 'tmp_name' => $this->testingImage,\r\n 'error' => 0\r\n );\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n $this->assertEquals('/tmp/nautilus_test_image.jpeg',$upload);\r\n\r\n /*give it invalid 'max' size*/\r\n $nautilus = $this->nautilus;\r\n $nautilus->limitSize(array(\"min\" => 1, \"max\" => 22));\r\n $image = array('name' => $this->testingImage,\r\n 'type' => 'image/jpeg',\r\n 'size' => 542,\r\n 'tmp_name' => $this->testingImage,\r\n 'error' => 0\r\n );\r\n $this->setExpectedException('Image\\ImageException','File sizes must be between 1 to 22 bytes');\r\n $upload = $nautilus->upload($image,'nautilus_test_image');\r\n\r\n }", "public function test_single_multi_resize() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$sizes_array = array(\n\t\t\tarray(\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 50,\n\t\t\t),\n\t\t);\n\n\t\t$resized = $imagick_image_editor->multi_resize( $sizes_array );\n\n\t\t# First, check to see if returned array is as expected\n\t\t$expected_array = array(\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-50x33.jpg',\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 33,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-50x33.jpg' ),\n\t\t\t),\n\t\t);\n\n\t\t$this->assertSame( $expected_array, $resized );\n\n\t\t// Now, verify real dimensions are as expected\n\t\t$image_path = DIR_TESTDATA . '/images/' . $resized[0]['file'];\n\t\t$this->assertImageDimensions(\n\t\t\t$image_path,\n\t\t\t$expected_array[0]['width'],\n\t\t\t$expected_array[0]['height']\n\t\t);\n\t}", "public function size()\n { \n $props = $this->uri->ruri_to_assoc();\n\n if (!isset($props['o'])) exit(0);\n $w = -1;\n $h = -1;\n $m = 0;\n if (isset($props['w'])) $w = $props['w'];\n if (isset($props['h'])) $h = $props['h'];\n if (isset($props['m'])) $m = $props['m'];\n\n $this->img->set_img($props['o']);\n $this->img->set_size($w, $h, $m);\n $this->img->set_square($m);\n $this->img->get_img();\n }", "public function testMultipleSizesAsStringWrappedInArray() {\n $this->assertEquals([\n ['width' => 200],\n ['width' => 400],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor(['200,400,600']));\n }", "function imageCheck($target,$width=1,$height=1){\n if($width==1&&$height==1){\n return is_array(getimagesize($target));\n }else{\n $rvalue = false;\n if(is_array(getimagesize($target))){\n try {\n $img = new Imagick($target);\n if(strtoupper($img->getImageFormat())=='GIF'){\n $img = $img->coalesceImages();\n $img = $img->coalesceImages();\n do {\n if($width==0||$height==0)\n $img->resizeImage($width, $height, Imagick::FILTER_BOX, 1);\n else $img->resizeImage($width, $height, Imagick::FILTER_BOX, 1,true);\n } while ($img->nextImage());\n $img = $img->deconstructImages();\n $img->writeImages($target,true);\n }else{\n if($width==0||$height==0)\n $img->thumbnailImage($width, $height);\n else $img->thumbnailImage($width, $height,true);\n $img->writeImage($target);\n }\n $img->destroy();\n $rvalue = true;\n } catch (Exception $e) {\n }\n }\n return $rvalue;\n }\n}", "public function test_multi_resize() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$sizes_array = array(\n\n\t\t\t/**\n\t\t\t * #0 - 10x10 resize, no cropping.\n\t\t\t * By aspect, should be 10x6 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 10,\n\t\t\t\t'height' => 10,\n\t\t\t\t'crop' => false,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #1 - 75x50 resize, with cropping.\n\t\t\t * Output dimensions should be 75x50\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t\t'crop' => true,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #2 - 20 pixel max height, no cropping.\n\t\t\t * By aspect, should be 30x20 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 9999, # Arbitrary High Value\n\t\t\t\t'height' => 20,\n\t\t\t\t'crop' => false,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #3 - 45 pixel max height, with cropping.\n\t\t\t * By aspect, should be 45x400 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 45,\n\t\t\t\t'height' => 9999, # Arbitrary High Value\n\t\t\t\t'crop' => true,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #4 - 50 pixel max width, no cropping.\n\t\t\t * By aspect, should be 50x33 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 50,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #5 - 55 pixel max width, no cropping, null height\n\t\t\t * By aspect, should be 55x36 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 55,\n\t\t\t\t'height' => null,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #6 - 55 pixel max height, no cropping, no width specified.\n\t\t\t * By aspect, should be 82x55 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'height' => 55,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #7 - 60 pixel max height, no cropping, null width.\n\t\t\t * By aspect, should be 90x60 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => null,\n\t\t\t\t'height' => 60,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #8 - 70 pixel max height, no cropping, negative width.\n\t\t\t * By aspect, should be 105x70 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => -9999, # Arbitrary Negative Value\n\t\t\t\t'height' => 70,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #9 - 200 pixel max width, no cropping, negative height.\n\t\t\t * By aspect, should be 200x133 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 200,\n\t\t\t\t'height' => -9999, # Arbitrary Negative Value\n\t\t\t),\n\t\t);\n\n\t\t$resized = $imagick_image_editor->multi_resize( $sizes_array );\n\n\t\t$expected_array = array(\n\n\t\t\t// #0\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-10x7.jpg',\n\t\t\t\t'width' => 10,\n\t\t\t\t'height' => 7,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-10x7.jpg' ),\n\t\t\t),\n\n\t\t\t// #1\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-75x50.jpg',\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-75x50.jpg' ),\n\t\t\t),\n\n\t\t\t// #2\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-30x20.jpg',\n\t\t\t\t'width' => 30,\n\t\t\t\t'height' => 20,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-30x20.jpg' ),\n\t\t\t),\n\n\t\t\t// #3\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-45x400.jpg',\n\t\t\t\t'width' => 45,\n\t\t\t\t'height' => 400,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-45x400.jpg' ),\n\t\t\t),\n\n\t\t\t// #4\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-50x33.jpg',\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 33,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-50x33.jpg' ),\n\t\t\t),\n\n\t\t\t// #5\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-55x37.jpg',\n\t\t\t\t'width' => 55,\n\t\t\t\t'height' => 37,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-55x37.jpg' ),\n\t\t\t),\n\n\t\t\t// #6\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-83x55.jpg',\n\t\t\t\t'width' => 83,\n\t\t\t\t'height' => 55,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-83x55.jpg' ),\n\t\t\t),\n\n\t\t\t// #7\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-90x60.jpg',\n\t\t\t\t'width' => 90,\n\t\t\t\t'height' => 60,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-90x60.jpg' ),\n\t\t\t),\n\n\t\t\t// #8\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-105x70.jpg',\n\t\t\t\t'width' => 105,\n\t\t\t\t'height' => 70,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-105x70.jpg' ),\n\t\t\t),\n\n\t\t\t// #9\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-200x133.jpg',\n\t\t\t\t'width' => 200,\n\t\t\t\t'height' => 133,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-200x133.jpg' ),\n\t\t\t),\n\t\t);\n\n\t\t$this->assertNotNull( $resized );\n\t\t$this->assertSame( $expected_array, $resized );\n\n\t\tforeach ( $resized as $key => $image_data ) {\n\t\t\t$image_path = DIR_TESTDATA . '/images/' . $image_data['file'];\n\n\t\t\t// Now, verify real dimensions are as expected\n\t\t\t$this->assertImageDimensions(\n\t\t\t\t$image_path,\n\t\t\t\t$expected_array[ $key ]['width'],\n\t\t\t\t$expected_array[ $key ]['height']\n\t\t\t);\n\t\t}\n\t}", "public function testRangeWithIntermediateSizes() {\n $this->assertEquals([\n ['width' => 200],\n ['width' => 300],\n ['width' => 400],\n ['width' => 500],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,3'));\n \n\n $this->assertEquals([\n ['width' => 200],\n ['width' => 280],\n ['width' => 360],\n ['width' => 440],\n ['width' => 520],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,4'));\n \n\n $this->assertEquals([\n ['width' => 200],\n ['width' => 267],\n ['width' => 333],\n ['width' => 400],\n ['width' => 467],\n ['width' => 533],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,5'));\n }", "public function testResizeIfNeededNeeded()\n {\n $resized = Processor::resizeIfNeeded('/app/tests/tall-image.jpg', true);\n $this->assertTrue($resized);\n }", "function register_image_sizes() {\n\t}", "public function register_image_sizes() {\n\n }", "public function test_resize_and_crop() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$imagick_image_editor->resize( 100, 50, true );\n\n\t\t$this->assertSame(\n\t\t\tarray(\n\t\t\t\t'width' => 100,\n\t\t\t\t'height' => 50,\n\t\t\t),\n\t\t\t$imagick_image_editor->get_size()\n\t\t);\n\t}", "public function GetImageSize() {\n\n return $this->IsValid()\n ? @getimagesize($this->TmpName) // @ - prevent warning on reading non-images\n : false;\n }", "public function testGetImageInfoFromBlob()\n {\n $imgBlob = file_get_contents($this->_testImagePath);\n $imgInfo = Tinebase_ImageHelper::getImageInfoFromBlob($imgBlob);\n \n $this->assertEquals($this->_testImageData['width'], $imgInfo['width']);\n }", "public function test_resize_and_crop() {\n\n\t\t$file = DIR_TESTDATA . '/images/gradient-square.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$imagick_image_editor->resize( 100, 50, true );\n\n\t\t$this->assertEquals( array( 'width' => 100, 'height' => 50 ), $imagick_image_editor->get_size() );\n\t}", "public function testDimensionsValidation(): void\n {\n $builder = new ValidationBuilder();\n $builder->validate(\"avatar\", function (Field $field): void {\n $field->dimensions(function(Dimensions $dimensions): void {\n $dimensions->ratio(3/2)->width(100);\n });\n });\n\n $rules = $builder->getRules();\n\n $this->assertCount(1, $rules);\n $this->assertEquals([\"dimensions:ratio=1.5,width=100\"], $rules[\"avatar\"]);\n }", "public function hasSizes() {\n if (!empty($this->cropBox['width'])) {\n return TRUE;\n }\n\n if (!empty($this->cropBox['height'])) {\n return TRUE;\n }\n\n return FALSE;\n }", "protected function extractSvgImageSizes() {}", "function get_image_size_dimensions($size) {\n\t\tglobal $_wp_additional_image_sizes;\n\t\tif (isset($_wp_additional_image_sizes[$size])) {\n\t\t\t$width = intval($_wp_additional_image_sizes[$size]['width']);\n\t\t\t$height = intval($_wp_additional_image_sizes[$size]['height']);\n\t\t} else {\n\t\t\t$width = get_option($size.'_size_w');\n\t\t\t$height = get_option($size.'_size_h');\n\t\t}\n\n\t\tif ( $width && $height ) {\n\t\t\treturn array(\n\t\t\t\t'width' => $width,\n\t\t\t\t'height' => $height\n\t\t\t);\n\t\t} else return false;\n\t}", "public function testSaveWithQualityImageEquals(): void\n {\n $thumb = $this->getThumbCreatorInstance()->resize(200)->save(['quality' => 10]);\n $this->assertImageFileEquals('resize_w200_h200_quality_10.jpg', $thumb);\n }", "function testImageSize()\n {\n $bulletproof = $this->bulletproof->uploadDir('/tmp');\n $bulletproof->limitSize(array(\"min\" => 1, \"max\" => 33122));\n $image = array('name' => $this->testingImage,\n 'type' => 'image/jpeg',\n 'size' => 542,\n 'tmp_name' => $this->testingImage,\n 'error' => 0\n );\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n $this->assertEquals('/tmp/bulletproof_test_image.jpeg',$upload);\n\n /*give it invalid 'max' size*/\n $bulletproof = $this->bulletproof;\n $bulletproof->limitSize(array(\"min\" => 1, \"max\" => 22));\n $image = array('name' => $this->testingImage,\n 'type' => 'image/jpeg',\n 'size' => 542,\n 'tmp_name' => $this->testingImage,\n 'error' => 0\n );\n $this->setExpectedException('ImageUploader\\ImageUploaderException','File sizes must be between 1 to 22 bytes');\n $upload = $bulletproof->upload($image,'bulletproof_test_image');\n\n }", "function get_intermediate_image_sizes()\n {\n }", "public function IncorrectImagePixelSize()\n\t{\n\t\tglobal $ft_dom;\n\t\t$code = array('');\t\t\t\n\t\t$elements = $ft_dom->getElementsByTagName('img');\n\t\t$img_array = array();\n\t\t$badimg = array();\n\t\t$code[1] = 0;\n\t\t$code[2] = '';\n\t\t$max_resource_tests = 50;\n\n\t foreach ($elements as $element) { \n\t\t\t//don't try to do too many.\n\t\t\tif(count($img_array) > $max_resource_tests) { continue; }\n\t\t\tif(Helper::likelyPixel($element)) { continue; }\n\t\t\tif($element->hasAttribute('src')) {\n\t\t\t\t//if((!$element->hasAttribute('width') && $element->hasAttribute('style')) && Helper::hasInlineStyleAttribute($element->getAttribute('style'),'width')) { echo \"width set inline.\"; }\n\t\t\t\tif(in_array($element->getAttribute('src'),$img_array)) { continue; }\n\t\t\t\t\n\t\t\t\tif ($element->hasAttribute('width') || $element->hasAttribute('height')) {\n\t\t\t\t\t$link = Helper::getAbsoluteResourceLink($element->getAttribute('src'));\n\t\t\t\t\t\n\t\t\t\t\tif(Helper::http200Test($link)) { \n\t\t\t\t\t\t\n\t\t\t\t\t\tlist($width, $height) = getimagesize($link);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($element->hasAttribute('width')) {\n\t\t\t\t\t\t\t//echo \"\\n\\nwidth:\" . $element->getAttribute('width') . \"\\n\";\n\n\t\t\t\t\t\t\tif($element->getAttribute('width') != $width) {\n\t\t\t\t\t\t\t\tif($code[1] <= Helper::$max_disp_threshold) { $code[0] .= Helper::printCodeWithLineNumber($element) . \"\\nshould be width=\\\"$width\\\"\"; }\n\t\t\t\t\t\t\t\t$badimg[] = $element;\n\t\t\t\t\t\t\t\t$code[1]++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($element->hasAttribute('height')) {\n\n\t\t\t\t\t\t\tif($element->getAttribute('height') != $height) {\n\t\t\t\t\t\t\t\tif($code[1] <= Helper::$max_disp_threshold) {\n\t\t\t\t\t\t\t\t\tif(in_array($element, $badimg)) {\n\t\t\t\t\t\t\t\t\t\t$code[0] .= \"\\n and height=\\\"$height\\\"(\" .$element->getAttribute('src') . \")\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$code[0] .= Helper::printCodeWithLineNumber($element) . \"\\nshould be height=\\\"$height\\\"\";\n\t\t\t\t\t\t\t\t\t\t$code[1]++;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\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(in_array($element, $badimg)) { $code[0] .= \"\\n\\n\"; }\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$img_array[] = $element->getAttribute('src');\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tif($code[0] != '') {\n\t\t\tif($code[1] > Helper::$max_disp_threshold) { $code[0] .= '...'; }\n\t\t\tif($code[1] > 1) { $code[2] = 's'; }\t\t\t\n\t\t\treturn $code;\n\t\t}\n\t return false;\n\t}", "function custom_image_sizes() {\n}", "public function test_multi_resize_does_not_create() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$sizes_array = array(\n\t\t\tarray(\n\t\t\t\t'width' => 0,\n\t\t\t\t'height' => 0,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => 0,\n\t\t\t\t'height' => 0,\n\t\t\t\t'crop' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => null,\n\t\t\t\t'height' => null,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => null,\n\t\t\t\t'height' => null,\n\t\t\t\t'crop' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => '',\n\t\t\t\t'height' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => '',\n\t\t\t\t'height' => '',\n\t\t\t\t'crop' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => 0,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => 0,\n\t\t\t\t'crop' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => null,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => null,\n\t\t\t\t'crop' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => '',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'width' => '',\n\t\t\t\t'crop' => true,\n\t\t\t),\n\t\t);\n\n\t\t$resized = $imagick_image_editor->multi_resize( $sizes_array );\n\n\t\t// If no images are generated, the returned array is empty.\n\t\t$this->assertEmpty( $resized );\n\t}" ]
[ "0.75862247", "0.72801906", "0.70403594", "0.6863978", "0.68473136", "0.6840969", "0.6813828", "0.6798351", "0.67464435", "0.6742632", "0.6654979", "0.66335624", "0.66272706", "0.6580212", "0.6572993", "0.65184814", "0.6504699", "0.65030384", "0.64962995", "0.64300084", "0.6406655", "0.64007187", "0.63840324", "0.63711804", "0.6370238", "0.63677645", "0.63434273", "0.63359755", "0.6320475", "0.6315422" ]
0.73105574
1
Tests that an image with the src attribute is output correctly.
public function testThemeImageWithSrc() { $image = [ '#theme' => 'image', '#uri' => reset($this->testImages), '#width' => rand(0, 1000) . 'px', '#height' => rand(0, 500) . 'px', '#alt' => $this->randomMachineName(), '#title' => $this->randomMachineName(), ]; $this->render($image); // Make sure the src attribute has the correct value. $this->assertRaw($this->fileUrlGenerator->generateString($image['#uri']), 'Correct output for an image with the src attribute.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_it_loads_an_image_string_into_a_resource()\n {\n imagepng(imagecreatefromstring($this->imagePath), $this->compareTestSaveLocation);\n imagepng($this->image->getImageResource(), $this->testImageSaveLocation);\n\n $correctImage = file_get_contents($this->compareTestSaveLocation);\n $testImage = file_get_contents($this->testImageSaveLocation);\n\n $this->assertEquals($correctImage, $testImage);\n }", "public function testS2imageShouldBeAdded()\n {\n $imageLabel = 'someText';\n $imageUrl = '';\n $expected = 0;\n $actual = imageShouldBeAdded($imageLabel, $imageUrl);\n $this->assertEquals($expected, $actual);\n }", "public function testGetImage() {\n\t\t$instance = new ImageObject( 123 );\n\n\t\t$this->assertNull(\n\t\t\t$instance->getImage( 123 ),\n\t\t\t'An ImageObject inside an ImageObject? Are you mad?!'\n\t\t);\n\t}", "public function testGetImageIfIsNull(): void\n {\n $result = $this->subject->getImage();\n\n $this->assertNull($result);\n }", "public function testSimageShouldBeAdded()\n {\n $imageLabel = 'someText';\n $imageUrl = 'someOtherText';\n $expected = 1;\n $actual = imageShouldBeAdded($imageLabel, $imageUrl);\n $this->assertEquals($expected, $actual);\n }", "abstract protected function processImage (string $src): string;", "public function testImageConfiguration()\n {\n $this->runConfigurationAssertions(new Image(), [\n 'imgable_type',\n 'url',\n 'imgable_id',\n ]);\n }", "public static function test_image($source) {\n\t\tif (strlen($source) < 10) {\n\t\t\tdebug_event('Art', 'Invalid image passed', 1);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check to make sure PHP:GD exists. If so, we can sanity check\n\t\t// the image.\n\t\tif (function_exists('ImageCreateFromString')) {\n\t\t\t $image = ImageCreateFromString($source);\n\t\t\t if (!$image || imagesx($image) < 5 || imagesy($image) < 5) {\n\t\t\t\tdebug_event('Art', 'Image failed PHP-GD test',1);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function testThemeImageWithSrcsetWidth() {\n // Test with multipliers.\n $widths = [\n rand(0, 500) . 'w',\n rand(500, 1000) . 'w',\n ];\n $image = [\n '#theme' => 'image',\n '#srcset' => [\n [\n 'uri' => $this->testImages[0],\n 'width' => $widths[0],\n ],\n [\n 'uri' => $this->testImages[1],\n 'width' => $widths[1],\n ],\n ],\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure the srcset attribute has the correct value.\n $this->assertRaw($this->fileUrlGenerator->generateString($this->testImages[0]) . ' ' . $widths[0] . ', ' . $this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[1])) . ' ' . $widths[1], 'Correct output for image with srcset attribute and width descriptors.');\n }", "public function testS4imageShouldBeAdded()\n {\n $imageLabel = '';\n $imageUrl = '';\n $expected = 0;\n $actual = imageShouldBeAdded($imageLabel, $imageUrl);\n $this->assertEquals($expected, $actual);\n }", "public function testValidateDocumentPngValidation()\n {\n }", "function htmlImages($src)\n{\n\treturn '<img src=' . $src . '>';\n}", "public function testGetImage()\n {\n // TODO: How to mock a file?\n }", "public function testS3imageShouldBeAdded()\n {\n $imageLabel = '';\n $imageUrl = 'someText';\n $expected = 0;\n $actual = imageShouldBeAdded($imageLabel, $imageUrl);\n $this->assertEquals($expected, $actual);\n }", "public function assertImagePresent(string $filename): void {\n // Drupal appends an underscore and a number to the filename when duplicate\n // files are uploaded, for example when a test runs more then once.\n // We split up the filename and extension and match for both.\n $parts = pathinfo($filename);\n $extension = $parts['extension'];\n $filename = $parts['filename'];\n $this->assertSession()->elementExists('css', \"img[src$='.$extension'][src*='$filename']\");\n }", "public function test_cl_image_tag_srcset()\n {\n $expected_tag = self::get_expected_cl_image_tag(\n self::$public_id,\n self::$common_transformation_str,\n '',\n self::$breakpoints_arr\n );\n\n $tag_with_breakpoints = cl_image_tag(\n self::$public_id,\n array_merge(\n self::$common_image_options,\n array('srcset' => self::$common_srcset)\n )\n );\n\n $this->assertEquals(\n $expected_tag,\n $tag_with_breakpoints,\n 'Should create img srcset attribute with provided breakpoints'\n );\n }", "public function testGetValidImageByImagePath () {\n\t\t//count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"image\");\n\n\t\t//create a new Image and insert it into MySQL\n\t\t$image = new Image(null, $this->VALID_IMAGEPATH, $this->VALID_IMAGETYPE);\n\t\t$image->insert($this->getPDO());\n\n\t\t//grab the data from MySQL and enforce the fields match our expectations\n\t\t$results = Image::getImageByImagePath($this->getPDO(), $image->getImagePath());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"image\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\DevConnect\\\\Image\", $results);\n\n\t\t//grab the results from the array and validate it\n\t\t$pdoImage = $results[0];\n\t\t$this->assertEquals($pdoImage->getImageId(), $image->getImageId());\n\t\t$this->assertEquals($pdoImage->getImagePath(), $this->VALID_IMAGEPATH);\n\t\t$this->assertEquals($pdoImage->getImageType(), $this->VALID_IMAGETYPE);\n\t}", "public function testValidateDocumentImageValidation()\n {\n }", "public function testGetInvalidImageByImagePath() {\n\t\t//grab an image by searching for content that does not exist\n\t\t$image = Image::getImageByImagePath($this->getPDO(), \"this image is not found\");\n\t\t$this->assertCount(0, $image);\n\t}", "public function testImage()\n {\n $uploadedFile = new UploadedFile(__DIR__ . '/../Mock/image_10Mb.jpg', 'image.jpg');\n $user = new User();\n $user->setEmail('[email protected]')\n ->setImage($uploadedFile);\n $constraintViolationList = $this->validator->validate($user, null, [User::VALIDATION_GROUP_DEFAULT]);\n Assert::assertEquals('image', $constraintViolationList->get(0)->getPropertyPath());\n\n $user->setImage(null);\n $constraintViolationList = $this->validator->validate($user, null, [User::VALIDATION_IMAGE_REQUIRED]);\n Assert::assertEquals('image', $constraintViolationList->get(0)->getPropertyPath());\n }", "public function isValidImage()\n\t{\n\t\t$src = $this->source_path;\n\t\t$extension = \\strtolower(\\substr($src, (\\strrpos($src, '.') + 1)));\n\n\t\tif (!\\in_array($extension, $this->image_extensions)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$r = @\\imagecreatefromstring(\\file_get_contents($src));\n\n\t\treturn \\is_resource($r) && \\get_resource_type($r) === 'gd';\n\t}", "public function testIsImageFile()\n {\n $this->assertTrue(Tinebase_ImageHelper::isImageFile($this->_testImagePath));\n $this->assertFalse(Tinebase_ImageHelper::isImageFile(__FILE__));\n }", "public function provideImageTests() {\n $result = [\n [[\n 'descr' => \"[img] produces an image.\",\n 'bbcode' => \"This is Google's logo: [img]http://www.google.com/intl/en_ALL/images/logo.gif[/img].\",\n 'html' => \"This is Google's logo: <img src=\\\"http://www.google.com/intl/en_ALL/images/logo.gif\\\" alt=\\\"logo.gif\\\" class=\\\"bbcode_img\\\" />.\",\n ]],\n [[\n 'descr' => \"[img] disallows a javascript: URL.\",\n 'bbcode' => \"This is Google's logo: [img]javascript:alert()[/img].\",\n 'html' => \"This is Google's logo: [img]javascript:alert()[/img].\",\n ]],\n [[\n 'descr' => \"[img] disallows a URL with an unknown protocol type.\",\n 'bbcode' => \"This is Google's logo: [img]foobar:bar.jpg[/img].\",\n 'html' => \"This is Google's logo: [img]foobar:bar.jpg[/img].\",\n ]],\n [[\n 'descr' => \"[img] disallows HTML content.\",\n 'bbcode' => \"This is Google's logo: [img]<a href='javascript:alert(\\\"foo\\\")'>click me</a>[/img].\",\n 'html' => \"This is Google's logo: [img]&lt;a href='javascript:alert(&quot;foo&quot;)'&gt;click me&lt;/a&gt;[/img].\",\n ]],\n [[\n 'descr' => \"[img] can produce a local image.\",\n 'bbcode' => \"This is a smiley: [img]smile.gif[/img].\",\n 'html' => \"This is a smiley: <img src=\\\"smileys/smile.gif\\\" alt=\\\"smile.gif\\\" class=\\\"bbcode_img\\\" />.\",\n ]],\n [[\n 'descr' => \"[img] can produce a local rooted URL.\",\n 'bbcode' => \"This is a smiley: [img]/smile.gif[/img].\",\n 'html' => \"This is a smiley: <img src=\\\"/smile.gif\\\" alt=\\\"smile.gif\\\" class=\\\"bbcode_img\\\" />.\",\n ]],\n [[\n 'descr' => \"[img] can produce a local relative URL.\",\n 'bbcode' => \"This is a smiley: [img]../smile.gif[/img].\",\n 'html' => \"This is a smiley: <img src=\\\"../smile.gif\\\" alt=\\\"smile.gif\\\" class=\\\"bbcode_img\\\" />.\",\n ]],\n [[\n 'descr' => \"[img=src] should produce an image.\",\n 'bbcode' => 'This is a smiley: [img=smile.gif?f=1&b=2][/img] okay?',\n 'html' => 'This is a smiley: <img src=\"smileys/smile.gif\" alt=\"smile.gif?f=1&amp;b=2\" class=\"bbcode_img\" /> okay?',\n ]]\n ];\n return $result;\n }", "public function testUrlGeneration() {\n\n\t\t$image = $this->getSampleImage();\n\n\t\t$this->assertTrue( !empty($image->ID) && $image->exists() );\n\n\t\t// Generate a thumb\n\t\t$colour = 'ffffff';\n\t\t$thumb = $image->Pad( self::WIDTH, self::HEIGHT, $colour );\n\t\t$this->assertTrue($thumb instanceof ThumboredImage);\n\t\t// Get its URL\n\t\t$url = $thumb->getAbsoluteURL();\n\n\t\t// Thumbor\\Url\\Builder\n\t\t$instance = $image->getUrlInstance();\n\t\t$this->assertTrue($instance instanceof ThumborUrlBuilder);//Phumbor\n\t\t$instance_url = $instance->__toString();\n\n\t\t$this->assertEquals($url, $instance_url);\n\n\t\t$this->getRemoteImageDimensions($url, $width, $height);\n\n\t\t$this->assertEquals($width, self::WIDTH);\n\t\t$this->assertEquals($height, self::HEIGHT);\n\n\t\t// Test that the _resampled thumb DOES NOT exist locally in /assets, which is the point of Thumbor\n\t\t$variant_name = $image->variantName('Pad', self::WIDTH, self::HEIGHT, $colour);\n\t\t$filename = $image->getFilename();\n\t\t$hash = $image->getHash();\n\t\t$exists = $this->asset_store->exists($filename, $hash, $variant_name);\n\n\t\t$this->assertTrue( !$exists, \"The variant name exists and it should not\" );\n\n\t}", "public function testImageQueryString() {\n\t\t$result = $this->Html->image('test.gif?one=two&three=four');\n\t\t$this->assertTags($result, array('img' => array('src' => 'img/test.gif?one=two&amp;three=four', 'alt' => '')));\n\n\t\t$result = $this->Html->image(array(\n\t\t\t'controller' => 'images',\n\t\t\t'action' => 'display',\n\t\t\t'test',\n\t\t\t'?' => array('one' => 'two', 'three' => 'four')\n\t\t));\n\t\t$this->assertTags($result, array('img' => array('src' => '/images/display/test?one=two&amp;three=four', 'alt' => '')));\n\t}", "public function testImageWithTimestampping() {\n\t\tConfigure::write('Asset.timestamp', 'force');\n\n\t\t$this->Html->request->webroot = '/';\n\t\t$result = $this->Html->image('cake.icon.png');\n\t\t$this->assertTags($result, array('img' => array('src' => 'preg:/\\/img\\/cake\\.icon\\.png\\?\\d+/', 'alt' => '')));\n\n\t\tConfigure::write('debug', 0);\n\t\tConfigure::write('Asset.timestamp', 'force');\n\n\t\t$result = $this->Html->image('cake.icon.png');\n\t\t$this->assertTags($result, array('img' => array('src' => 'preg:/\\/img\\/cake\\.icon\\.png\\?\\d+/', 'alt' => '')));\n\n\t\t$this->Html->request->webroot = '/testing/longer/';\n\t\t$result = $this->Html->image('cake.icon.png');\n\t\t$expected = array(\n\t\t\t'img' => array('src' => 'preg:/\\/testing\\/longer\\/img\\/cake\\.icon\\.png\\?[0-9]+/', 'alt' => '')\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\t}", "public function testGetImage() {\n\n $image = $this->client->getObject(static::DCX_IMAGE_ID);\n\n $this->assertTrue($image instanceof Image);\n $this->assertSame(static::DCX_IMAGE_ID, $image->data()['id']);\n $this->assertSame('fotolia_160447209.jpg', $image->data()['filename']);\n $this->assertSame(TRUE, $image->data()['status']);\n }", "public function image($img) {\n\t\tif (strpos($img, 'http') === false) {\t\t\n\t\t} else {\n\t\t\techo \"<img src='img/{$img}'>\";\n\t\t}\n\t}", "public function assertValidImageRegion($region) {\n $regionObj = $this->getRegion($region);\n $elements = $regionObj->findAll('css', 'img');\n if (empty($elements)) {\n throw new \\Exception(sprintf('No image was not found in the \"%s\" region on the page %s', $region, $this->getSession()->getCurrentUrl()));\n }\n\n if ($src = $elements[0]->getAttribute('src')) {\n $params = array('http' => array('method' => 'HEAD'));\n $context = stream_context_create($params);\n $fp = @fopen($src, 'rb', FALSE, $context);\n if (!$fp) {\n throw new \\Exception(sprintf('Unable to download <img src=\"%s\"> in the \"%s\" region on the page %s', $src, $region, $this->getSession()->getCurrentUrl()));\n }\n\n $meta = stream_get_meta_data($fp);\n fclose($fp);\n if ($meta === FALSE) {\n throw new \\Exception(sprintf('Error reading from <img src=\"%s\"> in the \"%s\" region on the page %s', $src, $region, $this->getSession()->getCurrentUrl()));\n }\n\n $wrapper_data = $meta['wrapper_data'];\n $found = FALSE;\n if (is_array($wrapper_data)) {\n foreach ($wrapper_data as $header) {\n if (substr(strtolower($header), 0, 19) == 'content-type: image') {\n $found = TRUE;\n }\n }\n }\n\n if (!$found) {\n throw new \\Exception(sprintf('Not a valid image <img src=\"%s\"> in the \"%s\" region on the page %s', $src, $region, $this->getSession()->getCurrentUrl()));\n }\n }\n else {\n throw new \\Exception(sprintf('No image had no src=\"...\" attribute in the \"%s\" region on the page %s', $region, $this->getSession()->getCurrentUrl()));\n }\n }", "public function testIfStockManagementHasImage()\n {\n $this->assertNotNull($this->stock->getImage());\n }" ]
[ "0.6883127", "0.66157275", "0.6597458", "0.6551573", "0.651266", "0.64515555", "0.6446536", "0.6428485", "0.63694066", "0.636573", "0.6355856", "0.6288904", "0.6258007", "0.62237185", "0.6217384", "0.62136537", "0.6148944", "0.6133649", "0.61302394", "0.6126889", "0.6106779", "0.6090472", "0.60793346", "0.6074975", "0.60736406", "0.6014184", "0.599768", "0.59843045", "0.59761477", "0.59500724" ]
0.74064183
0
Tests that an image with the srcset and multipliers is output correctly.
public function testThemeImageWithSrcsetMultiplier() { // Test with multipliers. $image = [ '#theme' => 'image', '#srcset' => [ [ 'uri' => $this->testImages[0], 'multiplier' => '1x', ], [ 'uri' => $this->testImages[1], 'multiplier' => '2x', ], ], '#width' => rand(0, 1000) . 'px', '#height' => rand(0, 500) . 'px', '#alt' => $this->randomMachineName(), '#title' => $this->randomMachineName(), ]; $this->render($image); // Make sure the srcset attribute has the correct value. $this->assertRaw($this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[0])) . ' 1x, ' . $this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[1])) . ' 2x', 'Correct output for image with srcset attribute and multipliers.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testThemeImageWithSrcsetWidth() {\n // Test with multipliers.\n $widths = [\n rand(0, 500) . 'w',\n rand(500, 1000) . 'w',\n ];\n $image = [\n '#theme' => 'image',\n '#srcset' => [\n [\n 'uri' => $this->testImages[0],\n 'width' => $widths[0],\n ],\n [\n 'uri' => $this->testImages[1],\n 'width' => $widths[1],\n ],\n ],\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure the srcset attribute has the correct value.\n $this->assertRaw($this->fileUrlGenerator->generateString($this->testImages[0]) . ' ' . $widths[0] . ', ' . $this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[1])) . ' ' . $widths[1], 'Correct output for image with srcset attribute and width descriptors.');\n }", "public function test_cl_image_tag_srcset()\n {\n $expected_tag = self::get_expected_cl_image_tag(\n self::$public_id,\n self::$common_transformation_str,\n '',\n self::$breakpoints_arr\n );\n\n $tag_with_breakpoints = cl_image_tag(\n self::$public_id,\n array_merge(\n self::$common_image_options,\n array('srcset' => self::$common_srcset)\n )\n );\n\n $this->assertEquals(\n $expected_tag,\n $tag_with_breakpoints,\n 'Should create img srcset attribute with provided breakpoints'\n );\n }", "public function test_srcset_invalid_values()\n {\n $invalid_breakpoints = array(\n array('sizes' => true), // srcset data not provided\n array('max_width' => 300, 'max_images' => 3), // no min_width\n array('min_width' => '1', 'max_width' => 300, 'max_images' => 3), // invalid min_width\n array('min_width' => 100, 'max_images' => 3), // no max_width\n array('min_width' => '1', 'max_width' => '3', 'max_images' => 3), // invalid max_width\n array('min_width' => 200, 'max_width' => 100, 'max_images' => 3), // min_width > max_width\n array('min_width' => 100, 'max_width' => 300), // no max_images\n array('min_width' => 100, 'max_width' => 300, 'max_images' => 0), // invalid max_images\n array('min_width' => 100, 'max_width' => 300, 'max_images' => -17), // invalid max_images\n array('min_width' => 100, 'max_width' => 300, 'max_images' => '3'), // invalid max_images\n array('min_width' => 100, 'max_width' => 300, 'max_images' => null), // invalid max_images\n );\n\n\n $err_log_original_destination = ini_get('error_log');\n // Suppress error messages in error log\n ini_set('error_log', '/dev/null');\n\n try {\n foreach ($invalid_breakpoints as $value) {\n $tag = cl_image_tag(\n self::$public_id,\n array_merge(self::$common_image_options, array('srcset' => $value))\n );\n\n self::assertNotContains(\"srcset\", $tag);\n }\n } catch (\\Exception $e) {\n ini_set('error_log', $err_log_original_destination);\n throw $e;\n }\n\n ini_set('error_log', $err_log_original_destination);\n }", "public function testSetGetImageHandler()\n {\n $sut = new Image_Processor_Adapter_Gd2();\n\n $ih = imagecreatetruecolor(1, 1);\n $this->assertInstanceOf(get_class($sut), $sut->setImageHandler($ih));\n $this->assertSame($ih, $sut->getImageHandler());\n }", "public function testRangeWithIntermediateSizes() {\n $this->assertEquals([\n ['width' => 200],\n ['width' => 300],\n ['width' => 400],\n ['width' => 500],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,3'));\n \n\n $this->assertEquals([\n ['width' => 200],\n ['width' => 280],\n ['width' => 360],\n ['width' => 440],\n ['width' => 520],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,4'));\n \n\n $this->assertEquals([\n ['width' => 200],\n ['width' => 267],\n ['width' => 333],\n ['width' => 400],\n ['width' => 467],\n ['width' => 533],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,5'));\n }", "public function testMultipleSizesAsString() {\n $this->assertEquals([\n ['width' => 200],\n ['width' => 400],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200,400,600'));\n }", "public function testThemeImageWithSizes() {\n // Test with multipliers.\n $sizes = '(max-width: ' . rand(10, 30) . 'em) 100vw, (max-width: ' . rand(30, 50) . 'em) 50vw, 30vw';\n $image = [\n '#theme' => 'image',\n '#sizes' => $sizes,\n '#uri' => reset($this->testImages),\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure sizes is set.\n $this->assertRaw($sizes, 'Sizes is set correctly.');\n }", "public function test_multi_resize() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$sizes_array = array(\n\n\t\t\t/**\n\t\t\t * #0 - 10x10 resize, no cropping.\n\t\t\t * By aspect, should be 10x6 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 10,\n\t\t\t\t'height' => 10,\n\t\t\t\t'crop' => false,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #1 - 75x50 resize, with cropping.\n\t\t\t * Output dimensions should be 75x50\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t\t'crop' => true,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #2 - 20 pixel max height, no cropping.\n\t\t\t * By aspect, should be 30x20 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 9999, # Arbitrary High Value\n\t\t\t\t'height' => 20,\n\t\t\t\t'crop' => false,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #3 - 45 pixel max height, with cropping.\n\t\t\t * By aspect, should be 45x400 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 45,\n\t\t\t\t'height' => 9999, # Arbitrary High Value\n\t\t\t\t'crop' => true,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #4 - 50 pixel max width, no cropping.\n\t\t\t * By aspect, should be 50x33 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 50,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #5 - 55 pixel max width, no cropping, null height\n\t\t\t * By aspect, should be 55x36 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 55,\n\t\t\t\t'height' => null,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #6 - 55 pixel max height, no cropping, no width specified.\n\t\t\t * By aspect, should be 82x55 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'height' => 55,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #7 - 60 pixel max height, no cropping, null width.\n\t\t\t * By aspect, should be 90x60 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => null,\n\t\t\t\t'height' => 60,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #8 - 70 pixel max height, no cropping, negative width.\n\t\t\t * By aspect, should be 105x70 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => -9999, # Arbitrary Negative Value\n\t\t\t\t'height' => 70,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #9 - 200 pixel max width, no cropping, negative height.\n\t\t\t * By aspect, should be 200x133 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 200,\n\t\t\t\t'height' => -9999, # Arbitrary Negative Value\n\t\t\t),\n\t\t);\n\n\t\t$resized = $imagick_image_editor->multi_resize( $sizes_array );\n\n\t\t$expected_array = array(\n\n\t\t\t// #0\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-10x7.jpg',\n\t\t\t\t'width' => 10,\n\t\t\t\t'height' => 7,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-10x7.jpg' ),\n\t\t\t),\n\n\t\t\t// #1\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-75x50.jpg',\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-75x50.jpg' ),\n\t\t\t),\n\n\t\t\t// #2\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-30x20.jpg',\n\t\t\t\t'width' => 30,\n\t\t\t\t'height' => 20,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-30x20.jpg' ),\n\t\t\t),\n\n\t\t\t// #3\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-45x400.jpg',\n\t\t\t\t'width' => 45,\n\t\t\t\t'height' => 400,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-45x400.jpg' ),\n\t\t\t),\n\n\t\t\t// #4\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-50x33.jpg',\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 33,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-50x33.jpg' ),\n\t\t\t),\n\n\t\t\t// #5\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-55x37.jpg',\n\t\t\t\t'width' => 55,\n\t\t\t\t'height' => 37,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-55x37.jpg' ),\n\t\t\t),\n\n\t\t\t// #6\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-83x55.jpg',\n\t\t\t\t'width' => 83,\n\t\t\t\t'height' => 55,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-83x55.jpg' ),\n\t\t\t),\n\n\t\t\t// #7\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-90x60.jpg',\n\t\t\t\t'width' => 90,\n\t\t\t\t'height' => 60,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-90x60.jpg' ),\n\t\t\t),\n\n\t\t\t// #8\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-105x70.jpg',\n\t\t\t\t'width' => 105,\n\t\t\t\t'height' => 70,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-105x70.jpg' ),\n\t\t\t),\n\n\t\t\t// #9\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-200x133.jpg',\n\t\t\t\t'width' => 200,\n\t\t\t\t'height' => 133,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-200x133.jpg' ),\n\t\t\t),\n\t\t);\n\n\t\t$this->assertNotNull( $resized );\n\t\t$this->assertSame( $expected_array, $resized );\n\n\t\tforeach ( $resized as $key => $image_data ) {\n\t\t\t$image_path = DIR_TESTDATA . '/images/' . $image_data['file'];\n\n\t\t\t// Now, verify real dimensions are as expected\n\t\t\t$this->assertImageDimensions(\n\t\t\t\t$image_path,\n\t\t\t\t$expected_array[ $key ]['width'],\n\t\t\t\t$expected_array[ $key ]['height']\n\t\t\t);\n\t\t}\n\t}", "public function testImageConfiguration()\n {\n $this->runConfigurationAssertions(new Image(), [\n 'imgable_type',\n 'url',\n 'imgable_id',\n ]);\n }", "public function IncorrectImagePixelSize()\n\t{\n\t\tglobal $ft_dom;\n\t\t$code = array('');\t\t\t\n\t\t$elements = $ft_dom->getElementsByTagName('img');\n\t\t$img_array = array();\n\t\t$badimg = array();\n\t\t$code[1] = 0;\n\t\t$code[2] = '';\n\t\t$max_resource_tests = 50;\n\n\t foreach ($elements as $element) { \n\t\t\t//don't try to do too many.\n\t\t\tif(count($img_array) > $max_resource_tests) { continue; }\n\t\t\tif(Helper::likelyPixel($element)) { continue; }\n\t\t\tif($element->hasAttribute('src')) {\n\t\t\t\t//if((!$element->hasAttribute('width') && $element->hasAttribute('style')) && Helper::hasInlineStyleAttribute($element->getAttribute('style'),'width')) { echo \"width set inline.\"; }\n\t\t\t\tif(in_array($element->getAttribute('src'),$img_array)) { continue; }\n\t\t\t\t\n\t\t\t\tif ($element->hasAttribute('width') || $element->hasAttribute('height')) {\n\t\t\t\t\t$link = Helper::getAbsoluteResourceLink($element->getAttribute('src'));\n\t\t\t\t\t\n\t\t\t\t\tif(Helper::http200Test($link)) { \n\t\t\t\t\t\t\n\t\t\t\t\t\tlist($width, $height) = getimagesize($link);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($element->hasAttribute('width')) {\n\t\t\t\t\t\t\t//echo \"\\n\\nwidth:\" . $element->getAttribute('width') . \"\\n\";\n\n\t\t\t\t\t\t\tif($element->getAttribute('width') != $width) {\n\t\t\t\t\t\t\t\tif($code[1] <= Helper::$max_disp_threshold) { $code[0] .= Helper::printCodeWithLineNumber($element) . \"\\nshould be width=\\\"$width\\\"\"; }\n\t\t\t\t\t\t\t\t$badimg[] = $element;\n\t\t\t\t\t\t\t\t$code[1]++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($element->hasAttribute('height')) {\n\n\t\t\t\t\t\t\tif($element->getAttribute('height') != $height) {\n\t\t\t\t\t\t\t\tif($code[1] <= Helper::$max_disp_threshold) {\n\t\t\t\t\t\t\t\t\tif(in_array($element, $badimg)) {\n\t\t\t\t\t\t\t\t\t\t$code[0] .= \"\\n and height=\\\"$height\\\"(\" .$element->getAttribute('src') . \")\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$code[0] .= Helper::printCodeWithLineNumber($element) . \"\\nshould be height=\\\"$height\\\"\";\n\t\t\t\t\t\t\t\t\t\t$code[1]++;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\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(in_array($element, $badimg)) { $code[0] .= \"\\n\\n\"; }\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$img_array[] = $element->getAttribute('src');\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tif($code[0] != '') {\n\t\t\tif($code[1] > Helper::$max_disp_threshold) { $code[0] .= '...'; }\n\t\t\tif($code[1] > 1) { $code[2] = 's'; }\t\t\t\n\t\t\treturn $code;\n\t\t}\n\t return false;\n\t}", "public function testImageQueryString() {\n\t\t$result = $this->Html->image('test.gif?one=two&three=four');\n\t\t$this->assertTags($result, array('img' => array('src' => 'img/test.gif?one=two&amp;three=four', 'alt' => '')));\n\n\t\t$result = $this->Html->image(array(\n\t\t\t'controller' => 'images',\n\t\t\t'action' => 'display',\n\t\t\t'test',\n\t\t\t'?' => array('one' => 'two', 'three' => 'four')\n\t\t));\n\t\t$this->assertTags($result, array('img' => array('src' => '/images/display/test?one=two&amp;three=four', 'alt' => '')));\n\t}", "public function test_single_multi_resize() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$sizes_array = array(\n\t\t\tarray(\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 50,\n\t\t\t),\n\t\t);\n\n\t\t$resized = $imagick_image_editor->multi_resize( $sizes_array );\n\n\t\t# First, check to see if returned array is as expected\n\t\t$expected_array = array(\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-50x33.jpg',\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 33,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-50x33.jpg' ),\n\t\t\t),\n\t\t);\n\n\t\t$this->assertSame( $expected_array, $resized );\n\n\t\t// Now, verify real dimensions are as expected\n\t\t$image_path = DIR_TESTDATA . '/images/' . $resized[0]['file'];\n\t\t$this->assertImageDimensions(\n\t\t\t$image_path,\n\t\t\t$expected_array[0]['width'],\n\t\t\t$expected_array[0]['height']\n\t\t);\n\t}", "function wp_image_matches_ratio($source_width, $source_height, $target_width, $target_height)\n {\n }", "public function provideImageTests() {\n $result = [\n [[\n 'descr' => \"[img] produces an image.\",\n 'bbcode' => \"This is Google's logo: [img]http://www.google.com/intl/en_ALL/images/logo.gif[/img].\",\n 'html' => \"This is Google's logo: <img src=\\\"http://www.google.com/intl/en_ALL/images/logo.gif\\\" alt=\\\"logo.gif\\\" class=\\\"bbcode_img\\\" />.\",\n ]],\n [[\n 'descr' => \"[img] disallows a javascript: URL.\",\n 'bbcode' => \"This is Google's logo: [img]javascript:alert()[/img].\",\n 'html' => \"This is Google's logo: [img]javascript:alert()[/img].\",\n ]],\n [[\n 'descr' => \"[img] disallows a URL with an unknown protocol type.\",\n 'bbcode' => \"This is Google's logo: [img]foobar:bar.jpg[/img].\",\n 'html' => \"This is Google's logo: [img]foobar:bar.jpg[/img].\",\n ]],\n [[\n 'descr' => \"[img] disallows HTML content.\",\n 'bbcode' => \"This is Google's logo: [img]<a href='javascript:alert(\\\"foo\\\")'>click me</a>[/img].\",\n 'html' => \"This is Google's logo: [img]&lt;a href='javascript:alert(&quot;foo&quot;)'&gt;click me&lt;/a&gt;[/img].\",\n ]],\n [[\n 'descr' => \"[img] can produce a local image.\",\n 'bbcode' => \"This is a smiley: [img]smile.gif[/img].\",\n 'html' => \"This is a smiley: <img src=\\\"smileys/smile.gif\\\" alt=\\\"smile.gif\\\" class=\\\"bbcode_img\\\" />.\",\n ]],\n [[\n 'descr' => \"[img] can produce a local rooted URL.\",\n 'bbcode' => \"This is a smiley: [img]/smile.gif[/img].\",\n 'html' => \"This is a smiley: <img src=\\\"/smile.gif\\\" alt=\\\"smile.gif\\\" class=\\\"bbcode_img\\\" />.\",\n ]],\n [[\n 'descr' => \"[img] can produce a local relative URL.\",\n 'bbcode' => \"This is a smiley: [img]../smile.gif[/img].\",\n 'html' => \"This is a smiley: <img src=\\\"../smile.gif\\\" alt=\\\"smile.gif\\\" class=\\\"bbcode_img\\\" />.\",\n ]],\n [[\n 'descr' => \"[img=src] should produce an image.\",\n 'bbcode' => 'This is a smiley: [img=smile.gif?f=1&b=2][/img] okay?',\n 'html' => 'This is a smiley: <img src=\"smileys/smile.gif\" alt=\"smile.gif?f=1&amp;b=2\" class=\"bbcode_img\" /> okay?',\n ]]\n ];\n return $result;\n }", "private function sanitize_srcset_attribute( DOMAttr $attribute ) {\n\t\t$srcset = $attribute->value;\n\n\t\t// Bail and raise a validation error if no image candidates were found or the last matched group does not\n\t\t// match the end of the `srcset`.\n\t\tif (\n\t\t\t! preg_match_all( self::SRCSET_REGEX_PATTERN, $srcset, $matches )\n\t\t\t||\n\t\t\tend( $matches[0] ) !== substr( $srcset, -strlen( end( $matches[0] ) ) )\n\t\t) {\n\n\t\t\t$validation_error = [\n\t\t\t\t'code' => AMP_Tag_And_Attribute_Sanitizer::INVALID_ATTR_VALUE,\n\t\t\t];\n\t\t\t$this->remove_invalid_attribute( $attribute->ownerElement, $attribute, $validation_error );\n\t\t\treturn;\n\t\t}\n\n\t\t$dimension_count = count( $matches['dimension'] );\n\t\t$commas_count = count( array_filter( $matches['comma'] ) );\n\n\t\t// Bail and raise a validation error if the number of dimensions does not match the number of URLs, or there\n\t\t// are not enough commas to separate the image candidates.\n\t\tif ( count( $matches['url'] ) !== $dimension_count || ( $dimension_count - 1 ) !== $commas_count ) {\n\t\t\t$validation_error = [\n\t\t\t\t'code' => AMP_Tag_And_Attribute_Sanitizer::INVALID_ATTR_VALUE,\n\t\t\t];\n\t\t\t$this->remove_invalid_attribute( $attribute->ownerElement, $attribute, $validation_error );\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if there are no duplicate image candidates.\n\t\t// Note: array_flip() is used as a faster alternative to array_unique(). See https://stackoverflow.com/a/8321709/93579.\n\t\tif ( count( array_flip( $matches['dimension'] ) ) === $dimension_count ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$image_candidates = [];\n\t\t$duplicate_dimensions = [];\n\n\t\tforeach ( $matches['dimension'] as $index => $dimension ) {\n\t\t\tif ( empty( trim( $dimension ) ) ) {\n\t\t\t\t$dimension = '1x';\n\t\t\t}\n\n\t\t\t// Catch if there are duplicate dimensions that have different URLs. In such cases a validation error will be raised.\n\t\t\tif ( isset( $image_candidates[ $dimension ] ) && $matches['url'][ $index ] !== $image_candidates[ $dimension ] ) {\n\t\t\t\t$duplicate_dimensions[] = $dimension;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$image_candidates[ $dimension ] = $matches['url'][ $index ];\n\t\t}\n\n\t\t// If there are duplicates, raise a validation error and stop short-circuit processing if the error is not removed.\n\t\tif ( ! empty( $duplicate_dimensions ) ) {\n\t\t\t$validation_error = [\n\t\t\t\t'code' => AMP_Tag_And_Attribute_Sanitizer::DUPLICATE_DIMENSIONS,\n\t\t\t\t'duplicate_dimensions' => $duplicate_dimensions,\n\t\t\t];\n\t\t\tif ( ! $this->should_sanitize_validation_error( $validation_error, [ 'node' => $attribute ] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Otherwise, output the normalized/validated srcset value.\n\t\t$attribute->value = implode(\n\t\t\t', ',\n\t\t\tarray_map(\n\t\t\t\tstatic function ( $dimension ) use ( $image_candidates ) {\n\t\t\t\t\treturn \"{$image_candidates[ $dimension ]} {$dimension}\";\n\t\t\t\t},\n\t\t\t\tarray_keys( $image_candidates )\n\t\t\t)\n\t\t);\n\t}", "public function testData()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n\n if (extension_loaded('imagick')) {\n // no driver was specified so the driver should be an instance of\n // P4Cms_Image_Driver_Imagick\n $this->assertTrue(\n $img->getDriver() instanceof P4Cms_Image_Driver_Imagick,\n 'Expected driver to be instance of P4Cms_Image_Driver_Imagick.'\n );\n } else {\n $this->markTestIncomplete(\"Cannot verify default driver, 'imagick' extension not found.\");\n }\n\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'Expected file at: ..assets/images/luigi.png to be 516x710 pixels.'\n );\n\n $newImg = new P4Cms_Image();\n $newImg->setData($data);\n\n // the data returned from getData() should be the same as what was set\n $this->assertSame(\n $newImg->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'Expected image built from file: ..assets/images/luigi.png to be 516x710 pixels.'\n );\n }", "public function testValidateDocumentPngValidation()\n {\n }", "public function testS2imageShouldBeAdded()\n {\n $imageLabel = 'someText';\n $imageUrl = '';\n $expected = 0;\n $actual = imageShouldBeAdded($imageLabel, $imageUrl);\n $this->assertEquals($expected, $actual);\n }", "public function testGetImageSize()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'Expected image size to be 516x710 pixels.'\n );\n\n if (extension_loaded('imagick')) {\n $img = new P4Cms_Image();\n try {\n $img->getImageSize();\n $this->fail('Expected failure with empty Imagick object.');\n } catch (P4Cms_Image_Exception $e) {\n $this->assertSame(\n $e->getMessage(),\n \"Can not get image size: no image data were set.\"\n );\n } catch (Exception $e) {\n $this->fail('Unexpected exception: '. $e->getMessage());\n }\n } else {\n $this->markTestIncomplete(\"Cannot verify default driver, 'imagick' extension not found.\");\n }\n }", "public function testSimageShouldBeAdded()\n {\n $imageLabel = 'someText';\n $imageUrl = 'someOtherText';\n $expected = 1;\n $actual = imageShouldBeAdded($imageLabel, $imageUrl);\n $this->assertEquals($expected, $actual);\n }", "public function testSampleValuesGeneratedImages() {\n // Add an image field to the variation.\n FieldStorageConfig::create([\n 'entity_type' => 'commerce_product_variation',\n 'field_name' => 'field_images',\n 'type' => 'image',\n 'cardinality' => 1,\n ])->save();\n $field_config = FieldConfig::create([\n 'entity_type' => 'commerce_product_variation',\n 'field_name' => 'field_images',\n 'bundle' => 'default',\n ]);\n $field_config->save();\n\n $file_storage = \\Drupal::entityTypeManager()->getStorage('file');\n // Assert the baseline file count.\n $this->assertEquals(0, $file_storage->getQuery()->count()->execute());\n\n $this->enableLayoutsForBundle('default');\n $this->configureDefaultLayout('default');\n\n // We should have one randomly generated image, for the variation.\n // @todo we end up with 5. I think it's due to the sample generated Product\n // having sample variations also referenced.\n $files = $file_storage->loadMultiple();\n $this->assertCount(5, $files);\n }", "public function testWebP() {\n\t\t$image = $this->getSampleImage();\n\t\t$this->assertTrue( !empty($image->ID) && $image->exists() );\n\n\t\t$original_url = $image->getAbsoluteURL();\n\n\t\t$width = self::WIDTH;\n\t\t$height = 0;\n\n\t\t$thumb = $image->Filter('format','webp')->ScaleWidth( $width );\n\n\t\t// Get its URL\n\t\t$url = $thumb->getAbsoluteURL();\n\n\t\t// should end with this command/path\n\t\t$this->assertStringEndsWith(\"=/{$width}x{$height}/filters:format(webp)/{$original_url}\", $url);\n\n\t\t$meta = getimagesize($url);\n\n\t\t$this->assertEquals( $meta['mime'], \"image/webp\" );\n\n\t}", "public function testS4imageShouldBeAdded()\n {\n $imageLabel = '';\n $imageUrl = '';\n $expected = 0;\n $actual = imageShouldBeAdded($imageLabel, $imageUrl);\n $this->assertEquals($expected, $actual);\n }", "public function testCheckConvertability2()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.png');\r\n self::resetPretending();\r\n\r\n $pretend['functionsExisting'] = ['imagecreatefrompng'];\r\n $gd->checkConvertability();\r\n $pretend['functionsExisting'] = [];\r\n }", "public function responsiveImageProvider() {\n $image = 'http://www.example.com/test_image.png';\n $cloudinaryFetchUrl = $this->cloudinaryResourceBaseUrl . '/' . $this->cloudinaryCloudName . '/image/fetch';\n return [\n // Case 1. No config parameter sent.\n [\n 'image' => ['src' => $image, 'width' => 100, 'height' => 100],\n 'expected' => ['src' => $image, 'width' => 100, 'height' => 100]\n ],\n // Case 2. Only ask for a width (so just scale the image).\n [\n 'image' => ['src' => $image, 'width' => 1000, 'height' => 500],\n 'expected' => [\n 'width' => 600,\n 'height' => 300,\n 'src' => $cloudinaryFetchUrl . '/s--1SSv3TAe--/f_auto/q_auto/c_scale,w_600/' . $image,\n ],\n 'width' => 600,\n ],\n // Case 3. Ask for a width and height.\n [\n 'image' => ['src' => $image, 'width' => 1000, 'height' => 1000],\n 'expected' => [\n 'width' => 600,\n 'height' => 400,\n 'src' => $cloudinaryFetchUrl . '/s--oQnrp4QO--/f_auto/q_auto/c_fill,g_auto,h_400,w_600/' . $image,\n ],\n 'width' => 600,\n 'height' => 400,\n ],\n // Case 4. Ask for a custom transformation.\n [\n 'image' => ['src' => $image, 'width' => 1000, 'height' => 1000],\n 'expected' => [\n 'width' => 600,\n 'height' => 400,\n 'src' => $cloudinaryFetchUrl . '/s--iBYmBJnf--/f_auto/q_auto/c_fill,g_auto,h_400,w_600/c_lfill,h_150,w_150/' . $image\n ],\n 'width' => 600,\n 'height' => 400,\n 'sizes' => NULL,\n 'transform' => 'c_lfill,h_150,w_150',\n ],\n // Case 5. Ask for sizes.\n [\n 'image' => ['src' => $image, 'width' => 2000, 'height' => 1600],\n 'expected' => [\n 'src' => $cloudinaryFetchUrl . '/s--do7-bAD9--/f_auto/q_auto/c_scale,w_1600/' . $image,\n 'width' => 1600,\n 'height' => 1280,\n 'sizes' => '(max-width: 800px) 780px, (max-width: 1200px) 1100px, 1600px',\n 'srcset' => implode(', ', [\n $cloudinaryFetchUrl . '/s--MZkCHWuY--/f_auto/q_auto/c_scale,w_780/' . $image . ' 780w',\n $cloudinaryFetchUrl . '/s--xlf_u2mA--/f_auto/q_auto/c_scale,w_1100/' . $image . ' 1100w',\n ])\n ],\n 'width' => 1600,\n 'height' => NULL,\n 'sizes' => [\n [800, 780],\n [1200, 1100],\n ],\n ],\n // Case 6. A complete test, with height calculation, sizes and custom\n // transformations.\n [\n 'image' => ['src' => $image, 'width' => 2000, 'height' => 1600],\n 'expected' => [\n 'src' => $cloudinaryFetchUrl . '/s--PYehk6Pp--/f_auto/q_auto/c_fill,g_auto,h_1200,w_1600/co_rgb:000000,e_colorize:90/' . $image,\n 'width' => 1600,\n 'height' => 1200,\n 'sizes' => '(max-width: 800px) 780px, (max-width: 1200px) 1100px, 1600px',\n 'srcset' => implode(', ', [\n $cloudinaryFetchUrl . '/s--0q-v7sf8--/f_auto/q_auto/c_fill,g_auto,h_585,w_780/co_rgb:000000,e_colorize:90/' . $image . ' 780w',\n $cloudinaryFetchUrl . '/s--1PnC9sUX--/f_auto/q_auto/c_fill,g_auto,h_825,w_1100/co_rgb:000000,e_colorize:90/' . $image . ' 1100w',\n ]),\n ],\n 'width' => 1600,\n 'height' => 1200,\n 'sizes' => [\n [800, 780],\n [1200, 1100],\n ],\n 'transform' => 'co_rgb:000000,e_colorize:90',\n ],\n ];\n }", "function imageCheck($target,$width=1,$height=1){\n if($width==1&&$height==1){\n return is_array(getimagesize($target));\n }else{\n $rvalue = false;\n if(is_array(getimagesize($target))){\n try {\n $img = new Imagick($target);\n if(strtoupper($img->getImageFormat())=='GIF'){\n $img = $img->coalesceImages();\n $img = $img->coalesceImages();\n do {\n if($width==0||$height==0)\n $img->resizeImage($width, $height, Imagick::FILTER_BOX, 1);\n else $img->resizeImage($width, $height, Imagick::FILTER_BOX, 1,true);\n } while ($img->nextImage());\n $img = $img->deconstructImages();\n $img->writeImages($target,true);\n }else{\n if($width==0||$height==0)\n $img->thumbnailImage($width, $height);\n else $img->thumbnailImage($width, $height,true);\n $img->writeImage($target);\n }\n $img->destroy();\n $rvalue = true;\n } catch (Exception $e) {\n }\n }\n return $rvalue;\n }\n}", "public function testValidateDocumentImageValidation()\n {\n }", "public function testTransform()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n\n // test the behavior of scale with width and height\n $img->transform('scale', array(258, 355));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 258, 'height' => 355),\n 'Expected image to be scaled to 258x355 pixels.'\n );\n\n // test the behavior of scale with width only\n // 516/710 = 400/h => h = 550\n $img->transform('scale', array(400));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 400, 'height' => 550),\n 'Expected image to be scaled to 300x300 pixels.'\n );\n\n // test the behavior of crop\n $img->transform('crop', array(100, 100, 50, 50));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 100, 'height' => 100),\n 'Expected image to be cropped to 100x100 pixels.'\n );\n\n // test the behavior of unsupported transform\n try {\n $img->transform('foo');\n $this->fail('Expected failure with an unsupported transform.');\n } catch (P4Cms_Image_Exception $e) {\n $this->assertSame($e->getMessage(), \"Transform \\\"foo\\\" is not supported.\");\n } catch (Exception $e) {\n $this->fail('Unexpected exception: '. $e->getMessage());\n }\n }", "public function testSetImageHandlerWithIncorrectResource()\n {\n $sut = new Image_Processor_Adapter_Gd2();\n\n $this->setExpectedException(\n 'UnexpectedValueException',\n \"Image handler was not correct type, 'gd' expected, 'stream' provided\"\n );\n\n $fp = @fopen(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'image_processor_php_test.tmp', 'w+');\n if (false === $fp) {\n $this->fail('This test cannot run as we cannot write a file to the system temp dir.');\n }\n $sut->setImageHandler($fp);\n }", "public function test_comicEntityIsCreated_images_setImages()\n {\n $sut = $this->getSUT();\n $images = $sut->getImages();\n $expected = [\n Image::create(\n 'http://i.annihil.us/u/prod/marvel/i/mg/c/30/4fe8cb51f32e0',\n 'jpg'\n ),\n ];\n\n $this->assertEquals($expected, $images);\n }" ]
[ "0.7132142", "0.687554", "0.6539896", "0.605218", "0.6018526", "0.59659445", "0.5842389", "0.57908744", "0.5777161", "0.5756085", "0.5722298", "0.56956017", "0.5671588", "0.5667395", "0.56593025", "0.5657271", "0.5650563", "0.5632054", "0.5623913", "0.5613944", "0.5611818", "0.55868584", "0.55740154", "0.55715686", "0.55614394", "0.5556669", "0.55374414", "0.5506169", "0.54981303", "0.5494442" ]
0.79850364
0
Tests that an image with the srcset and widths is output correctly.
public function testThemeImageWithSrcsetWidth() { // Test with multipliers. $widths = [ rand(0, 500) . 'w', rand(500, 1000) . 'w', ]; $image = [ '#theme' => 'image', '#srcset' => [ [ 'uri' => $this->testImages[0], 'width' => $widths[0], ], [ 'uri' => $this->testImages[1], 'width' => $widths[1], ], ], '#width' => rand(0, 1000) . 'px', '#height' => rand(0, 500) . 'px', '#alt' => $this->randomMachineName(), '#title' => $this->randomMachineName(), ]; $this->render($image); // Make sure the srcset attribute has the correct value. $this->assertRaw($this->fileUrlGenerator->generateString($this->testImages[0]) . ' ' . $widths[0] . ', ' . $this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[1])) . ' ' . $widths[1], 'Correct output for image with srcset attribute and width descriptors.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_cl_image_tag_srcset()\n {\n $expected_tag = self::get_expected_cl_image_tag(\n self::$public_id,\n self::$common_transformation_str,\n '',\n self::$breakpoints_arr\n );\n\n $tag_with_breakpoints = cl_image_tag(\n self::$public_id,\n array_merge(\n self::$common_image_options,\n array('srcset' => self::$common_srcset)\n )\n );\n\n $this->assertEquals(\n $expected_tag,\n $tag_with_breakpoints,\n 'Should create img srcset attribute with provided breakpoints'\n );\n }", "public function test_srcset_invalid_values()\n {\n $invalid_breakpoints = array(\n array('sizes' => true), // srcset data not provided\n array('max_width' => 300, 'max_images' => 3), // no min_width\n array('min_width' => '1', 'max_width' => 300, 'max_images' => 3), // invalid min_width\n array('min_width' => 100, 'max_images' => 3), // no max_width\n array('min_width' => '1', 'max_width' => '3', 'max_images' => 3), // invalid max_width\n array('min_width' => 200, 'max_width' => 100, 'max_images' => 3), // min_width > max_width\n array('min_width' => 100, 'max_width' => 300), // no max_images\n array('min_width' => 100, 'max_width' => 300, 'max_images' => 0), // invalid max_images\n array('min_width' => 100, 'max_width' => 300, 'max_images' => -17), // invalid max_images\n array('min_width' => 100, 'max_width' => 300, 'max_images' => '3'), // invalid max_images\n array('min_width' => 100, 'max_width' => 300, 'max_images' => null), // invalid max_images\n );\n\n\n $err_log_original_destination = ini_get('error_log');\n // Suppress error messages in error log\n ini_set('error_log', '/dev/null');\n\n try {\n foreach ($invalid_breakpoints as $value) {\n $tag = cl_image_tag(\n self::$public_id,\n array_merge(self::$common_image_options, array('srcset' => $value))\n );\n\n self::assertNotContains(\"srcset\", $tag);\n }\n } catch (\\Exception $e) {\n ini_set('error_log', $err_log_original_destination);\n throw $e;\n }\n\n ini_set('error_log', $err_log_original_destination);\n }", "public function testThemeImageWithSrcsetMultiplier() {\n // Test with multipliers.\n $image = [\n '#theme' => 'image',\n '#srcset' => [\n [\n 'uri' => $this->testImages[0],\n 'multiplier' => '1x',\n ],\n [\n 'uri' => $this->testImages[1],\n 'multiplier' => '2x',\n ],\n ],\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure the srcset attribute has the correct value.\n $this->assertRaw($this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[0])) . ' 1x, ' . $this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[1])) . ' 2x', 'Correct output for image with srcset attribute and multipliers.');\n }", "public function testRangeWithIntermediateSizes() {\n $this->assertEquals([\n ['width' => 200],\n ['width' => 300],\n ['width' => 400],\n ['width' => 500],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,3'));\n \n\n $this->assertEquals([\n ['width' => 200],\n ['width' => 280],\n ['width' => 360],\n ['width' => 440],\n ['width' => 520],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,4'));\n \n\n $this->assertEquals([\n ['width' => 200],\n ['width' => 267],\n ['width' => 333],\n ['width' => 400],\n ['width' => 467],\n ['width' => 533],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200-600,5'));\n }", "public function testGetImageSize()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'Expected image size to be 516x710 pixels.'\n );\n\n if (extension_loaded('imagick')) {\n $img = new P4Cms_Image();\n try {\n $img->getImageSize();\n $this->fail('Expected failure with empty Imagick object.');\n } catch (P4Cms_Image_Exception $e) {\n $this->assertSame(\n $e->getMessage(),\n \"Can not get image size: no image data were set.\"\n );\n } catch (Exception $e) {\n $this->fail('Unexpected exception: '. $e->getMessage());\n }\n } else {\n $this->markTestIncomplete(\"Cannot verify default driver, 'imagick' extension not found.\");\n }\n }", "public function testMultipleSizesAsString() {\n $this->assertEquals([\n ['width' => 200],\n ['width' => 400],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor('200,400,600'));\n }", "public function IncorrectImagePixelSize()\n\t{\n\t\tglobal $ft_dom;\n\t\t$code = array('');\t\t\t\n\t\t$elements = $ft_dom->getElementsByTagName('img');\n\t\t$img_array = array();\n\t\t$badimg = array();\n\t\t$code[1] = 0;\n\t\t$code[2] = '';\n\t\t$max_resource_tests = 50;\n\n\t foreach ($elements as $element) { \n\t\t\t//don't try to do too many.\n\t\t\tif(count($img_array) > $max_resource_tests) { continue; }\n\t\t\tif(Helper::likelyPixel($element)) { continue; }\n\t\t\tif($element->hasAttribute('src')) {\n\t\t\t\t//if((!$element->hasAttribute('width') && $element->hasAttribute('style')) && Helper::hasInlineStyleAttribute($element->getAttribute('style'),'width')) { echo \"width set inline.\"; }\n\t\t\t\tif(in_array($element->getAttribute('src'),$img_array)) { continue; }\n\t\t\t\t\n\t\t\t\tif ($element->hasAttribute('width') || $element->hasAttribute('height')) {\n\t\t\t\t\t$link = Helper::getAbsoluteResourceLink($element->getAttribute('src'));\n\t\t\t\t\t\n\t\t\t\t\tif(Helper::http200Test($link)) { \n\t\t\t\t\t\t\n\t\t\t\t\t\tlist($width, $height) = getimagesize($link);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($element->hasAttribute('width')) {\n\t\t\t\t\t\t\t//echo \"\\n\\nwidth:\" . $element->getAttribute('width') . \"\\n\";\n\n\t\t\t\t\t\t\tif($element->getAttribute('width') != $width) {\n\t\t\t\t\t\t\t\tif($code[1] <= Helper::$max_disp_threshold) { $code[0] .= Helper::printCodeWithLineNumber($element) . \"\\nshould be width=\\\"$width\\\"\"; }\n\t\t\t\t\t\t\t\t$badimg[] = $element;\n\t\t\t\t\t\t\t\t$code[1]++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($element->hasAttribute('height')) {\n\n\t\t\t\t\t\t\tif($element->getAttribute('height') != $height) {\n\t\t\t\t\t\t\t\tif($code[1] <= Helper::$max_disp_threshold) {\n\t\t\t\t\t\t\t\t\tif(in_array($element, $badimg)) {\n\t\t\t\t\t\t\t\t\t\t$code[0] .= \"\\n and height=\\\"$height\\\"(\" .$element->getAttribute('src') . \")\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$code[0] .= Helper::printCodeWithLineNumber($element) . \"\\nshould be height=\\\"$height\\\"\";\n\t\t\t\t\t\t\t\t\t\t$code[1]++;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\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(in_array($element, $badimg)) { $code[0] .= \"\\n\\n\"; }\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$img_array[] = $element->getAttribute('src');\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tif($code[0] != '') {\n\t\t\tif($code[1] > Helper::$max_disp_threshold) { $code[0] .= '...'; }\n\t\t\tif($code[1] > 1) { $code[2] = 's'; }\t\t\t\n\t\t\treturn $code;\n\t\t}\n\t return false;\n\t}", "public function testGetImageInfoFromBlob()\n {\n $imgBlob = file_get_contents($this->_testImagePath);\n $imgInfo = Tinebase_ImageHelper::getImageInfoFromBlob($imgBlob);\n \n $this->assertEquals($this->_testImageData['width'], $imgInfo['width']);\n }", "public function testImageCandidateFactoryWithWidthString()\n {\n $widthImageCandidate = ImageCandidateFactory::createImageCandidateFromString('image.jpg 1000w');\n $this->assertInstanceOf(WidthImageCandidate::class, $widthImageCandidate);\n }", "public function testImageCandidateFactoryWithWidthDescriptor()\n {\n $widthImageCandidate = ImageCandidateFactory::createImageCandidateFromFileAndDescriptor(\n 'image.jpg',\n '1000w'\n );\n $this->assertInstanceOf(WidthImageCandidate::class, $widthImageCandidate);\n }", "function imageCheck($target,$width=1,$height=1){\n if($width==1&&$height==1){\n return is_array(getimagesize($target));\n }else{\n $rvalue = false;\n if(is_array(getimagesize($target))){\n try {\n $img = new Imagick($target);\n if(strtoupper($img->getImageFormat())=='GIF'){\n $img = $img->coalesceImages();\n $img = $img->coalesceImages();\n do {\n if($width==0||$height==0)\n $img->resizeImage($width, $height, Imagick::FILTER_BOX, 1);\n else $img->resizeImage($width, $height, Imagick::FILTER_BOX, 1,true);\n } while ($img->nextImage());\n $img = $img->deconstructImages();\n $img->writeImages($target,true);\n }else{\n if($width==0||$height==0)\n $img->thumbnailImage($width, $height);\n else $img->thumbnailImage($width, $height,true);\n $img->writeImage($target);\n }\n $img->destroy();\n $rvalue = true;\n } catch (Exception $e) {\n }\n }\n return $rvalue;\n }\n}", "public function testWebP() {\n\t\t$image = $this->getSampleImage();\n\t\t$this->assertTrue( !empty($image->ID) && $image->exists() );\n\n\t\t$original_url = $image->getAbsoluteURL();\n\n\t\t$width = self::WIDTH;\n\t\t$height = 0;\n\n\t\t$thumb = $image->Filter('format','webp')->ScaleWidth( $width );\n\n\t\t// Get its URL\n\t\t$url = $thumb->getAbsoluteURL();\n\n\t\t// should end with this command/path\n\t\t$this->assertStringEndsWith(\"=/{$width}x{$height}/filters:format(webp)/{$original_url}\", $url);\n\n\t\t$meta = getimagesize($url);\n\n\t\t$this->assertEquals( $meta['mime'], \"image/webp\" );\n\n\t}", "public function testImageConfiguration()\n {\n $this->runConfigurationAssertions(new Image(), [\n 'imgable_type',\n 'url',\n 'imgable_id',\n ]);\n }", "public function testThemeImageWithSizes() {\n // Test with multipliers.\n $sizes = '(max-width: ' . rand(10, 30) . 'em) 100vw, (max-width: ' . rand(30, 50) . 'em) 50vw, 30vw';\n $image = [\n '#theme' => 'image',\n '#sizes' => $sizes,\n '#uri' => reset($this->testImages),\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure sizes is set.\n $this->assertRaw($sizes, 'Sizes is set correctly.');\n }", "public function testData()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n\n if (extension_loaded('imagick')) {\n // no driver was specified so the driver should be an instance of\n // P4Cms_Image_Driver_Imagick\n $this->assertTrue(\n $img->getDriver() instanceof P4Cms_Image_Driver_Imagick,\n 'Expected driver to be instance of P4Cms_Image_Driver_Imagick.'\n );\n } else {\n $this->markTestIncomplete(\"Cannot verify default driver, 'imagick' extension not found.\");\n }\n\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'Expected file at: ..assets/images/luigi.png to be 516x710 pixels.'\n );\n\n $newImg = new P4Cms_Image();\n $newImg->setData($data);\n\n // the data returned from getData() should be the same as what was set\n $this->assertSame(\n $newImg->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'Expected image built from file: ..assets/images/luigi.png to be 516x710 pixels.'\n );\n }", "function wp_image_matches_ratio($source_width, $source_height, $target_width, $target_height)\n {\n }", "public function testValidateDocumentImageValidation()\n {\n }", "public function testValidateDocumentPngValidation()\n {\n }", "public function test_responsive_width()\n {\n $tag = cl_image_tag(\"hello\", array(\"responsive_width\" => true, \"format\" => \"png\"));\n $this->assertEquals(\n \"<img class='cld-responsive' data-src='\" . self::DEFAULT_UPLOAD_PATH . \"c_limit,w_auto/hello.png'/>\",\n $tag\n );\n\n $options = array(\"width\" => 100, \"height\" => 100, \"crop\" => \"crop\", \"responsive_width\" => true);\n $result = Cloudinary::cloudinary_url(\"test\", $options);\n $this->assertEquals($options, array(\"responsive\" => true));\n $this->assertEquals($result, TagTest::DEFAULT_UPLOAD_PATH . \"c_crop,h_100,w_100/c_limit,w_auto/test\");\n Cloudinary::config(\n array(\n \"responsive_width_transformation\" => array(\n \"width\" => \"auto:breakpoints\",\n \"crop\" => \"pad\",\n ),\n )\n );\n $options = array(\"width\" => 100, \"height\" => 100, \"crop\" => \"crop\", \"responsive_width\" => true);\n $result = Cloudinary::cloudinary_url(\"test\", $options);\n $this->assertEquals($options, array(\"responsive\" => true));\n $this->assertEquals(\n $result,\n TagTest::DEFAULT_UPLOAD_PATH . \"c_crop,h_100,w_100/c_pad,w_auto:breakpoints/test\"\n );\n }", "public function test_multi_resize() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$sizes_array = array(\n\n\t\t\t/**\n\t\t\t * #0 - 10x10 resize, no cropping.\n\t\t\t * By aspect, should be 10x6 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 10,\n\t\t\t\t'height' => 10,\n\t\t\t\t'crop' => false,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #1 - 75x50 resize, with cropping.\n\t\t\t * Output dimensions should be 75x50\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t\t'crop' => true,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #2 - 20 pixel max height, no cropping.\n\t\t\t * By aspect, should be 30x20 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 9999, # Arbitrary High Value\n\t\t\t\t'height' => 20,\n\t\t\t\t'crop' => false,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #3 - 45 pixel max height, with cropping.\n\t\t\t * By aspect, should be 45x400 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 45,\n\t\t\t\t'height' => 9999, # Arbitrary High Value\n\t\t\t\t'crop' => true,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #4 - 50 pixel max width, no cropping.\n\t\t\t * By aspect, should be 50x33 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 50,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #5 - 55 pixel max width, no cropping, null height\n\t\t\t * By aspect, should be 55x36 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 55,\n\t\t\t\t'height' => null,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #6 - 55 pixel max height, no cropping, no width specified.\n\t\t\t * By aspect, should be 82x55 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'height' => 55,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #7 - 60 pixel max height, no cropping, null width.\n\t\t\t * By aspect, should be 90x60 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => null,\n\t\t\t\t'height' => 60,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #8 - 70 pixel max height, no cropping, negative width.\n\t\t\t * By aspect, should be 105x70 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => -9999, # Arbitrary Negative Value\n\t\t\t\t'height' => 70,\n\t\t\t),\n\n\t\t\t/**\n\t\t\t * #9 - 200 pixel max width, no cropping, negative height.\n\t\t\t * By aspect, should be 200x133 output.\n\t\t\t */\n\t\t\tarray(\n\t\t\t\t'width' => 200,\n\t\t\t\t'height' => -9999, # Arbitrary Negative Value\n\t\t\t),\n\t\t);\n\n\t\t$resized = $imagick_image_editor->multi_resize( $sizes_array );\n\n\t\t$expected_array = array(\n\n\t\t\t// #0\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-10x7.jpg',\n\t\t\t\t'width' => 10,\n\t\t\t\t'height' => 7,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-10x7.jpg' ),\n\t\t\t),\n\n\t\t\t// #1\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-75x50.jpg',\n\t\t\t\t'width' => 75,\n\t\t\t\t'height' => 50,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-75x50.jpg' ),\n\t\t\t),\n\n\t\t\t// #2\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-30x20.jpg',\n\t\t\t\t'width' => 30,\n\t\t\t\t'height' => 20,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-30x20.jpg' ),\n\t\t\t),\n\n\t\t\t// #3\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-45x400.jpg',\n\t\t\t\t'width' => 45,\n\t\t\t\t'height' => 400,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-45x400.jpg' ),\n\t\t\t),\n\n\t\t\t// #4\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-50x33.jpg',\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 33,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-50x33.jpg' ),\n\t\t\t),\n\n\t\t\t// #5\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-55x37.jpg',\n\t\t\t\t'width' => 55,\n\t\t\t\t'height' => 37,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-55x37.jpg' ),\n\t\t\t),\n\n\t\t\t// #6\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-83x55.jpg',\n\t\t\t\t'width' => 83,\n\t\t\t\t'height' => 55,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-83x55.jpg' ),\n\t\t\t),\n\n\t\t\t// #7\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-90x60.jpg',\n\t\t\t\t'width' => 90,\n\t\t\t\t'height' => 60,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-90x60.jpg' ),\n\t\t\t),\n\n\t\t\t// #8\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-105x70.jpg',\n\t\t\t\t'width' => 105,\n\t\t\t\t'height' => 70,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-105x70.jpg' ),\n\t\t\t),\n\n\t\t\t// #9\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-200x133.jpg',\n\t\t\t\t'width' => 200,\n\t\t\t\t'height' => 133,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-200x133.jpg' ),\n\t\t\t),\n\t\t);\n\n\t\t$this->assertNotNull( $resized );\n\t\t$this->assertSame( $expected_array, $resized );\n\n\t\tforeach ( $resized as $key => $image_data ) {\n\t\t\t$image_path = DIR_TESTDATA . '/images/' . $image_data['file'];\n\n\t\t\t// Now, verify real dimensions are as expected\n\t\t\t$this->assertImageDimensions(\n\t\t\t\t$image_path,\n\t\t\t\t$expected_array[ $key ]['width'],\n\t\t\t\t$expected_array[ $key ]['height']\n\t\t\t);\n\t\t}\n\t}", "public function testS4imageShouldBeAdded()\n {\n $imageLabel = '';\n $imageUrl = '';\n $expected = 0;\n $actual = imageShouldBeAdded($imageLabel, $imageUrl);\n $this->assertEquals($expected, $actual);\n }", "public function testMultipleSizesAsStringWrappedInArray() {\n $this->assertEquals([\n ['width' => 200],\n ['width' => 400],\n ['width' => 600],\n ], ImageSet::parseSizesDescriptor(['200,400,600']));\n }", "private function sanitize_srcset_attribute( DOMAttr $attribute ) {\n\t\t$srcset = $attribute->value;\n\n\t\t// Bail and raise a validation error if no image candidates were found or the last matched group does not\n\t\t// match the end of the `srcset`.\n\t\tif (\n\t\t\t! preg_match_all( self::SRCSET_REGEX_PATTERN, $srcset, $matches )\n\t\t\t||\n\t\t\tend( $matches[0] ) !== substr( $srcset, -strlen( end( $matches[0] ) ) )\n\t\t) {\n\n\t\t\t$validation_error = [\n\t\t\t\t'code' => AMP_Tag_And_Attribute_Sanitizer::INVALID_ATTR_VALUE,\n\t\t\t];\n\t\t\t$this->remove_invalid_attribute( $attribute->ownerElement, $attribute, $validation_error );\n\t\t\treturn;\n\t\t}\n\n\t\t$dimension_count = count( $matches['dimension'] );\n\t\t$commas_count = count( array_filter( $matches['comma'] ) );\n\n\t\t// Bail and raise a validation error if the number of dimensions does not match the number of URLs, or there\n\t\t// are not enough commas to separate the image candidates.\n\t\tif ( count( $matches['url'] ) !== $dimension_count || ( $dimension_count - 1 ) !== $commas_count ) {\n\t\t\t$validation_error = [\n\t\t\t\t'code' => AMP_Tag_And_Attribute_Sanitizer::INVALID_ATTR_VALUE,\n\t\t\t];\n\t\t\t$this->remove_invalid_attribute( $attribute->ownerElement, $attribute, $validation_error );\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if there are no duplicate image candidates.\n\t\t// Note: array_flip() is used as a faster alternative to array_unique(). See https://stackoverflow.com/a/8321709/93579.\n\t\tif ( count( array_flip( $matches['dimension'] ) ) === $dimension_count ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$image_candidates = [];\n\t\t$duplicate_dimensions = [];\n\n\t\tforeach ( $matches['dimension'] as $index => $dimension ) {\n\t\t\tif ( empty( trim( $dimension ) ) ) {\n\t\t\t\t$dimension = '1x';\n\t\t\t}\n\n\t\t\t// Catch if there are duplicate dimensions that have different URLs. In such cases a validation error will be raised.\n\t\t\tif ( isset( $image_candidates[ $dimension ] ) && $matches['url'][ $index ] !== $image_candidates[ $dimension ] ) {\n\t\t\t\t$duplicate_dimensions[] = $dimension;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$image_candidates[ $dimension ] = $matches['url'][ $index ];\n\t\t}\n\n\t\t// If there are duplicates, raise a validation error and stop short-circuit processing if the error is not removed.\n\t\tif ( ! empty( $duplicate_dimensions ) ) {\n\t\t\t$validation_error = [\n\t\t\t\t'code' => AMP_Tag_And_Attribute_Sanitizer::DUPLICATE_DIMENSIONS,\n\t\t\t\t'duplicate_dimensions' => $duplicate_dimensions,\n\t\t\t];\n\t\t\tif ( ! $this->should_sanitize_validation_error( $validation_error, [ 'node' => $attribute ] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Otherwise, output the normalized/validated srcset value.\n\t\t$attribute->value = implode(\n\t\t\t', ',\n\t\t\tarray_map(\n\t\t\t\tstatic function ( $dimension ) use ( $image_candidates ) {\n\t\t\t\t\treturn \"{$image_candidates[ $dimension ]} {$dimension}\";\n\t\t\t\t},\n\t\t\t\tarray_keys( $image_candidates )\n\t\t\t)\n\t\t);\n\t}", "function wp_image_add_srcset_and_sizes($image, $image_meta, $attachment_id)\n {\n }", "public function testSetGetImageHandler()\n {\n $sut = new Image_Processor_Adapter_Gd2();\n\n $ih = imagecreatetruecolor(1, 1);\n $this->assertInstanceOf(get_class($sut), $sut->setImageHandler($ih));\n $this->assertSame($ih, $sut->getImageHandler());\n }", "public function test_single_multi_resize() {\n\t\t$file = DIR_TESTDATA . '/images/waffles.jpg';\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( $file );\n\t\t$imagick_image_editor->load();\n\n\t\t$sizes_array = array(\n\t\t\tarray(\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 50,\n\t\t\t),\n\t\t);\n\n\t\t$resized = $imagick_image_editor->multi_resize( $sizes_array );\n\n\t\t# First, check to see if returned array is as expected\n\t\t$expected_array = array(\n\t\t\tarray(\n\t\t\t\t'file' => 'waffles-50x33.jpg',\n\t\t\t\t'width' => 50,\n\t\t\t\t'height' => 33,\n\t\t\t\t'mime-type' => 'image/jpeg',\n\t\t\t\t'filesize' => wp_filesize( dirname( $file ) . '/waffles-50x33.jpg' ),\n\t\t\t),\n\t\t);\n\n\t\t$this->assertSame( $expected_array, $resized );\n\n\t\t// Now, verify real dimensions are as expected\n\t\t$image_path = DIR_TESTDATA . '/images/' . $resized[0]['file'];\n\t\t$this->assertImageDimensions(\n\t\t\t$image_path,\n\t\t\t$expected_array[0]['width'],\n\t\t\t$expected_array[0]['height']\n\t\t);\n\t}", "function guy_imagedims($src) {\n\tif (substr($src,0,1)=='/') $src = \nsubstr_replace($src,$_SERVER['DOCUMENT_ROOT'].'/',0,1);\n\tif (is_file($src)) {\n\t\t$wh = @GetImageSize($src);\n\t\treturn $wh[3];\n\t}\n\treturn '';\n}", "public function testResizeIfNeededNeeded()\n {\n $resized = Processor::resizeIfNeeded('/app/tests/tall-image.jpg', true);\n $this->assertTrue($resized);\n }", "public function testThemeImageWithSrc() {\n\n $image = [\n '#theme' => 'image',\n '#uri' => reset($this->testImages),\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure the src attribute has the correct value.\n $this->assertRaw($this->fileUrlGenerator->generateString($image['#uri']), 'Correct output for an image with the src attribute.');\n }", "function throwImgWidth( $imgSrc ){\n return $this->throwImgSize( $imgSrc, 'width' );\n }" ]
[ "0.7010816", "0.68044627", "0.67026645", "0.6579118", "0.6535089", "0.64611906", "0.6453078", "0.64360106", "0.63177097", "0.62910914", "0.620381", "0.6102126", "0.60774326", "0.6060576", "0.6011463", "0.59291303", "0.58970004", "0.5860443", "0.58568287", "0.5836072", "0.58359563", "0.5802856", "0.57743603", "0.57726884", "0.57615024", "0.5734411", "0.5731578", "0.57153493", "0.57042587", "0.5701787" ]
0.7944958
0
///////////////////////////////////////////////////////////////////////////// M E T H O D S ///////////////////////////////////////////////////////////////////////////// Webconfig constructor.
public function __construct() { clearos_profile(__METHOD__, __LINE__); parent::__construct("webconfig-httpd"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n\t{\n\t\t//GSMS::$config =& get_config();\n\t\tGSMS::$class['system_log']->log('debug', \"Config Class Initialized\");\n\n\t\t// Set the base_url automatically if none was provided\n\t\tif (GSMS::$config['base_url'] == '')\n\t\t{\n\t\t\tif (isset($_SERVER['HTTP_HOST']))\n\t\t\t{\n\t\t\t\t$base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';\n\t\t\t\t$base_url .= '://'. $_SERVER['HTTP_HOST'];\n\t\t\t\t$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$base_url = 'http://localhost/';\n\t\t\t}\n\t\t\tGSMS::$siteURL=$base_url;\n\t\t\t$this->set_item('base_url', $base_url);\n\t\t\t\n\t\t}\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->config = config($this->configName);\n }", "public function __construct () {\n\t\tglobal $_CONSTANTS;\n\t\t$a=array(\"'\");\n\t\t$b=array(\"\");\n\t\tforeach (parse_ini_file(\"settings.ini\") as $key=>$value) { \n\t\t\t${$key} = $value;\n\t\t\tif ($key==\"host\") {\n\t\t\t\tdefine(HOST,'https://' . $value);\n\t\t\t} else { \t\t\t\n\t\t\t\tdefine(strtoupper($key),str_replace($a,$b,$value));\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->host=HOST;\n\t}", "public function __construct($config){\n\t\tif(!is_array($config)){\n\t\t\tthrow new \\InvalidArgumentException('Config must be provided as an array');\n\t\t}\n\n\t\t$this->rootPath\t= rtrim($config['root_path'], '/').'/';\n\n\t\tif(!isset($config['site'])){\n\t\t\tthrow new \\InvalidArgumentException('Config is missing `site`');\n\t\t}\n\t\t$fields\t= array(\n\t\t\t'url',\n\t\t\t'name'\n\t\t);\n\t\tforeach($fields as $field){\n\t\t\tif(!isset($config['site'][$field])){\n\t\t\t\tthrow new \\InvalidArgumentException('Config is missing site setting `'.$field.'`');\n\t\t\t}\n\t\t\t$this->{$field}\t= $config['site'][$field];\n\t\t}\n\n\t\tif(!isset($config['paths'])){\n\t\t\tthrow new \\InvalidArgumentException('Config is missing `paths`');\n\t\t}\n\n\t\t$this->paths\t= array(\n\t\t\t'www'\t\t\t=> 'web',\n\t\t\t'drafts-web'\t=> 'drafts-web',\n\t\t\t'pages'\t\t\t=> 'pages',\n\t\t\t'posts'\t\t\t=> 'posts',\n\t\t\t'drafts'\t\t=> 'drafts',\n\t\t\t'themes'\t\t=> 'themes',\n\t\t\t'plugins'\t\t=> 'plugins',\n\t\t\t'assets'\t\t=> 'assets',\n\t\t\t'cache'\t\t\t=> 'cache'\n\t\t);\n\t\tforeach($this->paths as $key => $configKey){\n\t\t\tif(!isset($config['paths'][$configKey])){\n\t\t\t\tthrow new \\InvalidArgumentException('Config is missing path `'.$configKey.'`');\n\t\t\t}\n\n\t\t\t$path\t= $config['paths'][$configKey];\n\n\t\t\tif($path[0] != '/'){\n\t\t\t\t$path\t= $this->getPathRoot($path);\n\t\t\t}\n\t\t\t$this->paths[$key]\t= rtrim($path, '/').'/';\n\t\t}\n\n\t\t$this->config\t= $config;\n\t}", "function __construct()\r\n\t{\r\n\t\trequire './configs/configs.php';\r\n\t}", "public function __construct()\n {\n $this->_config = request('_config');\n }", "public function __construct()\n {\n $this->config = config('ldap');\n }", "public function __construct(){\n\t\t\n\t\t$this->config = Zend_Registry::get('config');\n\n\t}", "public function __construct($config)\n {\n }", "private function __construct()\n {\n require __DIR__ . \"/../config.php\";\n $this->setting = $confSettings;\n $this->adminLinks = $admin_link_array;\n $this->memberLinks = $member_link_array;\n }", "public function __construct(array $config = array());", "public function __construct()\n {\n $this->tpl = new \\Phalcon\\Config($this->tpl);\n self::$instance = $this;\n }", "public function __construct()\n\t{\n\t\t// Set the prefix.\n\t\t$this->setting_prefix = Config::getInstance()->getFrameworkConfig('setting_prefix');\n\t}", "function __construct() {\n //invoke the init method of the config object in context\n $this->init();\n }", "public function __construct($webUrl)\n {\n $this->webUrl = $webUrl;\n }", "function __construct() {\n global $urlpatterns,$errorhandler;\n //Initialize config object\n $this->config=new Config();\n //Get all URLs Routes\n $this->routes=$this->config->urlpatterns;\n //Get all ErrorHandler\n $this->error_routes=$this->config->errorhandler;\n //Check for server error\n $this->server_error();\n //Route URLs\n $this->router($this->config->request_path, $this->routes);\n }", "public function __construct()\n {\n $this->_config = sspmod_janus_DiContainer::getInstance()->getConfig();\n }", "public function __construct()\n {\n $this->params['config'] = config('app');\n }", "public function __construct($config)\n {\n }", "public function __construct()\n {\n\t\t$this->ini_array = parse_ini_file(\"config.ini\", true);\n }", "private function __construct()\n {\n // Overwrite _config from config.ini\n if ($_config = \\Phalcon\\DI::getDefault()->getShared('config')->auth) {\n foreach ($_config as $key => $value) {\n $this->_config[$key] = $value;\n }\n }\n\n $this->_cookies = \\Phalcon\\DI::getDefault()->getShared('cookies');\n $this->_session = \\Phalcon\\DI::getDefault()->getShared('session');\n $this->_security = \\Phalcon\\DI::getDefault()->getShared('security');\n }", "private function __construct() {\n $this->config = array(\n // These will all need to be changed to point at your mysql server.\n \"Database\" => array(\n \"Host\" => \"localhost\",\n \"Name\" => \"daeman\",\n \"Username\" => \"daeman\",\n \"Password\" => \"<password>\",\n ),\n );\n }", "public function __construct($config = array())\n\t{\n\t\t$config += Kohana::config('furi')->as_array();\n\n\t\t// Save the config in the object\n\t\t$this->config = $config;\n\t}", "public function __construct($config){\n\n // Collect the config arguments in provided format\n if (empty($config) || !is_array($config)){\n $config = func_get_args();\n if (empty($config) || !is_array($config)){\n $config = array();\n }\n }\n\n // Collect any of the root config variables\n $this->root_dir = isset($config['root_dir']) ? $config['root_dir'] : (isset($config[0]) ? $config[0] : '/var/www/html/');\n $this->root_url = isset($config['root_url']) ? $config['root_url'] : (isset($config[1]) ? $config[1] : 'http://www.domain.com/');\n $this->cache_date = isset($config['cache_date']) ? $config['cache_date'] : (isset($config[2]) ? $config[2] : '20XX-YY-ZZ');\n $this->ga_accountid = isset($config['ga_accountid']) ? $config['ga_accountid'] : (isset($config[2]) ? $config[2] : 'UA-00000000-0');\n\n // Predefine default page variables\n $this->seo_title = 'LegacyWebsite.NET';\n $this->seo_keywords = '';\n $this->seo_description = '';\n $this->content_title = 'LegacyWebsite.NET';\n $this->content_description = '';\n $this->content_markup = '';\n $this->styles_markup = '';\n $this->scripts_markup = '';\n\n }", "public function __construct()\n {\n\n // $configuration = $this->get('configuration');\n\n\n }", "public function __construct()\r\n\t{\r\n\t\t$this->ci =& get_instance();\r\n\t\t\r\n\t\t$this->ci->load->config('config');\r\n\t\t$this->alias_config = $this->ci->config->item('alias_config');\r\n\t\t$this->upload_config = $this->ci->config->item('upload_config');\r\n\t}", "public function __construct() {\n\n $this->loadConfig();\n\n }", "protected function __construct()\n {\n // Define the constants\n define('VALIB_CONFIG', $this->loadConfig());\n }", "function __construct()\r\n {\r\n parent::__construct();\r\n $this->config = clsSysCommon::getDomainConfig();\r\n }", "abstract public function __construct( $config );" ]
[ "0.64229685", "0.6329215", "0.6133582", "0.59689295", "0.5960309", "0.59183156", "0.59171414", "0.5903676", "0.5898844", "0.58840847", "0.58478606", "0.58466303", "0.58271456", "0.5816651", "0.57829106", "0.57820266", "0.57694894", "0.5761176", "0.5722317", "0.5721398", "0.57086486", "0.5701449", "0.569579", "0.5688567", "0.56495744", "0.56441104", "0.56241715", "0.5618994", "0.56123936", "0.5606175" ]
0.66646796
0
Returns configured theme mode.
public function get_theme_mode() { clearos_profile(__METHOD__, __LINE__); if (! $this->is_loaded) $this->_load_config(); return $this->config['theme_mode']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTheme();", "public function getCurrentTheme()\n {\n return $theme = $this->config->theming->theme;\n }", "public function getDesignTheme();", "public static function getTheme ()\n {\n $config = Zend_Registry::get('config');\n\n return $config->app->theme;\n }", "public function get_theme() {\n return $this->_theme;\n }", "public static function getTheme()\n {\n $config = parse_ini_file(self::$configuration, false);\n return $config['theme'];\n }", "protected function getTheme()\n {\n return !empty($_GET['theme']) ? $_GET['theme'] : 'basic';\n }", "public function getTheme() {\n $templateFacade = $this->dependencyInjector->get('ride\\\\library\\\\template\\\\TemplateFacade');\n\n return $templateFacade->getDefaultTheme();\n }", "public function getMode()\n {\n $value = $this->_config->get('dataprocessing/general/mode');\n\n if ($value === null) {\n $value = 'products';\n }\n\n return $value;\n }", "public function getCurrentTheme(): string\n {\n $theme = $this->theme;\n\n if ($theme == 'default' || $theme === null) {\n return 'default';\n }\n\n if (mb_strlen($theme) > 0) {\n return $theme;\n }\n\n return $this->getDefaultTheme();\n }", "public function getTheme () {\n $admin = Yii::app()->settings;\n \n if ($admin->enforceDefaultTheme && $admin->defaultTheme !== null) {\n $theme = $this->getDefaultTheme ();\n if ($theme) return $theme;\n } \n \n return $this->theme;\n }", "public function getTheme()\n {\n return $this->theme;\n }", "public function getTheme()\n {\n return $this->theme;\n }", "public function getTheme()\n {\n return $this->theme;\n }", "public function getMode()\n {\n $currentMode = $this->getChildBlock('toolbar')->getCurrentMode();\n return $currentMode;\n }", "public function getTheme()\n\t{\n\t\treturn $this->theme;\n\t}", "public function getTheme() {\n return $this->escapeHtml(strtolower(Mage::getStoreConfig(self::CONFIG_PREFIX . 'theme_name', $this->getStore())));\n }", "function current_theme()\n {\n return current_theme();\n }", "public function getStyle() {\n // have to handle it here if set, so we can show apps in dark mode.\n $darkmode = '';\n if ($this->getRequest()->getSession()->get('darkmode') === 'true') {\n statsd_bump('dagd_dark_mode_active');\n }\n\n return array(\n $darkmode,\n );\n }", "function getMode() {\n\t\treturn $this->get('mode');\n\t}", "protected function _getCurrentTheme()\n {\n return $this->_coreRegistry->registry('current_theme');\n }", "public function getTheme()\n {\n return _THEME_NAME_;\n }", "public function getThemeConfiguration()\n {\n return $this->getParameter('themeConfiguration');\n }", "function get_current_theme()\n {\n }", "public static function getMode();", "public function getAdminTheme()\n {\n if ($this->sc->isGranted('IS_AUTHENTICATED_FULLY')) {\n $theme = $this->sc->getToken()->getUser()->getAdminTheme();\n }\n\n return empty($theme) ? 'default' : $theme;\n }", "public function getMode()\n {\n if (isset($this->data[\"mode\"])) {\n return $this->data[\"mode\"];\n }\n if (isset($this->data['external'])) {\n return \"prefer_local\";\n }\n return \"only_local\";\n }", "public function getCurrentMode()\n {\n $params = request()->input();\n\n if (isset($params['mode']))\n return $params['mode'];\n\n return 'grid';\n }", "protected function get() : string\n\t{\n\t\treturn $this->app->config->theme;\n\t}", "public function get_theme_name(){\n\t\treturn $this->current_theme;\n\t}" ]
[ "0.73051256", "0.73007196", "0.7202147", "0.7199959", "0.7191706", "0.7167727", "0.71357787", "0.7118886", "0.7098299", "0.7077854", "0.7068453", "0.7060847", "0.7060847", "0.7060847", "0.70416796", "0.6979258", "0.69183207", "0.6883121", "0.68673724", "0.68665665", "0.68643594", "0.68376523", "0.681739", "0.6797623", "0.6784743", "0.67753714", "0.675914", "0.67416114", "0.6732742", "0.6713442" ]
0.8885009
0
Sets the theme mode for webconfig.
public function set_theme_mode($mode) { clearos_profile(__METHOD__, __LINE__); $this->_set_parameter('theme_mode', $mode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAppTheme($themeName = '');", "public function setDefaultDesignTheme();", "function cinerama_edge_register_theme_settings() {\n\t\tregister_setting( EDGE_OPTIONS_SLUG, 'edgtf_options' );\n\t}", "public function setup_theme()\n {\n }", "function chocorocco_customizer_action_switch_theme() {\n\t\tif (false) chocorocco_customizer_save_css();\n\t}", "function setTheme($theme) {\n $this->local_theme = $theme;\n if(isset($this->xTemplate))$this->xTemplate->assign(\"THEME\", $this->local_theme);\n}", "function tsc_theme_options() {\n\tadd_theme_page( 'Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'tsc_theme_options_page' );\n}", "public function setTheme($theme)\n {\n $this->theme = $theme;\n }", "public function set_theme($theme)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->_set_parameter('theme', $theme);\n }", "public function apply_theme()\n\t{\n\t\treturn 'twentyten';\n\t}", "public function theme()\n {\n }", "function set_theme_mod($name, $value)\n {\n }", "function autodidact_theme_setup() {\n\n}", "public function themeSetup()\n {\n add_theme_support('title-tag');\n add_theme_support('post-thumbnails');\n add_theme_support('html5', [\n 'search-form',\n 'comment-form',\n 'comment-list',\n 'gallery',\n 'caption',\n ]);\n\n add_theme_support('align-wide');\n\n add_theme_support('editor-color-palette', \\Fp\\Fabric\\fabric()->config('theme.colours'));\n\n // Disables custom colors in block color palette.\n add_theme_support('disable-custom-colors');\n }", "public static function set_theme($theme = FALSE)\n\t{\n\t\tif( !empty($theme)) Theme::$active = $theme;\n\n\t\t$modules = Kohana::modules();\n\t\tif( ! empty(Theme::$active) AND ! in_array(Theme::$active, array_keys($modules)))\n\t\t{\n\t\t\t//set absolute theme path and load the request theme as kohana module\n\t\t\tKohana::modules(array('theme' => THEMEPATH.Theme::$active) + $modules);\n\t\t}\n\t\n\t\tunset($modules);\n\t}", "public function setup_config() {\n\t\t$theme = wp_get_theme();\n\n\t\t$this->theme_args['name'] = apply_filters( 'ti_wl_theme_name', $theme->__get( 'Name' ) );\n\t\t$this->theme_args['template'] = $theme->get( 'Template' );\n\t\t$this->theme_args['version'] = $theme->__get( 'Version' );\n\t\t$this->theme_args['description'] = apply_filters( 'ti_wl_theme_description', $theme->__get( 'Description' ) );\n\t\t$this->theme_args['slug'] = $theme->__get( 'stylesheet' );\n\t}", "public function setConfig($fileName)\n {\n // Get the theme's config file\n $themeConfig = $this->path . '/' . $fileName;\n\n // If the theme has a config file, set hasConfig to true.\n $this->hasConfig = (file_exists($themeConfig) && is_readable($themeConfig));\n }", "function configure_theme($themeFile) {\n $newEntry = $this->GetThemeInfo($this->css_dir.$themeFile);\n $this->products->columns = $newEntry['columns'];\n }", "function setTheme($name, $load=true)\n {\n $this->m_themeName = $name;\n $this->m_themeLoad = $load;\n }", "public function initTheme($theme_name);", "public static function setSiteStyling()\n {\n $styling = SiteManagement::getMetaValue('settings');\n if (!empty($styling[0]['enable_theme_color']) && $styling[0]['enable_theme_color'] == 'true') {\n if (!empty($styling[0]['primary_color'])) {\n ob_start(); ?>\n <style>\n /* Theme Text Color */\n a,\n p a,\n p a:hover,\n a:hover,\n a:focus,\n a:active,\n .wt-navigation>ul>li:hover>a,\n .wt-navigation>ul>li.current-menu-item>a,\n .wt-navarticletab li:hover a,\n .wt-navarticletab li a.active,\n .wt-categoriescontent li a:hover,\n .wt-joinsteps li.wt-active a,\n .wt-effectivecontent li:hover a,\n .wt-articlesingle-content .wt-description .wt-blockquotevone q,\n .wt-filtertag li:hover a,\n .wt-userlisting-breadcrumb li .wt-clicksave,\n .wt-clicksave,\n .wt-qrcodefeat h3 span,\n .wt-comfollowers ul li:hover a span,\n .wt-postarticlemeta .wt-following span,\n .tg-qrcodefeat h3 span,\n .active-category {\n color: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* Theme Background Color */\n .wt-btn:hover,\n .wt-dropdowarrow,\n .navbar-toggle,\n .wt-btn,\n .wt-navigationarea .wt-navigation>ul>li>a:after,\n .wt-searchbtn,\n .wt-sectiontitle:after,\n .wt-navarticletab li a:after,\n .wt-pagination ul li a:hover,\n .wt-pagination ul li.wt-active a,\n .wt-widgettag a:hover,\n .wt-articlesingle-content .wt-description blockquote span i,\n .wt-searchgbtn,\n .wt-filtertagclear a,\n .ui-slider-horizontal .ui-slider-range,\n .wt-btnsearch,\n .wt-newnoti a em,\n .wt-notificationicon>a:after,\n .wt-rightarea .wt-nav .navbar-toggler,\n .wt-usersidebaricon span,\n .wt-usersidebaricon span i,\n .wt-filtertag .wt-filtertagclear a,\n .loader:before,\n .wt-offersmessages .wt-ad:after,\n .wt-btnsendmsg,\n .wt-tabstitle li a:before,\n .wt-tabscontenttitle:before,\n .wt-tablecategories thead tr th:first-child:before,\n .wt-tablecategories tbody tr td:first-child:before,\n .wt-slidernav .wt-prev:hover,\n .wt-slidernav .wt-next:hover,\n .vb>.vb-dragger>.vb-dragger-styler,\n .wt-pagination ul li span,\n .la-banner-settings .wt-location h5:after,\n .la-section-settings .wt-location h6:after,\n .wt-forgotpassword-holder .card .card-body form .form-group button[type=submit] {\n background: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* Theme Border Color */\n input:focus,\n .select select:focus,\n .form-control:focus,\n .wt-navigation>ul>li>.sub-menu,\n .wt-pagination ul li a:hover,\n .wt-widgettag a:hover,\n .wt-joinsteps li.wt-active a,\n .wt-filtertag li:hover a,\n .wt-filtertag .wt-filtertagclear a,\n .wt-themerangeslider .ui-slider-handle,\n .wt-clicksavebtn,\n .wt-pagination ul li.wt-active a,\n .wt-usernav>ul,\n .wt-pagination ul li span {\n border-color: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* RGBA Background Color */\n .loader{\n background: <?php echo $styling[0]['primary_color'] ?>;\n background: -moz-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -webkit-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -o-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -ms-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: linear-gradient(to right, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n }\n </style>\n <?php return ob_get_clean();\n }\n }\n }", "function thememount_set_rs_as_theme() {\n\tif(get_option('revSliderAsTheme') != 'true'){\n\t\tupdate_option('revSliderAsTheme', 'true');\n\t}\n\tif(get_option('revslider-valid-notice') != 'false'){\n\t\tupdate_option('revslider-valid-notice', 'false');\n\t}\n\tif( function_exists('set_revslider_as_theme') ){\t\n\t\tset_revslider_as_theme();\n\t}\n}", "public function get_theme_mode()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! $this->is_loaded)\n $this->_load_config();\n\n return $this->config['theme_mode'];\n }", "public function getDesignTheme();", "public function setTheme(\\Magento\\Framework\\View\\Design\\ThemeInterface $theme);", "public function theme() {\n // Do nothing by default\n }", "public function settings_field_theme() {\n\t\t?>\n\t\t<select name=\"theme_my_login_recaptcha[theme]\" id=\"theme_my_login_recaptcha_theme\">\n\t\t<?php foreach ( $this->get_themes() as $theme => $theme_name ) : ?>\n\t\t\t<option value=\"<?php echo $theme; ?>\"<?php selected( $this->get_option( 'theme' ), $theme ); ?>><?php echo $theme_name; ?></option>\n\t\t<?php endforeach; ?>\n\t\t</select>\n\t\t<?php\n\t}", "public function theme($theme)\n {\n $themepath = $this->dir . '/theme/' . $theme;\n if (is_dir(realpath($themepath))) {\n $this->theme = $theme;\n }\n }", "public static function setAdmin($theme) {\n variable_set('admin_theme', $theme);\n }", "public function init() {\n Yii::app()->theme = 'bootstrap';\n }" ]
[ "0.6917984", "0.6192973", "0.60276806", "0.60190177", "0.58888435", "0.58655363", "0.5786728", "0.57613456", "0.5749963", "0.5708846", "0.570547", "0.56839263", "0.56817305", "0.56801367", "0.565123", "0.5642772", "0.55631083", "0.55589056", "0.55246717", "0.55213904", "0.5510969", "0.5505592", "0.5474023", "0.54632217", "0.5456142", "0.5454959", "0.5452604", "0.54488903", "0.54417706", "0.54258037" ]
0.6747356
1
Sets a parameter in the config file.
protected function _set_parameter($key, $value) { clearos_profile(__METHOD__, __LINE__); $file = new File(self::FILE_CONFIG); if (! $file->exists()) $file->create('root', 'root', '0644'); $match = $file->replace_lines("/^$key\s*=\s*/", "$key = $value\n"); if (!$match) $file->add_lines("$key = $value\n"); $this->is_loaded = FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _set_parameter($key, $value)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->is_loaded = FALSE;\n\n $file = new File(self::APP_CONFIG);\n\n if (! $file->exists())\n $file->create(\"root\", \"root\", \"0644\");\n\n $match = $file->replace_lines(\"/^$key\\s*=\\s*/\", \"$key = $value\\n\");\n\n if (!$match)\n $file->add_lines(\"$key = $value\\n\");\n }", "public function setParameter(string $name, $value): void\n {\n $this->config[$name] = $value;\n }", "public function set($parameter, $value);", "public abstract function setParameter($parameter);", "function _set_config_param($name,$value)\r\n\t{\r\n\t\t$this->db->query(\"update m_config_params set value = ? where name = ? limit 1\",array($value,$name));\r\n\t}", "public function setParameter($name, $value);", "public function setParam($param, $value){\n // $value = array_merge(array('plugins'), (array)$value);\n\n if ($param == 'template_dir'){\n $this->setTemplateDirs((array)$value);\n } else {\n //$this->_instance->$param = $value;\n }\n\n\n }", "public function setParam($param, $value);", "function set_parameter($name, $value)\r\n {\r\n //dump(get_class($this) . ' | ' . $name);\r\n $this->parameters[$name] = $value;\r\n }", "public function setParameter($name, $value) {\n $this->parameters[$name]= $value;\n }", "public function setConfig($key, $value);", "public function setParam($name, $value);", "protected function setParameter($name, $value)\n {\n $this->parameters[$name] = $value;\n }", "abstract protected function setParameter($key, $value);", "protected function setParamConfig()\n {\n $this->paramConfig = ArrayManipulation::deepMerge($this->paramConfig, array(\n 'placeholder' => array(\n 'name' => 'Platzhalter Text',\n 'type' => 'textfield'\n ),\n 'rows' => array(\n 'name' => 'Anzahl Zeilen',\n 'type' => 'textfield'\n ),\n 'maxlength' => array(\n 'name' => 'Maximale Anzahl Zeichen (optional)',\n 'type' => 'textfield'\n )\n ));\n }", "public function setParam($key, $value);", "function setParameter($key, $value) {\n $this->parameters[$key] = $value;\n }", "public function setParameter($param, $value)\n {\n $this->params[$param] = $value;\n }", "public function set($config){\n\t\t$this->configValues = $config;\n\t}", "public function set_parameter($name, $value)\n {\n $this->_parameters[ $name ] = $value;\n }", "public function setParameter($name, $value)\n {\n $this->getParameters();\n $this->parameters[$name] = $value;\n }", "public function setParameter($name, $value)\n {\n $this->parameters();\n $this->parameters[$name] = $value;\n }", "function setParam($name, $value) {\n $this->params[$name] = $value;\n }", "public abstract function setConfig($key, $value);", "public function setParameter($name, $value) {\n $this->parameters[$name] = $value;\n }", "public function setParameter ($name, $value)\n {\n\n $this->parameters[$name] = $value;\n\n }", "public function setParam($name, $value) {\n $this->parameter[$name] = $value;\n }", "public function setParameter($name, $value)\n {\n $this->parameters[$name] = $value;\n }", "public function __set($param, $value)\r\n {\r\n $this->params_named->set($param, $value);\r\n }", "protected function setParam($name, $value) {\n if (!array_key_exists($name, $this->params)) {\n throw new \\Exception(E()->Utils->translate('ERR_DEV_NO_PARAM').': '.$name.' @'.$this->getName() , SystemException::ERR_DEVELOPER);\n }\n if ($name == 'active') {\n $value = (bool)$value;\n }\n if (is_scalar($value)) {\n $value = explode('|', $value);\n $this->params[$name] =\n (sizeof($value) == 1) ? current($value) : $value;\n } elseif (is_array($value)) {\n $this->params[$name] = $value;\n } else {\n $this->params[$name] = $value;\n }\n }" ]
[ "0.7294095", "0.7273377", "0.70640916", "0.702777", "0.6996736", "0.6936444", "0.67541283", "0.67435306", "0.66797054", "0.6662459", "0.66475296", "0.66330963", "0.6558258", "0.65532917", "0.64926153", "0.64902455", "0.6477107", "0.64545625", "0.64384955", "0.6432275", "0.6429642", "0.6419755", "0.6410155", "0.64092505", "0.63956225", "0.6365313", "0.63560337", "0.63512856", "0.63390535", "0.6335073" ]
0.74010634
0
STAMPA LISTA EVENTI stampa completa
function stampaListaIstanzeEvento() { include 'configurazione.php'; include 'connessione.php'; $sql = "SELECT E.id, eld.data_ora FROM Evento AS E INNER JOIN eventoLuogoData AS eld ON E.id = eld.id_evento ORDER BY data_ora, id;"; $stmt = $conn->prepare($sql); $stmt->execute(); $stmt->bind_result($id, $data_ora); $daRitornare=""; $ultimaData = "pagliaccio baraldi"; while($stmt->fetch()) { if($ultimaData != dataIta($data_ora)) { $daRitornare.= "". "<h2 class='w3-orange w3-center cappato'>" . dataIta($data_ora) . "</h2>" ; } $daRitornare.= stampaIstanzaEvento($id) . "<br>"; $ultimaData = dataIta($data_ora); } return $daRitornare; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function stampaFormEvento($utenti = null,$festivo = null){\n $mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile','Maggio', 'Giugno', 'Luglio', 'Agosto','Settembre', 'Ottobre', 'Novembre','Dicembre');\n $giorni = array(1=>'Luned&igrave','Marted&igrave','Mercoled&igrave','Gioved&igrave','Venerd&igrave','Sabato','Domenica');\n $data = Utilita::getDataHome();\n $evt = new Evento();\n\n if(isset($_GET['id_evento']) && !isset($_POST['action'])){\n $evt->getValoriDB($_GET['id_evento']);\n }\n else{\n $evt->getValoriPost();\n }\n ?>\n <div class=\"aggiungiEventoContainer\" id=\"sel\">\n <?php\n if(Autorizzazione::gruppoAmministrazione($_SESSION[\"username\"]) || ($_SESSION[\"id_utente\"] == $evt->getDipendente() && $evt->getStato() == 1) || !$evt->getID())\n stampaEvento::stampaFormAggiungiEvento($mesi, $giorni, $data, $evt,$festivo);\n else {\n foreach ($utenti as $val) {\n if ($val == $evt->getDipendente()) {\n stampaEvento::stampaVisualizzaEvento($mesi, $giorni, $data, $evt); \n break;\n }\n\n }\n \n }\n \n ?>\n </div>\n <?php\n }", "function agenda_liste_avertir($id_agenda, $annee_choisie, $mois_choisi) {\n\n\t$message = NULL;\n\n\t$contexte_aff = agenda_definir_contexte(0);\n\t$debut_saison = $contexte_aff['debut_saison'];\n\t$type_saison = $contexte_aff['type_saison'];\t\t\n\n\tif (intval($debut_saison) != 1) \n\t\t$annee_choisie = (intval($mois_choisi) < intval($debut_saison)) ? $annee_choisie : strval(intval($annee_choisie)+1);\n\n\t$count_evt = count(agenda_recenser_evenement(0));\n\t$count_evt_filtre = agenda_liste_afficher(0);\n\n\tif ($count_evt == 0)\n\t\t$message = _T('sarkaspip:msg_0_evt_agenda');\n\telse\n\t\tif ($count_evt_filtre == 0)\n\t\t\tif (intval($debut_saison) == 1)\n\t\t\t\t$message = _T('sarkaspip:msg_0_evt_annee').'&nbsp;'.$annee_choisie;\n\t\t\telse\n\t\t\t\tif ($type_saison == 'annee')\n\t\t\t\t\t$message = _T('sarkaspip:msg_0_evt_saison').'&nbsp;'.$annee_choisie;\n\t\t\t\telseif ($type_saison == 'periode')\n\t\t\t\t\t$message = _T('sarkaspip:msg_0_evt_saison').'&nbsp;'.strval(intval($annee_choisie)-1).'-'.$annee_choisie;\n\t\t\t\telse // $type_saison == 'periode_abregee'\n\t\t\t\t\t$message = _T('sarkaspip:msg_0_evt_saison').'&nbsp;'.substr(strval(intval($annee_choisie)-1),2,2).'-'.substr($annee_choisie,2,2);\n\n\treturn $message;\n}", "static function stampaReportEventi($utenti = null){\n $dataGiorno = Utilita::getDataHome();\n $visualizza = 6;\n $prio = Utilita::getValoreFiltro($_GET['prio']);\n $utente = Utilita::getValoreFiltro($_GET['utn']);\n $filiale = Utilita::getValoreFiltro($_GET['filiale']);\n $tipo = Utilita::getValoreFiltro($_GET['tipo']);\n $da = mktime(23, 59, 59, date(\"n\",$dataGiorno), date(\"j\",$dataGiorno), date(\"Y\",$dataGiorno));\n $a = mktime(0, 0, 0, date(\"n\",$dataGiorno), date(\"j\",$dataGiorno), date(\"Y\",$dataGiorno));\n $sql = \"SELECT count(*) as totEventi FROM eventi e,causali c,dipendenti d,filiali f WHERE DATA_DA <= ? and DATA_A >= ? and c.id_motivo = e.fk_causale and d.fk_filiale = f.id_filiale and d.id_dipendente = e.fk_dipendente and (e.fk_causale = ? or ? = 0 ) and (e.priorita = ? or ? = 0 ) and (e.fk_dipendente = ? or ? = 0 ) and (d.fk_filiale = ? or ? = 0 )\";\n $rs = Database::getInstance()->eseguiQuery($sql,array($da,$a,$tipo,$tipo,$prio,$prio,$utente,$utente,$filiale,$filiale));\n $minRiga = Utilita::getNewMinRiga($_POST['codPag'],$_POST['minRiga'],$rs->fields[\"totEventi\"],$visualizza);\n\n $editTxt = '<a alt=\"edit\" href=\"'.Utilita::getHomeUrlFiltri().'&data='.$dataGiorno.'&id_evento=';\n $editTxt2 = '&minrg='.$minRiga.'\"><img border=\"0\" src=\"./img/';\n $prioTxt = '<img src=\"./img/prio'; $prioTxt2 = '.png\" />';\n if(!Autorizzazione::gruppoAmministrazione($_SESSION[\"username\"])){\n $listaUtenti = implode(\",\", $utenti);\n foreach ($utenti as $key => $value) {\n if($value == $utente) {\n $listaUtenti = $utente;\n break;\n }\n }\n $sql = \"SELECT e.id_evento as id, CONCAT(?,e.priorita,?) as ' ', CONCAT(?,e.id_evento,?,CASE WHEN (e.fk_dipendente = ? AND e.stato = 1)THEN 'modifica' ELSE 'dett' END,'.png\\\" /></a>') as Edit, c.nome as Causale,d.username as Utente,date_format(FROM_UNIXTIME(e.data_da),'%d.%m.%y') as Dal,date_format(FROM_UNIXTIME(e.data_a),'%d.%m.%y') as Al,f.nome as Filiale,CASE WHEN e.stato = 1 THEN 'Richiesto' WHEN e.stato = 2 THEN 'Accettato' ELSE 'Segnalato' END as Stato,CASE WHEN e.durata = 'G' THEN 'Giorno' WHEN e.durata = 'M' THEN 'Mattino' ELSE 'Pomeriggio' END as Periodo\n FROM eventi e,causali c,dipendenti d,filiali f\n WHERE DATA_DA <= ? AND DATA_A >= ? AND c.id_motivo = e.fk_causale\n AND d.fk_filiale = f.id_filiale\n AND d.id_dipendente = e.fk_dipendente\n AND (e.fk_causale = ? or ? = 0 )\n AND (e.priorita = ? or ? = 0 )\n AND (e.fk_dipendente in (\".$listaUtenti.\")) ORDER BY e.priorita DESC,e.data_da,c.nome,d.username\";\n\n\n $rs = Database::getInstance()->eseguiQuery($sql,array($prioTxt,$prioTxt2,$editTxt,$editTxt2,$_SESSION[\"id_utente\"],$da,$a,$tipo,$tipo,$prio,$prio));\n }\n else {\n $cnfTxt = '<a alt=\"conferma\" href=\"?pagina=amministrazione&tab=gestione_segnalazioni&azione=visualizza&id_evento=';\n $cnfTxt2 = '\">Conferma</a>';\n $sql = \"SELECT e.id_evento as id, CONCAT(?,e.priorita,?) as ' ', CONCAT(?,e.id_evento,?,'modifica.png\\\"/></a>') as Edit, c.nome as Causale,d.username as Utente,date_format(FROM_UNIXTIME(e.data_da),'%d.%m.%y') as Dal,date_format(FROM_UNIXTIME(e.data_a),'%d.%m.%y') as Al,f.nome as Filiale,CASE WHEN e.stato = 1 THEN 'Richiesto' WHEN e.stato = 2 THEN 'Accettato' ELSE CONCAT(?,e.id_evento,?) END as Stato,CASE WHEN e.durata = 'G' THEN 'Giorno' WHEN e.durata = 'M' THEN 'Mattino' ELSE 'Pomeriggio' END as Periodo FROM eventi e,causali c,dipendenti d,filiali f WHERE DATA_DA <= ? and DATA_A >= ? and c.id_motivo = e.fk_causale and d.fk_filiale = f.id_filiale and d.id_dipendente = e.fk_dipendente and (e.fk_causale = ? or ? = 0 ) and (e.priorita = ? or ? = 0 ) and (e.fk_dipendente = ? or ? = 0 ) and (d.fk_filiale = ? or ? = 0 ) ORDER BY e.priorita DESC,e.data_da,c.nome,d.username\";\n $rs = Database::getInstance()->eseguiQuery($sql,array($prioTxt,$prioTxt2,$editTxt,$editTxt2,$cnfTxt,$cnfTxt2,$da,$a,$tipo,$tipo,$prio,$prio,$utente,$utente,$filiale,$filiale));\n }\n if($rs->fields){\n echo '<p class=\"cellaTitoloTask\">'.stampaEvento::getTitoloReport($dataGiorno).'</p>';\n Utilita::stampaTabella($rs, $_GET[\"id_evento\"],$visualizza);\n }\n \n }", "function main()\n{\n\t$stdin = fopen('listeEvt.txt', 'r');\n\t$stdout = fopen('php://stdout', 'w');\n \n $nbEvt = 0;\n $evtTab = array();\n\t \n if ($stdin) {\n $line = 0;\n while (!feof($stdin)) {\n $buffer = fgets($stdin, 4096);\n // La première ligne contient le nombre total d'évènements\n if ($line == 0) {\n $nbEvt = $buffer;\n\n } else {\n // On vérifie qu'on ne dépasse pas le nombre d'évènements définit au début\n if ($line <= $nbEvt) {\n // On récupère la date de début et la durée de l'évènement\n $evt = explode(\";\", $buffer);\n if (sizeof($evt) > 1) {\n // Récupère les valeurs Année Mois Jour pour la date de début\n $dateDebutExplode = explode(\"-\", $evt[0]);\n $dateDebutTab[0] = intval($dateDebutExplode[0]);\n $dateDebutTab[1] = intval($dateDebutExplode[1]);\n $dateDebutTab[2] = intval($dateDebutExplode[2]);\n $dateDebutEvt= $evt[0];\n // Calcul la date de fin\n $endDate = calcEndDate($dateDebutTab, intval($evt[1]));\n // On rajoute des zéros devant pour faciliter le tri par date de début\n $keyMonth = ($dateDebutTab[1] < 10) ? \"0\".$dateDebutTab[1] : $dateDebutTab[1];\n $keyDay = ($dateDebutTab[2] < 10) ? \"0\".$dateDebutTab[2] : $dateDebutTab[2];\n $evtTab[] = array(\"startDate\" => $dateDebutTab[0].\"\".$keyMonth.\"\".$keyDay, \"endDate\" => $endDate, \"nbDay\" => $evt[1]);\n }\n // Tri du tableau par date de début puis par durée\n usort($evtTab, \"evtComparator\");\n }\n }\n $line++;\n }\n // Evt count\n $nbEvt = 0;\n $currentDate = \"\";\n if (sizeof($evtTab) > 0) {\n\n // Retire les évènements chevauchant sur plus d'un autre évènement\n $evtTab = evtFilter($evtTab);\n\n // Compte le nombre d'évènements non chevauchant \n foreach ($evtTab as $key => $evt) {\n if ($currentDate == \"\") {\n $currentDate = $evt[\"endDate\"];\n $nbEvt++;\n } else {\n // Si la date de fin du premier ne chevauche pas la date de début du deuxième\n if ($currentDate < $evt['startDate']) {\n $currentDate = $evt['endDate'];\n $nbEvt += 1;\n }\n }\n }\n }\n }\n\n var_dump($nbEvt);\n\t\n fwrite($stdout, $nbEvt);\n \n\tfclose($stdout);\n\tfclose($stdin);\n}", "public function eventfeedAction()\n {\n $this->disableView();\n $this->setCustomHeader('json');\n //get params\n $startTime = $this->_getParam('start');\n $endTime = $this->_getParam('end');\n $idJabatan = $this->_getParam('id_jabatan');\n $idSkenario = $this->_getParam('id_skenario');\n //get list of events\n $listEvent = $this->getEventFeed($startTime, $endTime, $idJabatan, $idJabatan);\n //initialize empty array\n $arrayEvent = array();\n //loop through the list of the events\n if(count($listEvent))\n {\n foreach($listEvent as $event)\n {\n //converting date time format\n $asumsiDayStart = date('d', strtotime($event['asumsi_start']));\n $asumsiDayEnd = date('d', strtotime($event['asumsi_end']));\n $asumsiDateStart = date('d/F/Y', strtotime($event['asumsi_start']));\n $asumsiDateEnd = date('d/F/Y', strtotime($event['asumsi_end']));\n $asumsiTimeStart = date('H:i:s', strtotime($event['asumsi_start']));\n $asumsiTimeEnd = date('H:i:s', strtotime($event['asumsi_end']));\n //if a one day events only\n if( $asumsiDayStart == $asumsiDayEnd )\n {\n //print the date only once\n $title = $event['nama_kegiatan'] . ' waktu asumsi ' . $asumsiDateStart . ', ';\n }else{\n //print only the start and end date\n $title = $event['nama_kegiatan'] . ' waktu asumsi ' . $asumsiDateStart . ' - ' . $asumsiDateEnd . ', ';\n }\n //print the timeline\n $title .= $asumsiTimeStart . ' - ' . $asumsiTimeEnd;\n //print assumption time\n $title .= ' Perbandingan Sebenarnya : Asumsi = ' . $event['asumsi_perbandingan'];\n //add edit links only if user can access the edit forms: latihan-rol-edit\n if (Zend_Auth::getInstance()->hasIdentity()) {\n $identity = Zend_Auth::getInstance()->getStorage()->read();\n $tablePrivileges = new Latihan_Model_DbTable_Privileges();\n if($tablePrivileges->checkRolesPrivileges('latihan', 'rol', 'edit', $identity->role_id) >= 1)\n {\n $tempArray = array(\n 'id' => $event['id_rol'],\n 'start' => $event['realtime_start'],\n 'end' => $event['realtime_end'],\n 'url' => $this->view->baseUrl('latihan/rol/edit/id/') . $event['id_rol'] ,\n 'title' => $title,\n 'allDay' => false\n );\n }else{\n $tempArray = array(\n 'id' => $event['id_rol'],\n 'start' => $event['realtime_start'],\n 'end' => $event['realtime_end'],\n 'title' => $title,\n 'allDay' => false\n );\n }\n }\n //form into fullcalendar json object format\n array_push($arrayEvent, $tempArray);\n }\n echo json_encode($arrayEvent);\n }\n }", "function getEventosScreenshotElemento() {\n\t global $mdb2;\n\t global $log;\n\t global $current_usuario_id;\n\t global $data;\n\t global $marcado;\n\t global $usr;\n\t include 'utils/get_eventos.php';\n\t $event = new Event;\n\t $graficoSvg = new GraficoSVG();\n\n\t if($this->extra[\"imprimir\"]){\n\t \t$objetivo = new ConfigEspecial($this->objetivo_id);\n\n\t\t\t$nombre_objetivo = $objetivo->nombre;\n\t\t\t//echo $nombre_objetivo;\n\n\t \t$usuario = new Usuario($current_usuario_id);\n\t\t\t$usuario->__Usuario();\n\t \t$json = get_eventos($current_usuario_id, $this->objetivo_id, date(\"Y-m-d H:i\", strtotime($this->timestamp->getInicioPeriodo())), date(\"Y-m-d H:i\",strtotime($this->timestamp->getTerminoPeriodo())), $usuario->clave_md5);\n\t \t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t $T->setFile('tpl_tabla', 'contenedor_tabla.tpl');\n\t\t $T->setVar('__nombre_obj', $nombre_objetivo);\n\t\t $T->setVar('__contenido', $json);\n\t\t $T->setVar('__valid_contenido', true);\n\t\t $this->resultado = $T->parse('out', 'tpl_tabla');\n\t }else{\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\t\t $T->setVar('__valid_contenido', false);\n\t\t # Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t $timeZoneId = $usr->zona_horaria_id;\n\t\t $arrTime = Utiles::getNameZoneHor($timeZoneId);\n\t\t $timeZone = $arrTime[$timeZoneId];\n\t\t $arrayDateStart = array();\n\t\t $tieneEvento = 'false';\n\t\t $data = null;\n\t\t $ids = null;\n\n\t\t $sql1 = \"SELECT * FROM reporte._detalle_marcado(\".pg_escape_string($current_usuario_id).\",ARRAY[\".pg_escape_string($this->objetivo_id).\"],'\".pg_escape_string($this->timestamp->getInicioPeriodo()).\"','\".pg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t// \t \t print($sql1);\n\t\t \t$res1 =& $mdb2->query($sql1);\n\t\t \tif (MDB2::isError($res1)) {\n\t\t \t $log->setError($sql1, $res1->userinfo);\n\t\t \t exit();\n\t\t \t}\n\t\t \tif($row1= $res1->fetchRow()){\n\t\t \t $dom1 = new DomDocument();\n\t\t \t $dom1->preserveWhiteSpace = FALSE;\n\t\t \t $dom1->loadXML($row1['_detalle_marcado']);\n\t\t \t $xpath1 = new DOMXpath($dom1);\n\t\t \t unset($row1[\"_detalle_marcado\"]);\n\t\t \t}\n\t\t \t$tag_marcardo_mantenimientos = $xpath1->query(\"/detalles_marcado/detalle/marcado\");\n\t\t \t# Busca y guarda si existen marcados dentro del xml.\n\t\t \tforeach ($tag_marcardo_mantenimientos as $tag_marcado){\n\t\t \t $ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t \t $marcado = true;\n\t\t \t}\n\t\t \t# Verifica que existan marcados por el usuario.\n\t\t \tif ($marcado == true) {\n\t\t \t $dataMant =$event->getData(substr($ids, 1), $timeZone);\n\t\t \t $character = array(\"{\", \"}\");\n\t\t \t $objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t \t $tieneEvento = 'true';\n\t\t \t $data = json_encode($dataMant);\n\t\t \t}\n\t\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t if($this->extra[\"semaforo\"]==2){\n\t\t\t $semaforo=2;\n\t\t\t }else{\n\t\t\t $semaforo=1;\n\t\t\t }\n\t\t\t //$T->setVar('__contenido_id', 'even__'.$this->extra[\"monitor_id\"]);\n\t\t\t $T->setVar('__contenido_tabla', $this->getDetalleEventosScreenshotElementos($this->extra[\"monitor_id\"], $this->extra[\"pagina\"], $semaforo));\n\t\t\t $T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t $T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t return $this->resultado = $T->parse('out', 'tpl_tabla');\n\t\t\t}\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT foo.nodo_id FROM (\".\n\t\t\t\t \"SELECT DISTINCT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\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($this->timestamp->getInicioPeriodo()).\"','\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')) AS foo, nodo n \".\n\t\t\t\t \"WHERE foo.nodo_id=n.nodo_id ORDER BY orden\";\n\t//\t\tprint($sql);\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\t\t\t$monitor_ids = array();\n\t\t\twhile($row = $res->fetchRow()) {\n\t\t\t\t$monitor_ids[] = $row[\"nodo_id\"];\n\t\t\t}\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif (count($monitor_ids) == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$orden = 1;\n\t\t\tforeach ($monitor_ids as $monitor_id) {\n\t\t\t\t$T->setVar('__contenido_id', 'even_'.$monitor_id);\n\t\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleEventosScreenshotElementos($monitor_id, 1, 1, $orden));\n\t\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t\t$orden++;\n\t\t\t}\n\t\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t\t\tif ($data != null){\n\t\t\t\t$this->resultado.= $graficoSvg->getAccordion($data,'accordionEvento');\n\t\t\t}\n\t\t}\n\t}", "function stampaPersona($numeroEvento, $conn) {\n \n $stmt = $conn->prepare(\"SELECT tep.nome, P.alt_name, P.nome, P.cognome, P.id FROM (((eventoPersona AS ep INNER JOIN tipologiaEventoPersona AS tep ON tep.id = ep.tipologia) INNER JOIN Evento AS E ON E.id = ep.id_evento) INNER JOIN Persona AS P ON P.id = ep.id_persona) WHERE E.id = ? ORDER BY ep.tipologia\");\n $stmt->bind_param(\"i\", $numeroEvento);\n $stmt->execute();\n $stmt->bind_result($nome_tipo_rapporto, $alt_name, $nome, $cognome, $id);\n \n $daRitornare=\"\";\n \n $ultimaTipologia = \"babbi l'orsetto\";\n while($stmt->fetch()) {\n \n \n if( $nome_tipo_rapporto == $ultimaTipologia ){\n $daRitornare.= \", \". stampaNome($id, $conn);\n }else{\n if($ultimaTipologia != \"babbi l'orsetto\"){$daRitornare.= \"<br>\";}\n $daRitornare.= \"<b class='cappato'>\" . $nome_tipo_rapporto . \":</b> \";\n $daRitornare.= stampaNome($id);\n }\n \n $ultimaTipologia = $nome_tipo_rapporto; \n }\n return $daRitornare;\n }", "function periodicite_evt($evt_tmp)\r\n{\r\n\tglobal $trad;\r\n\t////\tJours de la semaine\r\n\tif($evt_tmp[\"periodicite_type\"]==\"jour_semaine\"){\r\n\t\tforeach(explode(\",\",$evt_tmp[\"periodicite_valeurs\"]) as $jour)\t{ @$txt_jours .= $trad[\"jour_\".$jour].\", \"; }\r\n\t\treturn $trad[\"AGENDA_period_jour_semaine\"].\" : \".trim($txt_jours,\", \");\r\n\t}\r\n\t////\tJours du mois\r\n\tif($evt_tmp[\"periodicite_type\"]==\"jour_mois\"){\r\n\t\treturn $trad[\"AGENDA_period_jour_mois\"].\" : \".str_replace(\",\", \", \", $evt_tmp[\"periodicite_valeurs\"]);\r\n\t}\r\n\t////\tMois\r\n\tif($evt_tmp[\"periodicite_type\"]==\"mois\"){\r\n\t\tforeach(explode(\",\",$evt_tmp[\"periodicite_valeurs\"]) as $mois)\t\t{ @$txt_mois .= $trad[\"mois_\".round($mois)].\", \"; }\r\n\t\treturn $trad[\"AGENDA_period_mois\"].\" : \".$trad[\"le\"].\" \".strftime(\"%d\",strtotime($evt_tmp[\"date_debut\"])).\" \".trim($txt_mois,\", \");\r\n\t}\r\n\t////\tAnnée\r\n\tif($evt_tmp[\"periodicite_type\"]==\"annee\"){\r\n\t\treturn $trad[\"AGENDA_period_annee\"].\", \".$trad[\"le\"].\" \".strftime(\"%d %B\",strtotime($evt_tmp[\"date_debut\"]));\r\n\t}\r\n}", "function liste_evenements($id_agenda, $T_debut_periode, $T_fin_periode, $journee_order_by=true, $type_sortie=\"lecture\")\r\n{\r\n\t////\tPériode simple : début dans la période || fin dans la période || debut < periode < fin\r\n\t$date_debut\t\t= strftime(\"%Y-%m-%d %H:%M:00\", $T_debut_periode);\r\n\t$date_fin\t\t= strftime(\"%Y-%m-%d %H:%M:59\", $T_fin_periode);\r\n\t$sql_periode\t= \"((T1.date_debut between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_fin between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_debut < '\".$date_debut.\"' and T1.date_fin > '\".$date_fin.\"'))\";\r\n\t////\tPériodicité des événements : type périodicité spécifié && debut déjà commencé && fin pas spécifié/arrivé && date pas dans les exceptions && périodicité jour/semaine/mois/annee\r\n\t$period_date_fin = strftime(\"%Y-%m-%d\", $T_fin_periode);\r\n\t$date_ymd\t\t= strftime(\"%Y-%m-%d\", $T_debut_periode);\r\n\t$jour_semaine\t= str_replace(\"0\",\"7\",strftime(\"%w\",$T_debut_periode)); // de 1 à 7 (lundi à dimanche)\r\n\t$mois\t\t\t= strftime(\"%m\",$T_debut_periode); // mois de l'annee en numérique => 01 à 12\r\n\t$jour_mois\t\t= strftime(\"%d\",$T_debut_periode); // jour du mois en numérique => 01 à 31\r\n\t$jour_annee\t\t= strftime(\"%m-%d\", $T_debut_periode);\r\n\t$periodicite\t= \"(T1.periodicite_type is not null AND T1.date_debut<'\".$date_debut.\"' AND (T1.period_date_fin is null or '\".$period_date_fin.\"'<=T1.period_date_fin) AND (T1.period_date_exception is null or period_date_exception not like '%\".$date_ymd.\"%') AND ((T1.periodicite_type='jour_semaine' and T1.periodicite_valeurs like '%\".$jour_semaine.\"%') OR (T1.periodicite_type='jour_mois' and T1.periodicite_valeurs like '%\".$jour_mois.\"%') OR (T1.periodicite_type='mois' and T1.periodicite_valeurs like '%\".$mois.\"%' and DATE_FORMAT(T1.date_debut,'%d')='\".$jour_mois.\"') OR (T1.periodicite_type='annee' and DATE_FORMAT(T1.date_debut,'%m-%d')='\".$jour_annee.\"')))\";\r\n\t////\tRécupère la liste des evenements ($order_by_sql==\"heure_debut\" si on récup les évenements d'1 jour, pour pouvoir bien intégrer les evenements récurents)\r\n\t$order_by_sql = ($journee_order_by==true) ? \"DATE_FORMAT(T1.date_debut,'%H')\" : \"T1.date_debut\";\r\n\t$liste_evenements_tmp = db_tableau(\"SELECT T1.* FROM gt_agenda_evenement T1, gt_agenda_jointure_evenement T2 WHERE T1.id_evenement=T2.id_evenement AND T2.id_agenda='\".intval($id_agenda).\")' AND T2.confirme='1' AND (\".$sql_periode.\" OR \".$periodicite.\") ORDER BY \".$order_by_sql.\" asc\");\r\n\r\n\t////\tCree le tableau de sortie (en ajoutant le droit d'accès, masquant les libellés si besoin, etc.)\r\n\tglobal $objet;\r\n\t$liste_evenements = array();\r\n\tforeach($liste_evenements_tmp as $key_evt => $evt_tmp)\r\n\t{\r\n\t\t$droit_acces = droit_acces($objet[\"evenement\"], $evt_tmp, false);\r\n\t\tif($type_sortie==\"tout\" || ($type_sortie==\"lecture\" && $droit_acces>0))\r\n\t\t{\r\n\t\t\t// Ajoute l'evenement au tableau de sortie avec son droit d'accès\r\n\t\t\t$liste_evenements[$key_evt] = $evt_tmp;\r\n\t\t\t$liste_evenements[$key_evt][\"droit_acces\"] = $droit_acces;\r\n\t\t\t// masque les détails si besoin : \"evt public mais détails masqués\"\r\n\t\t\tif($type_sortie==\"lecture\") $liste_evenements[$key_evt] = masque_details_evt($liste_evenements[$key_evt]);\r\n\t\t}\r\n\t}\r\n\treturn $liste_evenements;\r\n}", "public function index()\n {\n $pegawais = Pegawai::all();\n $absens = Absen::where('absensi', '=', 0)->orderBy('pegawai_id', 'asc')->orderBy('tanggal', 'asc')->get();\n /*\n $events = array();\n foreach($absens as $absen)\n {\n $event = array();\n $event['title'] = $absen->pegawai->user->name;\n $event['start'] = $absen->tanggal;\n $events[] = $event; \n }\n $events = json_encode($events);\n */\n \n $absenCounter = count($absens);\n $count = 0;\n $events = array();\n\n if ($absenCounter > 0)\n { \n $prev = strtotime($absens[0]->tanggal);\n $tempevent = null;\n $prevId = $absens[0]->pegawai_id;\n foreach ($absens as $absen)\n {\n $idP = $absen->pegawai_id;\n $now = strtotime($absen->tanggal);\n if ($idP == $prevId)\n {\n if ($now - $prev == 86400)\n $tempevent['end'] = date('Y-m-d', $now + 86400);\n else\n {\n if (isset($tempevent))\n $events[] = $tempevent;\n\n $event = array();\n $event['title'] = $absen->pegawai->user->name;\n $event['start'] = explode(' ',$absen->tanggal)[0];\n $tempevent = $event;\n }\n }\n else\n {\n if (isset($tempevent))\n $events[] = $tempevent;\n\n $event = array();\n $event['title'] = $absen->pegawai->user->name;\n $event['start'] = explode(' ',$absen->tanggal)[0];\n $tempevent = $event;\n }\n $count++;\n if ($count < $absenCounter)\n $prev = $now;\n $prevId = $idP;\n }\n\n\n if ($now - $prev == 86400)\n $tempevent['end'] = date('Y-m-d', $now + 86400);\n $events[] = $tempevent;\n }\n $events = json_encode($events); \n\n return view('home', compact('pegawais', 'events'));\n>>>>>>> 89b1f447d154be4b9e1c19744a84d468801d0ac7\n }", "function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "public function index(): array\n {\n// Co::create(function () {\n// echo date('Y-m-d H:i:s');\n// Co::sleep(5);\n// Log::info('swoft go');\n// });\n \\Swoft::trigger('event.demosss');\n return ['item0', 'item1'];\n }", "function afficherevent(){\r\n\t\t$sql=\"SElECT * From eventt\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t\t$liste=$db->query($sql);\r\n\t\t\treturn $liste;\r\n\t\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '. $e->getMessage());\r\n \t\t\t\t\t}\t\r\n\t}", "function agenda_debug_evenement($id_agenda=0, $liste_choisie='liste_evt') {\n\n\tif ($liste_choisie == 'liste_evt') {\n\t\t$evenements = agenda_recenser_evenement(0);\n\t\t$count_evt = count($evenements);\n\n\t\tfor ($i=1;$i<=$count_evt;$i++) {\n\t\t\techo '<br /><strong>EVT Num'.$i.'</strong><br />';\n\t\t\techo '<strong>Titre</strong>: '.$evenements[$i]['titre'].'<br />';\n\t\t\techo '<strong>Id</strong>: '.$evenements[$i]['id'].'<br />';\n\t\t\techo '<strong>Date Redac</strong>: '.$evenements[$i]['date_redac'].'<br />';\n\t\t\techo '<strong>Date</strong>: '.$evenements[$i]['date'].'<br />';\n\t\t\techo '<strong>Heure</strong>: '.$evenements[$i]['heure'].'<br />';\n\t\t\techo '<strong>Jour</strong>: '.$evenements[$i]['jour'].'<br />';\n\t\t\techo '<strong>Mois</strong>: '.$evenements[$i]['mois'].' | '.$evenements[$i]['nom_mois'].'<br />';\n\t\t\techo '<strong>Annee</strong>: '.$evenements[$i]['annee'].'<br />';\n\t\t\techo '<strong>Saison</strong>: '.$evenements[$i]['saison'].'<br />';\n\t\t\techo '<strong>Lien page</strong>: '.$evenements[$i]['lien_page'].'<br />';\n\t\t\techo '<strong>Categorie</strong>: '.$evenements[$i]['categorie'].'<br />';\n\t\t}\n\t}\n\telse {\n\t\t$evenements = agenda_recenser_evenement(-1);\n\n\t\tforeach ($evenements as $jour => $liste) {\n\t\t\techo '<br /><strong>JOUR: </strong>'.$jour.' ('.count($liste).')<br />';\n\t\t\tforeach ($liste as $num_evt)\n\t\t\t\techo $num_evt.', ';\n\t\t\techo '<br />';\n\t\t}\n\t}\n}", "public function lastSpoolAction()\n {\n $arraySpool = array();\n\n try {\n\n // last spool SF3\n $lquery = new Query($this->container->getParameter(\"lavoisier01\"), 'OPSCORE_portal_spoolMail', 'lavoisier');\n $xml = simplexml_load_string($lquery->execute(), 'SimpleXMLElement', LIBXML_NOCDATA);\n\n $tabSpoolSF3 = json_decode(json_encode($xml), TRUE);\n\n\n $arraySpool[\"sf3 lavoisier01\"] = array(\n \"GenerationDate\" => trim(str_replace(\"[\", \"\", explode(\"]\", $tabSpoolSF3[\"entry\"])[0])),\n \"Sent\" => trim(explode(\"...\", $tabSpoolSF3[\"entry\"])[1])\n );\n\n $lquery = new Query($this->container->getParameter(\"lavoisierfr\"), 'OPSCORE_portal_spoolMail', 'lavoisier');\n $xml = simplexml_load_string($lquery->execute(), 'SimpleXMLElement', LIBXML_NOCDATA);\n\n $tabSpoolSF3 = json_decode(json_encode($xml), TRUE);\n\n\n $arraySpool[\"sf3 lavoisierfr\"] = array(\n \"GenerationDate\" => trim(str_replace(\"[\", \"\", explode(\"]\", $tabSpoolSF3[\"entry\"])[0])),\n \"Sent\" => trim(explode(\"...\", $tabSpoolSF3[\"entry\"])[1])\n );\n\n\n //last spool SF1\n $lquery = new Query($this->container->getParameter(\"lavoisier01\"), 'OPSCORE_portal_cron_sendMail', 'lavoisier');\n $xml = simplexml_load_string($lquery->execute(), 'SimpleXMLElement', LIBXML_NOCDATA);\n\n $tabSpoolSF1 = json_decode(json_encode($xml), TRUE);\n\n $arraySpool[\"sf1 lavoisier01\"] = array(\n \"GenerationDate\" => $tabSpoolSF1[\"GenerationDate\"],\n \"Sent\" => $tabSpoolSF1[\"Sent\"] . \" emails sent\"\n );\n\n $lquery = new Query($this->container->getParameter(\"lavoisierfr\"), 'OPSCORE_portal_cron_sendMail', 'lavoisier');\n $xml = simplexml_load_string($lquery->execute(), 'SimpleXMLElement', LIBXML_NOCDATA);\n\n $tabSpoolSF1 = json_decode(json_encode($xml), TRUE);\n\n $arraySpool[\"sf1 lavoisierfr\"] = array(\n \"GenerationDate\" => $tabSpoolSF1[\"GenerationDate\"],\n \"Sent\" => $tabSpoolSF1[\"Sent\"] . \" emails sent\"\n );\n\n\n return $this->render(\":backend/Home:lastSpool.html.twig\", array(\"tabSpool\" => $arraySpool));\n\n } catch (\\Exception $e) {\n return $this->render(\":backend/Home:lastSpool.html.twig\", array(\"error\" => $e->getMessage()));\n }\n\n }", "private function add_events()\r\n {\r\n $events = $this->events;\r\n foreach ($events as $time => $items)\r\n {\r\n $column = date('H', $time) / $this->hour_step + 1;\r\n foreach ($items as $item)\r\n {\r\n $content = $item['content'];\r\n $row = $item['index'] + 1;\r\n \r\n $cell_content = $this->getCellContents($row, $column);\r\n $cell_content .= $content;\r\n $this->setCellContents($row, $column, $cell_content);\r\n }\r\n }\r\n \r\n }", "function posponer(){\n $inicio_mt = $this->_formatear($_REQUEST['from']);\n $fin_mt = $this->_formatear($_REQUEST['to']);\n $id = $_REQUEST['id'];\n $data['inicio_normal']=$_REQUEST['from'];\n $data['final_normal']=$_REQUEST['to'];\n $data['start']=$inicio_mt;\n $data['end']=$fin_mt;\n // $data['motivo']\n $data['id'] = $id;\n\n $this->model_cal->posponer($data);\n\n header('Location: index.php?controller=calendario');\n }", "function post_eventos()\n\t{\n\t\tif ($this->disparar_importacion_efs ) {\n\t\t\tif (isset($this->s__importacion_efs['datos_tabla'])) {\n\t\t\t\t$clave = array('proyecto' => toba_editor::get_proyecto_cargado(),\n\t\t\t\t\t\t\t\t\t\t\t'componente' => $this->s__importacion_efs['datos_tabla']);\n\t\t\t\t$dt = toba_constructor::get_info($clave, 'toba_datos_tabla');\n\t\t\t\t$this->s__importacion_efs = $dt->exportar_datos_efs($this->s__importacion_efs['pk']);\n\t\t\t\tforeach ($this->s__importacion_efs as $ef) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (! $this->get_tabla()->existe_fila_condicion(array($this->campo_clave => $ef[$this->campo_clave]))) {\n\t\t\t\t\t\t\t$this->get_tabla()->nueva_fila($ef);\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch(toba_error $e) {\n\t\t\t\t\t\ttoba::notificacion()->agregar(\"Error agregando el EF '{$ef[$this->campo_clave]}'. \" . $e->getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->disparar_importacion_efs = false;\n\t\t}\n\t}", "function masque_details_evt($evt_tmp)\r\n{\r\n\tif($evt_tmp[\"droit_acces\"]<1){\r\n\t\tglobal $trad;\r\n\t\t$evt_tmp[\"titre\"] = \"<i>\".$trad[\"AGENDA_evt_prive\"].\"</i>\";\r\n\t\t$evt_tmp[\"description\"] = \"\";\r\n\t}\r\n\treturn $evt_tmp;\r\n}", "function menu_proposition_evt()\r\n{\r\n\t// Init\r\n\tglobal $trad, $AGENDAS_AFFECTATIONS;\r\n\t$menu_proposition_evt = \"\";\r\n\t////\tAGENDAS ACCESSIBLE EN ECRITURE (de ressource OU mon agendas perso)\r\n\tforeach($AGENDAS_AFFECTATIONS as $agenda_tmp)\r\n\t{\r\n\t\tif(($agenda_tmp[\"type\"]==\"ressource\" && $agenda_tmp[\"droit\"]>=2) || ($agenda_tmp[\"type\"]==\"utilisateur\" && is_auteur($agenda_tmp[\"id_utilisateur\"])))\r\n\t\t{\r\n\t\t\t// Evenements de l'agenda : non confirmé et dont on est pas l'auteur !\r\n\t\t\t$evts_confirmer = db_tableau(\"SELECT T1.* FROM gt_agenda_evenement T1, gt_agenda_jointure_evenement T2 WHERE T1.id_evenement=T2.id_evenement AND T2.id_agenda='\".$agenda_tmp[\"id_agenda\"].\"' AND T2.confirme='0' AND T1.id_utilisateur!='\".$_SESSION[\"user\"][\"id_utilisateur\"].\"'\");\r\n\t\t\tif(count($evts_confirmer)>0)\r\n\t\t\t{\r\n\t\t\t\t// Libelle de l'agenda\r\n\t\t\t\t$menu_proposition_evt .= \"<div id='alerte_proposition\".$agenda_tmp[\"id_agenda\"].\"' style='margin-top:10px;'>\";\r\n\t\t\t\t\t$libelle_tmp = ($agenda_tmp[\"type\"]==\"utilisateur\" && is_auteur($agenda_tmp[\"id_utilisateur\"])) ? $trad[\"AGENDA_evenements_proposes_mon_agenda\"] : $trad[\"AGENDA_evenements_proposes_pour_agenda\"].\" <i>\".$agenda_tmp[\"titre\"].\"</i>\";\r\n\t\t\t\t\t$menu_proposition_evt .= \"<img src=\\\"\".PATH_TPL.\"divers/important_small.png\\\" style='height:15px;vertical-align:middle;' /> <b>\".$libelle_tmp.\"</b>\";\r\n\t\t\t\t\t$menu_proposition_evt .= \"<script type='text/javascript'> $(window).load(function(){ $('#alerte_proposition\".$agenda_tmp[\"id_agenda\"].\"').effect('pulsate',{times:2},1000); }); </script>\";\r\n\t\t\t\t$menu_proposition_evt .= \"</div>\";\r\n\t\t\t\t// Evénements à confirmer sur l'agenda\r\n\t\t\t\t$menu_proposition_evt .= \"<ul style='margin:0px;margin-bottom:10px;padding:0px;'>\";\r\n\t\t\t\tforeach($evts_confirmer as $evt_tmp){\r\n\t\t\t\t\t$libelle_infobulle = temps($evt_tmp[\"date_debut\"],\"complet\",$evt_tmp[\"date_fin\"]).\"<br />\".$trad[\"AGENDA_evenement_propose_par\"].\" \".auteur(user_infos($evt_tmp[\"id_utilisateur\"]),$evt_tmp[\"invite\"]).\"<div style=margin-top:5px;>\".$evt_tmp[\"description\"].\"</div>\";\r\n\t\t\t\t\t$menu_proposition_evt .= \"<li onClick=\\\"confirmer_propostion_evt('\".$evt_tmp[\"id_evenement\"].\"','\".$agenda_tmp[\"id_agenda\"].\"');\\\" \".infobulle($libelle_infobulle).\" class='lien' style='margin-left:30px;margin-top:5px;'>\".$evt_tmp[\"titre\"].\"</li>\";\r\n\t\t\t\t}\r\n\t\t\t\t$menu_proposition_evt .= \"</ul>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t////\tJAVASCRIPT : CONFIRMER OU PAS UNE PROPOSITION D'EVENEMENT\r\n\tif($menu_proposition_evt!=\"\")\r\n\t{\r\n\t\t$menu_proposition_evt .=\r\n\t\t\t\"<script type='text/javascript'>\r\n\t\t\tfunction confirmer_propostion_evt(id_evt, id_agenda)\r\n\t\t\t{\r\n\t\t\t\tpage_redir = \\\"\".ROOT_PATH.\"module_agenda/index.php?id_agenda=\\\"+id_agenda;\r\n\t\t\t\tif(confirm(\\\"\".$trad[\"AGENDA_evenement_integrer\"].\"\\\"))\t\t\t\tredir(page_redir+'&id_evt_confirm='+id_evt);\r\n\t\t\t\telse if(confirm(\\\"\".$trad[\"AGENDA_evenement_pas_integrer\"].\"\\\"))\tredir(page_redir+'&id_evt_noconfirm='+id_evt);\r\n\t\t\t}\r\n\t\t\t</script>\";\r\n\t}\r\n\r\n\t////\tRETOUR\r\n\treturn $menu_proposition_evt;\r\n}", "public function run()\n {\n ListEvent::insert([\n 'nama_event' => 'Jakarta Marathon',\n 'mulai_acara' => '2020-06-24',\n 'akhir_acara' => '2020-06-26',\n 'lokasi' => 'Gelora Senayan',\n 'status' => 'Sedang Berlangsung',\n ]);\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 agenda_liste_afficher($id_agenda=0, $annee_choisie=0, $mois_choisi=0, $filtre='-1', $tri='normal') {\n\tstatic $count_evt_filtre = 0;\n\n\tif ($id_agenda == 0)\n\t\treturn $count_evt_filtre;\n\n\t$evenements = agenda_recenser_evenement(0);\n\t$count_evt = count($evenements);\n\t$count_page = agenda_liste_paginer(0);\n\n\t$liste = NULL;\n\tif (($count_evt == 0) || ($count_page == 0))\n\t\treturn $liste;\n\t\t\n\t// Determination de l'annee choisie si l'agenda est saisonnier\t\n\t$contexte_aff = agenda_definir_contexte(0);\n\t$debut_saison = $contexte_aff['debut_saison'];\n\tif (intval($debut_saison) != 1) \n\t\t$annee_choisie = (intval($mois_choisi) < intval($debut_saison)) ? $annee_choisie : strval(intval($annee_choisie)+1);\n\n\t$mois_courant = NULL;\n\t$nouveau_mois = FALSE;\n\t$count_evt_filtre = 0;\n\n\tfor ($i=1;$i<=$count_evt;$i++) {\n\t\t$j = ($tri == 'inverse') ? $count_evt - $i + 1 : $i;\n\t\tif ($evenements[$j]['saison'] == $annee_choisie) {\n\t\t\tif (($filtre == '-1') || \n\t\t\t\t(($filtre == '0') && (!$evenements[$j]['categorie'])) ||\n\t\t\t\t(($filtre != '-1') && ($filtre != 0) && (preg_match(\"/<$filtre>/\",$evenements[$j]['categorie']) > 0))) {\n\n\n\t\t\t\t$count_evt_filtre += 1;\n\t\t\t\t$mois_redac = $evenements[$j]['nom_mois'];\n\t\t\t\tif ($mois_redac != $mois_courant) {\n\t\t\t\t\t$nouveau_mois = TRUE;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$nouveau_mois = FALSE;\n\t\t\t\t}\n\n\t\t\t\tif ($nouveau_mois) {\n\t\t\t\t\tif ($mois_courant) {\n\t\t\t\t\t\t$liste .= '</ul></li>';\n\t\t\t\t\t}\n\t\t\t\t\t$liste .= '<li><a class=\"noeud\" href=\"#\">'.ucfirst($evenements[$j]['nom_mois']).'&nbsp;'.$evenements[$j]['annee'].'</a>';\n\t\t\t\t\t$liste .= '<ul>';\n\t\t\t\t}\n\t\t\t\t$mois_courant = $mois_redac;\n\t\t\t\t$liste .= '<li><a class=\"feuille\" href=\"spip.php?page=evenement&amp;id_article='.$evenements[$j]['id'].'\" title=\"'._T('sarkaspip:navigation_bulle_vers_evenement').'\">\n\t\t\t\t<span class=\"date\">['.$evenements[$j]['date'].']&nbsp;</span>&nbsp;'.$evenements[$j]['titre'].'</a></li>';\n\t\t\t}\n\t\t}\n\t}\n\n\tif ($count_evt_filtre > 0)\n\t\t$liste = '<ul>'.$liste.'</ul></li></ul>';\n\n\treturn $liste;\n}", "function event_proveerCampos($sNombreReporte, $tuplaSQL)\n {\n global $config;\n $oACL=getACL();\n $input=$apellido=$nombre=$email=\"\";\n\n //echo \"<pre>\";print_r($tuplaSQL);echo \"</pre>\";\n\n switch ($sNombreReporte) {\n case \"CALIFICAR_CALIFICABLES\":\n $apellido=$tuplaSQL['APELLIDO'];\n $nombre=$tuplaSQL['NOMBRE'];\n $fecha_realizacion=$tuplaSQL['FECHA_REALIZACION'];\n $email=$tuplaSQL['EMAIL'];\n $estatus=$tuplaSQL['ESTATUS'];\n\n if($estatus=='T' || $estatus=='V')\n $alumno= \"<a href='\".$this->sBaseURL.\n \"&calificar_calificable=Calificar&id_calificable=\".$tuplaSQL['ID_CALIFICABLE'].\n \"&id_alumno_calificable=\".$tuplaSQL['ID_ALUMNO_CALIFICABLE'].\"'>\".$tuplaSQL['ALUMNO'].\"</a>\";\n else\n $alumno=$tuplaSQL['ALUMNO'];\n\n $puntuacion=$tuplaSQL['PUNTUACION'];\n $sQuery = \" SELECT SUM(puntuacion) \".\n \" FROM ul_alumno_pregunta \".\n \" WHERE id_alumno_calificable='\".$tuplaSQL['ID_ALUMNO_CALIFICABLE'].\"' \".\n \" AND puntuacion IS NOT NULL\";\n $result = $this->oDB->getFirstRowQuery($sQuery);\n if(is_array($result)){\n if(count($result)>0)\n $puntuacion=$result[0];\n }else{\n }\n\n switch($estatus){\n case 'N':\n $estatus='No Realizado';\n break;\n case 'V':\n $estatus=\"<div style='color:#aa5500'>Visto</div>\";\n break;\n case 'T':\n $estatus=\"<div style='color:green;'>Terminado\";\n break;\n case 'A':\n $estatus='Anulado';\n break;\n default:\n $estatus=\"<div style='color:red;'>No Asignado</div>\";\n }\n\n return array(//\"INPUT\" => $input,\n \"ALUMNO\" => $alumno,\n \"APELLIDO\" => $apellido,\n \"NOMBRE\" => $nombre,\n \"EMAIL\" => $email,\n \"FECHA_REALIZACION\" => $fecha_realizacion,\n \"ESTATUS\" => $estatus,\n \"PUNTUACION\" => sprintf(\"%.2f\",$puntuacion),\n \"TOTAL\" => sprintf(\"%.2f\",$puntuacion*$tuplaSQL['PONDERACION']),\n\n );\n default:\n }\n\n return array(//\"INPUT\" => $input,\n \"APELLIDO\" => $apellido,\n \"NOMBRE\" => $nombre,\n \"EMAIL\" => $email,\n );\n }", "public function onGetEvents()\n {\n $start = input('start');\n $end = input('end');\n // dd($start, $end);\n // trace_log($start, $end);\n $systemTZ = config(\"app.timezone\");\n $isConvertToFrontEndTimeZone = config(\"yfktn.eventgubernur::convertToFrontEndTimeZone\");\n // karena di tanggal yang diberikan waktu fullcalendar melakukan permintaan\n // events, pada string yang diberikan sudah ada informasi timezone nya\n // sehingga kita tidak perlu lagi melakukan proses setting manual timezone\n $startTZ = Carbon::parse($start);\n $endTZ = Carbon::parse($end);\n $frontEndTimeZone = $startTZ->timezone;\n // trace_log($startTZ, $endTZ);\n // trace_sql();\n // dapatkan dari db\n $events = EventsModel::whereBetween('tgl_mulai', [\n $startTZ->copy()->timezone($systemTZ), \n $endTZ->copy()->timezone($systemTZ)])\n ->get();\n trace_log($events->toArray(), ($isConvertToFrontEndTimeZone? \"TRUE\":\"FALSE\"));\n // loop untuk melakukan render ke JSON nya\n $data = [];\n $i = 0;\n foreach ($events as $e) {\n $satuHari = false;\n $data[$i]['id'] = $e->id;\n $data[$i]['title'] = $e->judul;\n $data[$i]['slug'] = $e->slug;\n $theStart = Carbon::parse(\"{$e->tgl_mulai} {$e->jam_mulai}\");\n if ($e->tgl_selesai == null) {\n // satu hari\n if ($e->jam_selesai == null) {\n // satu hari?\n $theEnd = $theStart->copy();\n $satuHari = true;\n } else {\n $theEnd = $theStart->copy()->setTimeFromTimeString($e->jam_selesai);\n }\n } else {\n if ($e->jam_selesai == null) {\n $theEnd = Carbon::parse(\"{$e->tgl_selesai}\");\n } else {\n $theEnd = Carbon::parse(\"{$e->tgl_selesai} {$e->jam_selesai}\", $systemTZ);\n }\n }\n trace_log($theStart->format(\"Y-m-d H:i\"), $theEnd->format(\"Y-m-d H:i\"));\n // kalau di set satu hari, maka set pada waktu time telah dirubah timezone nya!\n if($satuHari) {\n // $theEnd->setTime(\n // 23, 59, 59\n // );\n $data[$i]['start'] = $isConvertToFrontEndTimeZone ? \n $theStart->timezone($frontEndTimeZone)->format(\"Y-m-d\") :\n $theStart->shiftTimezone($frontEndTimeZone)->format(\"Y-m-d\");\n // untuk satu hari nilai end tidak perlu ditambahkan!\n // $data[$i]['end'] = null;\n } else {\n // dapatkan, convert ke timezone si front end dan set formatnya\n $data[$i]['start'] = $isConvertToFrontEndTimeZone?\n $theStart->timezone($frontEndTimeZone)->toIso8601String():\n $theStart->shiftTimezone($frontEndTimeZone)->toIso8601String();\n if($isConvertToFrontEndTimeZone) {\n $theEnd->timezone($frontEndTimeZone);\n } else {\n $theEnd->shiftTimezone($frontEndTimeZone);\n }\n if($e->jam_selesai == null) {\n // set di sini supaya menunjukkan sampai akhir hari itu / full satu hari!\n $theEnd->endOfDay();\n }\n $data[$i]['end'] = $theEnd->toIso8601String();\n }\n trace_log($data[$i]);\n $i = $i + 1;\n }\n return $data;\n }", "function evt__1__entrada()\r\n\t{\r\n\t\t$this->pasadas_por_solapa[1]++;\r\n\t}", "function conf__pantallas_evt(toba_ei_formulario $form)\n\t{\n\t\t$datos = array();\n\t\t//Meto los eventos asociados actuales por si agregaron alguno.\n\t\tforeach ($this->s__pantalla_evt_asoc as $dep) {\n\t\t\t$datos[$dep] = array('evento' => $dep, 'asociar' => 0);\n\t\t}\n\t\t//Busco la asociacion hecha\n\t\t$busqueda = $this->get_entidad()->tabla('eventos_pantalla')->nueva_busqueda();\n\t\t$busqueda->set_padre('pantallas', $this->get_pant_actual());\n\t\t$ids = $busqueda->buscar_ids();\n\t\tforeach ($ids as $id) {\n\t\t\t$id_evt_padre = $this->get_entidad()->tabla('eventos_pantalla')->get_id_padres(array($id), 'eventos');\n\t\t\t$evt_involucrado = $this->get_entidad()->tabla('eventos')->get_fila_columna(current($id_evt_padre), 'identificador');\n\t\t\t$datos[$evt_involucrado] = array('evento' => $evt_involucrado, 'asociar' => 1);\n\t\t}\n\t\t$form->set_datos(array_values($datos));\n\t}", "function spiplistes_texte_inventaire_abos ($id_abonne, $type_abo, $nom_site_spip) {\n\t\n\t// fait l'inventaire des abos\n\t$listes_abonnements = spiplistes_abonnements_listes_auteur ($id_abonne, true);\n\t$nb = count($listes_abonnements);\n\t$message_list = \n\t\t($nb)\n\t\t? \"\\n- \" . implode(\"\\n- \", $listes_abonnements) . \".\\n\"\n\t\t: ''\n\t\t;\n\n\t$m1 = ($nb > 1) ? 'inscription_reponses_s' : 'inscription_reponse_s';\n\tif($nb > 1) {\n\t\t$m2 = _T('spiplistes:inscription_listes_f', array('f' => $type_abo));\n\t} else if($nb == 1) {\n\t\t$m2 = _T('spiplistes:inscription_liste_f', array('f' => $type_abo));\n\t} else {\n\t\t$m2 = _T('spiplistes:vous_abonne_aucune_liste');\n\t}\n\t$texte = ''\n\t\t. \"\\n\"._T('spiplistes:'.$m1, array('s' => htmlentities($nom_site_spip)))\n\t\t. \".\\n\"\n\t\t. $m2.$message_list\n\t\t;\n\treturn($texte);\n}", "public function loadprossimi()\n {\n $sql=\"SELECT * FROM \".static::getTables().\" ORDER BY data_e ;\";\n $result = parent::loadMultiple($sql);\n $eventi = array();\n if(($result!=null) && (count($eventi)<=5)){\n foreach($result as $i) {\n $datluogo = FLuogo::getInstance();\n $luogo = $datluogo->loadById($i['id_luogo']);\n $datcategoria = FCategoria::getInstance();\n $categoria = $datcategoria->loadById($i['id_categoria']);\n $evento = new EEvento_p($i['nome'], new DateTime( $i['data_e'] ) ,\n $luogo, $categoria, $i['descrizione'],$i['prezzo'],$i['posti_disponibili'],$i['posti_totali']);\n $evento->setId($i['id']);\n echo $evento->getF();\n array_push($eventi, $evento);\n }\n return $eventi;\n }\n else return null;\n }", "function agendas_evts($id_evenement, $evt_confirme)\r\n{\r\n\t////\tListe des agendas ou est affecté l'événement\r\n\tglobal $AGENDAS_AFFECTATIONS;\r\n\t$tab_agenda = array();\r\n\tforeach(db_colonne(\"SELECT id_agenda FROM gt_agenda_jointure_evenement WHERE id_evenement=\".$id_evenement.\" AND confirme='\".$evt_confirme.\"'\") as $id_agenda){\r\n\t\tif(isset($AGENDAS_AFFECTATIONS[$id_agenda])) $tab_agenda[] = $id_agenda;\r\n\t}\r\n\treturn $tab_agenda;\r\n}" ]
[ "0.60498244", "0.596113", "0.59256804", "0.5898964", "0.5740722", "0.56273973", "0.5611975", "0.5604795", "0.55432713", "0.54307115", "0.54034775", "0.5382218", "0.5366023", "0.53400666", "0.53398347", "0.5309393", "0.5307571", "0.5303097", "0.5298649", "0.52714634", "0.5251615", "0.5239088", "0.5235278", "0.5196015", "0.5194685", "0.5160097", "0.51600075", "0.51575506", "0.51570666", "0.51437604" ]
0.64649004
0
/ Check that the HL7 starts with a MSH
public function parse($hl7) { if (substr($hl7, 0, 3) != "MSH") { throw new \Exception("Failed to parse an HL7 message from the supplied data. Supplied data does not start with MSH."); } /* Normalize the input */ $this->text = self::normalizeLineEndings($hl7); /* determine control characters. */ $this->separators->setControlCharacters($this->text); try { $segments = HL7::explode(PHP_EOL, $this->text, $this->separators->escape_character); foreach ($segments as $value) { $row = HL7::explode($this->separators->segment_separator, $value, $this->separators->escape_character); $key = $row[0]; // $this->generateKey($row); /* Check to see if we need to turn the property into an array for duplicate key situations. */ if (array_key_exists($key, $this->properties)) { if (!is_array($this->properties[$key])) { $temp = $this->properties[$key]; $this->properties[$key] = []; $this->properties[$key][] = $temp; } } if ($key != "") { switch ($key) { case "MSH": $this->properties[$key] = new MSH($row, $this->separators); break; /* Repeatable segments go here. Still working on a definitive list. */ case "NK1": case "DG1": case "OBX": case "PR1": case "NTE": case "AL1": case "ACC": case "IAM": case "GT1": case "ROL": case "IN1": case "IN2": case "IN3": case "PID": case "PD1": case "PV2": case "CON": case "OBR": $this->properties[$key][] = new Segment($row, $this->separators); break; default: if (strpos($key, 'Z') === 0) { $this->properties[$key][] = new Segment($row, $this->separators); } else { if (array_key_exists($key, $this->properties)) { throw new \Exception("Repeatable Segment found outside of an array. " . $key); } $this->properties[$key] = new Segment($row, $this->separators); } break; } } } } catch (\Exception $e) { throw new \Exception("Error spliting rows. " . $e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startsWith($Haystack, $Needle){\n return strpos($Haystack, $Needle) === 0;\n }", "function aturan19($word)\n {\n if (substr($word, 0, 4) == 'memp' and preg_match('/^[aiuo]/', substr($word, 4, 1))) {\n return true;\n } else {\n return false;\n }\n }", "function startsWithIgnoreCase($Haystack, $Needle){\n if(strlen($Needle)==0){return false;}\n // Recommended version, using strpos\n return strpos(strtolower($Haystack), strtolower($Needle)) === 0;\n }", "function aturan7($word = '')\n {\n if (substr($word, 0, 3) == 'ter' and preg_match('/^[aiueo]/', substr($word, 3, 1)) == 0 and substr($word, 3, 1) != 'r') {\n if (substr($word, 4, 2) == 'er' and preg_match('/^[aioue]/', substr($word, 6, 1))) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "function checkStart(){\r\n\tif (!$this->Eq['A']['id']) $this->sendError(\"你沒有裝備武器,不能出擊。\");\r\n\telseif ($this->Player['en'] < $this->RequireEN) $this->sendError(\"EN不足,無法出擊。\");\r\n\telseif ($this->Player['sp'] < $this->SP_Cost) $this->sendError(\"SP不足,無法以 $Pl->Tactics[name] 出擊。\");\r\n}", "public function isFirstPartOfStrReturnsTrueForMatchingFirstPartDataProvider() {}", "function mixStart($str) {\n\treturn substr($str,1, 2) == \"ix\";\n}", "private function LACheckHeader(){\n $instruction = $this->Getinstruction();\n $this->COUNTERS[LOC] -= 1;\n if($instruction->Opcode != \".IPPCODE21\"){\n $this->Error(ERROR_MISSING_HEAD,\"Missing header .IPPcode21\");\n }\n }", "public function isMatriculationSIVWW(): bool\n {\n $pattern = '^WW(?:\\s|-)?(?!000)[0-9]{3}(?:\\s|-)?(?!SS)[A-HJ-NP-TV-Z]{2}$';\n\n return 1 === preg_match('/'.$pattern.'/i', $this->matriculation);\n }", "function testStartsWith6 ()\n\t{\n\t\t\t$input1 = \"Barry is a programmer\";\n\t\t\t$input2 = \"Barry is a programmer\";\n\t\t\t$this->assertTrue (\n\t\t\t\t\t$this->stringUtils->startsWith ($input2, $input1));\n\t}", "function damm32Check($code) {\r\n\tglobal $base32;\r\n\treturn (damm32Encode($code) == $base32[0]) ? 1 : 0;\r\n\t}", "private function startsMappedSequence($line) {\n\t//--\n\treturn (($line[0] == '-') && (substr($line, -1, 1) == ':'));\n\t//--\n}", "function aturan23($word)\n {\n if (substr($word, 0, 3) == 'per' and preg_match('/^[raiuoe]/', substr($word, 3, 1)) == 0 and substr($word, 5, 2) == 'er' and preg_match('/^[aiuoe]/', substr($word, 7, 1))) {\n return true;\n } else {\n return false;\n }\n }", "function interesting_word($word)\n{\n if (strlen($word) < 7)\n return false;\n $first_char = substr($word, 0, 1);\n if ($first_char != strtoupper($first_char))\n return false;\n return true;\n}", "public function hasSyscmd(){\n return $this->_has(21);\n }", "public function testStartsWith3()\n {\n $this->assertFalse(Str::startsWith('foo', ''));\n }", "public function isMatriculationFNIWW(): bool\n {\n $pattern = '^(?!0)[0-9]{1,4}(?:\\s|-)?WW[A-HJ-NP-TV-Z]?(?:\\s|-)?(?!20)(?:97[1-6]|0[1-9]|[1-8][0-9]|9[0-5]|2[AB])$';\n\n return 1 === preg_match('/'.$pattern.'/i', $this->matriculation);\n }", "function yumusamaCheck($kelime){\n\t\t// $sondanIkinci = mb_substr($kelime, -2, -1);\n\t\t// // eger sondan ikinci unlu degilse yumusama olamaz\n\t\t// if(!in_array($sondanIkinci, UNLULER)) return -1;\n\t\t$sonHarf = mb_substr($kelime, -1);\n\t\tif($sonHarf === \"b\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"p\";\n\t\t}\n\t\tif($sonHarf === \"c\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"ç\";\n\t\t}\n\t\tif($sonHarf === \"d\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"t\";\n\t\t}\n\t\tif($sonHarf === \"g\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"k\";\n\t\t}\n\t\tif($sonHarf === \"ğ\") {\n\t\t\treturn mb_substr($kelime, 0 ,mb_strlen($kelime)-1).\"k\";\n\t\t}\n\t\treturn -1;\n\t}", "public function testStartsWith1()\n {\n $this->assertTrue(Str::startsWith('foo', 'f'));\n }", "static function validation(string $qth): bool\n {\n $qth = strtoupper($qth);\n return preg_match(\"{\" . self::PATTERN . \"+$}AD\", $qth) === 1;\n }", "public function isFirstPartOfStrReturnsFalseForNotMatchingFirstPartDataProvider() {}", "function validateMsn($texto){\n if(strlen($texto) < 10){\n return false;\n // SI longitud, SI caracteres A-z\n } else {\n return true;\n }\n}", "protected static function is_initial($word) {\n return ((strlen($word) == 1) || (strlen($word) == 2 && $word{1} == \".\"));\n }", "function checkValidLine_Y9155a($line){\r\n\t\t$firstTwoChars = substr($line, 0, 2);\r\n\t\t$lastSevenChars = substr($line, 2, 7);\r\n\r\n\t\tif($firstTwoChars == \"CB\"){ //we're looking for \"CB\" followed by 7 digits to start populating a record\r\n\t\t\tif(is_numeric($lastSevenChars)){\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}else{\r\n\t\t\treturn false;\r\n\t\t} //end if\r\n\t\t//return $valid;\r\n\t}", "private function check_Min($word){\r\n return (strlen($word) < $this->_min) ? true : false;\r\n }", "function checkCSH($filename = '') {\n\t\treturn true;\n\t}", "public function hasBip9Prefix(): bool;", "abstract protected function isStartToken(string $token) : bool;", "public function isMatriculationSIVWGarage(): bool\n {\n $pattern = '^W(?:\\s|-)?(?!000)[0-9]{3}(?:\\s|-)?(?!SS)[A-HJ-NP-TV-Z]{2}$';\n\n return 1 === preg_match('/'.$pattern.'/i', $this->matriculation);\n }", "function sugar_valid_mac($mac) {\n // no separator format\n if (strlen($mac) == 12) {\n return preg_match('/[A-F0-9]{12}/', $mac) == 1;\n }\n if (strlen($mac) == 17) {\n // separator : format\n $matches = preg_match('/([A-F0-9]{2}[:]){5}[A-F0-9]{2}/', $mac);\n if ($matches == 1) {\n return TRUE;\n }\n // separator - format\n $matches = preg_match('/([A-F0-9]{2}[\\-]){5}[A-F0-9]{2}/', $mac);\n return ($matches == 1);\n }\n return FALSE;\n}" ]
[ "0.5710539", "0.55704784", "0.5515821", "0.52702594", "0.52346647", "0.5213967", "0.52129525", "0.5175965", "0.5145062", "0.5120785", "0.51142555", "0.5078676", "0.5045625", "0.50224847", "0.50110054", "0.50080854", "0.5003747", "0.49982417", "0.49601626", "0.495464", "0.49413866", "0.49274412", "0.492062", "0.49112648", "0.48971784", "0.489688", "0.48594183", "0.48583126", "0.4840352", "0.48361704" ]
0.57447207
0
Current master table name
function getCurrentMasterTable() { return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_MASTER_TABLE]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_table_name(){\n return $this->table_name();\n }", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "public static function getTableName(){\n\t\treturn self::$table_name;\n\t}", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "public function getMainTableName()\n {\n return $this->main_table_name;\n }", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "private static function getDatabaseName() {\n return get_parent_class(static::getTableName());\n }", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "protected function table () : string {\n return $this->guessName();\n }", "public function get_table_name() {\n return $this->table_name;\n }", "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}", "public function getTblName()\n {\n return $this->tbl_name;\n }", "public function getMasterTable() {\n if (!$this->MasterTable) {\n $sm = $this->getServiceLocator();\n $this->MasterTable = $sm->get('Api\\Model\\MasterTable');\n }\n return $this->MasterTable;\n }", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "function getMidTableName() {\n return $this->midTableName;\n }", "function getMidTableName() {\n return $this->midTableName;\n }" ]
[ "0.7543311", "0.74951786", "0.74380964", "0.74258244", "0.7424816", "0.742205", "0.74192744", "0.73911023", "0.7382169", "0.7380209", "0.73141974", "0.73082256", "0.7290244", "0.7290244", "0.7290244", "0.72881836", "0.7283893", "0.7270027", "0.72634614", "0.7249696", "0.7244916", "0.72362256", "0.72362256", "0.72362256", "0.7229326", "0.72120035", "0.7203741", "0.7203392", "0.71984315", "0.71984315" ]
0.81002384
0
Get record keys from $_POST/$_GET/$_SESSION
function GetRecordKeys() { global $EW_COMPOSITE_KEY_SEPARATOR; $arKeys = array(); $arKey = array(); if (isset($_POST["key_m"])) { $arKeys = ew_StripSlashes($_POST["key_m"]); $cnt = count($arKeys); } elseif (isset($_GET["key_m"])) { $arKeys = ew_StripSlashes($_GET["key_m"]); $cnt = count($arKeys); } elseif (!empty($_GET) || !empty($_POST)) { $isPost = ew_IsHttpPost(); if ($isPost && isset($_POST["gjd_id"])) $arKeys[] = ew_StripSlashes($_POST["gjd_id"]); elseif (isset($_GET["gjd_id"])) $arKeys[] = ew_StripSlashes($_GET["gjd_id"]); else $arKeys = NULL; // Do not setup //return $arKeys; // Do not return yet, so the values will also be checked by the following code } // Check keys $ar = array(); if (is_array($arKeys)) { foreach ($arKeys as $key) { if (!is_numeric($key)) continue; $ar[] = $key; } } return $ar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = $_POST[\"key_m\"];\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = $_GET[\"key_m\"];\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (!empty($_GET) || !empty($_POST)) {\n\t\t\t$isPost = ew_IsPost();\n\t\t\tif ($isPost && isset($_POST[\"rid\"]))\n\t\t\t\t$arKeys[] = $_POST[\"rid\"];\n\t\t\telseif (isset($_GET[\"rid\"]))\n\t\t\t\t$arKeys[] = $_GET[\"rid\"];\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = array();\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "function GetRecordKeys() {\n\t\tglobal $EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$arKeys = array();\n\t\t$arKey = array();\n\t\tif (isset($_POST[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_POST[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (isset($_GET[\"key_m\"])) {\n\t\t\t$arKeys = ew_StripSlashes($_GET[\"key_m\"]);\n\t\t\t$cnt = count($arKeys);\n\t\t} elseif (!empty($_GET) || !empty($_POST)) {\n\t\t\t$isPost = ew_IsHttpPost();\n\t\t\tif ($isPost && isset($_POST[\"IDXDAFTAR\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_POST[\"IDXDAFTAR\"]);\n\t\t\telseif (isset($_GET[\"IDXDAFTAR\"]))\n\t\t\t\t$arKeys[] = ew_StripSlashes($_GET[\"IDXDAFTAR\"]);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = array();\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "public function getRecordKeys()\n\t{\n\t\t$arKeys = [];\n\t\t$arKey = [];\n\t\tif (Param(\"key_m\") !== NULL) {\n\t\t\t$arKeys = Param(\"key_m\");\n\t\t\t$cnt = count($arKeys);\n\t\t} else {\n\t\t\tif (Param(\"id\") !== NULL)\n\t\t\t\t$arKeys[] = Param(\"id\");\n\t\t\telseif (IsApi() && Key(0) !== NULL)\n\t\t\t\t$arKeys[] = Key(0);\n\t\t\telseif (IsApi() && Route(2) !== NULL)\n\t\t\t\t$arKeys[] = Route(2);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = [];\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "public function getRecordKeys()\n\t{\n\t\t$arKeys = [];\n\t\t$arKey = [];\n\t\tif (Param(\"key_m\") !== NULL) {\n\t\t\t$arKeys = Param(\"key_m\");\n\t\t\t$cnt = count($arKeys);\n\t\t} else {\n\t\t\tif (Param(\"IncomeCode\") !== NULL)\n\t\t\t\t$arKeys[] = Param(\"IncomeCode\");\n\t\t\telseif (IsApi() && Key(0) !== NULL)\n\t\t\t\t$arKeys[] = Key(0);\n\t\t\telseif (IsApi() && Route(2) !== NULL)\n\t\t\t\t$arKeys[] = Route(2);\n\t\t\telse\n\t\t\t\t$arKeys = NULL; // Do not setup\n\n\t\t\t//return $arKeys; // Do not return yet, so the values will also be checked by the following code\n\t\t}\n\n\t\t// Check keys\n\t\t$ar = [];\n\t\tif (is_array($arKeys)) {\n\t\t\tforeach ($arKeys as $key) {\n\t\t\t\tif (!is_numeric($key))\n\t\t\t\t\tcontinue;\n\t\t\t\t$ar[] = $key;\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "public function retrieveValuesFromSession()\n\t{\n\t\tif (isset($_SESSION['stored_forms'][$this->name.$this->target_type]))\n\t\t\treturn $_SESSION['stored_forms'][$this->name.$this->target_type];\n\t\telse\n\t\t\treturn array();\n\t}", "static function getKeys();", "function save_input_data()\r\n{\r\n foreach ($_POST as $key => $value) {//key : name, password... and value : field value\r\n //save datas in an array\r\n if (strpos($key, 'password') === false) {//in key : find password. if false : value not found\r\n $_SESSION['input'][$key] = $value;\r\n }\r\n }\r\n}", "abstract public function getKeys();", "function get($key)\n {\n if($this->isStarted())\n {\n if(isset($this->keyvalList[$key]))\n return ($this->keyvalList[$key]);\n elseif($key=='__ASC_FORM_ID__')\n\t\t\t\t_fatal(array(\"CODE\"=>\"SESSION_001\",\"MESSAGE\"=>\"Access denied due to security reason\"));\n// die('Access denied due to security reason');\n else\n\t\t\t\t_fatal(array(\"CODE\"=>\"SESSION_002\",\"MESSAGE\"=>\"Session::get() !isset(\\$this->keyvalList[$key])\"));\n// die(\"Session::get() !isset(\\$this->keyvalList[$key])\");\n }\n else\n\t\t\t\t_fatal(array(\"CODE\"=>\"SESSION_003\",\"MESSAGE\"=>\"Session::getKey() !\\$this->isStarted()\"));\n// die(\"Session::getKey() !\\$this->isStarted()\");\n }", "function get_keys($tree=false)\n\t{\n\t\tif(ACCESS_MODEL == \"roles\") {\n\t\t\treturn array_keys($GLOBALS['ACCESS_KEYS']);\n\t\t} else if(ACCESS_MODEL == \"discrete\") {\n\t\t\t$ret = array();\n\t\t\tforeach($GLOBALS['ACCESS_KEYS'] as $k=>$v) {\n\t\t\t\tif($tree) {\n\t\t\t\t\t$ret[] = $k;\n\t\t\t\t\tforeach($v as $vv) $ret[] = \"-- $vv\";\n\t\t\t\t} else {\n\t\t\t\t\tforeach($v as $vv) $ret[] = $vv;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}\n\t}", "public function getKeys();", "public function getStoredForms() {\n $stored = array();\n foreach ($this->getSessionNamespace() as $key => $value) {\n $stored[] = $key;\n }\n\n return $stored;\n }", "public function getKeys() {\n return array_keys($this->data);\n }", "public function get_ids()\n\t{\n\t\tif (isset($_SESSION['cart']))\n\t\t{\n\t\t\treturn array_keys($_SESSION['cart']);\n\t\t}\n\t\treturn NULL;\n\t}", "public function getStoredForms()\n {\n $stored = array();\n foreach ($this->getSessionNamespace() as $key => $value) {\n $stored[] = $key;\n }\n \n return $stored;\n }", "public function keys()\n {\n return array_keys($this->parameters);\n }", "public function getSessionData()\n {\n return $this->getSession()->get(\"FormInfo.{$this->FormName()}.data\");\n }", "function getKeys(){\n\t\ttry{\n\t\t\t$db = getConnection();\n\n\t\t\t$sql = \"SELECT * FROM network_keys WHERE name = ?\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->execute(array(\"llsec\"));\n\t\t\t$llsec = $stmt->fetch()['network_key'];\n\n\t\t\t$sql = \"SELECT * FROM network_keys WHERE name = ?\";\n\t\t\t$stmt = $db->prepare($sql);\n\t\t\t$stmt->execute(array(\"dtls\"));\n\t\t\t$dtls = $stmt->fetch()['network_key'];\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t echo $e->getMessage();\n\t }\n\t return array($llsec, $dtls);\n\t}", "public function getKeys() {}", "public function getMetaForignKeys(){\n $stmt = $this->query(self::META_FKEYS_SQL);\n if ($stmt === false){\n return array();\n }\n\n $keys = array();\n foreach ($stmt as $row){\n $keys[$row[0] . '.' . $row[1]] = $row[2] . '.' . $row[3];\n }\n\n return $keys;\n }", "function persisted($posted_key) {\n\n $form_data = Session::getFormData();\n if (isset($form_data[$posted_key])) {\n echo $form_data[$posted_key];\n }\n \n}", "function GetDBTableKeys()\n\t{\n\t\tglobal $dal_info;\n\t\tif( !array_key_exists($this->infoKey, $dal_info) || !is_array($dal_info[ $this->infoKey ]) )\n\t\t\treturn array();\n\t\t\n\t\t$ret = array();\n\t\tforeach($dal_info[ $this->infoKey ] as $fname=>$f)\n\t\t{\n\t\t\tif( @$f[\"key\"] )\n\t\t\t\t$ret[] = $fname;\n\t\t}\n\t\treturn $ret;\n\t}", "public function getSessionKey();", "public function postKeys()\n\t{\t\n\t\t// get the document types\n\t\t$documents = explode(\"|\", Input::get('documents'));\n\t\t$searchComponent = new MediaSearchComponent();\n\n\t\t// store all keys in this array\n\t\t$docKeys = [];\n\n\t\t// go through each selected document type and get the keys\n\t\tforeach($documents as $type) {\n\n\t\t\t// skip if value is empty\n\t\t\tif($type == \"\") {\n\t\t\t\tcontinue;\n\t\t\t} elseif($type == \"all\") {\n\t\t\t\t$units = Unit::select('content')->get();\n\t\t\t} else {\n\t\t\t\t// split the document type string so that we can get the project name from it.\n\t\t\t\t$type = explode('__', $type);\n\t\t\t\t// get the content of the units for this document type in this project\n\t\t\t\t// if the load on the system is too high limit this to e.g. 100 random units.\n\t\t\t\t$units = Unit::select('content')->where('project', $type[0])->where('documentType', $type[1])->get();\n\t\t\t}\n\n\t\t\t// get the keys for the units in this document type\n\t\t\tforeach($units as $unit) {\n\t\t\t\t$unit->attributesToArray();\n\t\t\t\t$keys = $searchComponent->getKeys($unit['attributes']);\n\t\t\t\t$docKeys = array_unique(array_merge($docKeys, $keys));\n\t\t\t}\n\t\t}\n\n//\t\tasort($keys);\n\t\t\n\t\treturn $docKeys;\n\t}", "public function\n\t\tget_key_fields()\n\t{\n\t\tif (!isset($this->key_fields)) {\n\t\t\t$this->key_fields = array();\n\t\t\t\n\t\t\t$sxe = $this->get_simple_xml_element();\n\t\t\t\n\t\t\tforeach ($sxe->table->{'key-fields'}->field as $field) {\n\t\t\t\t#print_r($field);\n\t\t\t\t\n\t\t\t\t$this->key_fields[] = (string)$field['name'];\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * If the key_fields array hasn't been set, use the default\n\t\t\t * values.\n\t\t\t */\n\t\t\tif (count($this->key_fields) < 1) {\n\t\t\t\t$this->key_fields = array('id');\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->key_fields;\n\t}", "public function getKeys()\n {\n $this->prepare();\n\n return $this->_keys;\n }", "public function getQueryFiles()\n {\n return array_keys($_GET);\n }", "function persisted_or_stored($posted_key, $stored_key) {\n\n $form_data = Session::getFormData();\n if (isset($form_data[$posted_key])) {\n echo $form_data[$posted_key];\n } else {\n echo $stored_key;\n }\n \n \n}", "public function keys();", "public function keys();" ]
[ "0.7281956", "0.71059054", "0.6658204", "0.6537084", "0.6235343", "0.61468405", "0.5976852", "0.5753291", "0.56874216", "0.5685296", "0.5681412", "0.5636743", "0.5633421", "0.5627088", "0.5610596", "0.56035805", "0.5590647", "0.5562724", "0.5560645", "0.5536597", "0.55362827", "0.5509098", "0.5508436", "0.55010396", "0.54990757", "0.5470254", "0.5467705", "0.5463931", "0.5454837", "0.5454837" ]
0.7149095
1
Render edit row values
function RenderEditRow() { global $Security, $gsLanguage, $Language; // Call Row Rendering event $this->Row_Rendering(); // gjd_id $this->gjd_id->EditAttrs["class"] = "form-control"; $this->gjd_id->EditCustomAttributes = ""; $this->gjd_id->EditValue = $this->gjd_id->CurrentValue; $this->gjd_id->ViewCustomAttributes = ""; // gjm_id $this->gjm_id->EditAttrs["class"] = "form-control"; $this->gjm_id->EditCustomAttributes = ""; if ($this->gjm_id->getSessionValue() <> "") { $this->gjm_id->CurrentValue = $this->gjm_id->getSessionValue(); $this->gjm_id->ViewValue = $this->gjm_id->CurrentValue; $this->gjm_id->ViewCustomAttributes = ""; } else { $this->gjm_id->EditValue = $this->gjm_id->CurrentValue; $this->gjm_id->PlaceHolder = ew_RemoveHtml($this->gjm_id->FldCaption()); } // peg_id $this->peg_id->EditAttrs["class"] = "form-control"; $this->peg_id->EditCustomAttributes = ""; // b_mn $this->b_mn->EditAttrs["class"] = "form-control"; $this->b_mn->EditCustomAttributes = ""; $this->b_mn->EditValue = $this->b_mn->CurrentValue; $this->b_mn->PlaceHolder = ew_RemoveHtml($this->b_mn->FldCaption()); // b_sn $this->b_sn->EditAttrs["class"] = "form-control"; $this->b_sn->EditCustomAttributes = ""; $this->b_sn->EditValue = $this->b_sn->CurrentValue; $this->b_sn->PlaceHolder = ew_RemoveHtml($this->b_sn->FldCaption()); // b_sl $this->b_sl->EditAttrs["class"] = "form-control"; $this->b_sl->EditCustomAttributes = ""; $this->b_sl->EditValue = $this->b_sl->CurrentValue; $this->b_sl->PlaceHolder = ew_RemoveHtml($this->b_sl->FldCaption()); // b_rb $this->b_rb->EditAttrs["class"] = "form-control"; $this->b_rb->EditCustomAttributes = ""; $this->b_rb->EditValue = $this->b_rb->CurrentValue; $this->b_rb->PlaceHolder = ew_RemoveHtml($this->b_rb->FldCaption()); // b_km $this->b_km->EditAttrs["class"] = "form-control"; $this->b_km->EditCustomAttributes = ""; $this->b_km->EditValue = $this->b_km->CurrentValue; $this->b_km->PlaceHolder = ew_RemoveHtml($this->b_km->FldCaption()); // b_jm $this->b_jm->EditAttrs["class"] = "form-control"; $this->b_jm->EditCustomAttributes = ""; $this->b_jm->EditValue = $this->b_jm->CurrentValue; $this->b_jm->PlaceHolder = ew_RemoveHtml($this->b_jm->FldCaption()); // b_sb $this->b_sb->EditAttrs["class"] = "form-control"; $this->b_sb->EditCustomAttributes = ""; $this->b_sb->EditValue = $this->b_sb->CurrentValue; $this->b_sb->PlaceHolder = ew_RemoveHtml($this->b_sb->FldCaption()); // l_mn $this->l_mn->EditAttrs["class"] = "form-control"; $this->l_mn->EditCustomAttributes = ""; $this->l_mn->EditValue = $this->l_mn->CurrentValue; $this->l_mn->PlaceHolder = ew_RemoveHtml($this->l_mn->FldCaption()); // l_sn $this->l_sn->EditAttrs["class"] = "form-control"; $this->l_sn->EditCustomAttributes = ""; $this->l_sn->EditValue = $this->l_sn->CurrentValue; $this->l_sn->PlaceHolder = ew_RemoveHtml($this->l_sn->FldCaption()); // l_sl $this->l_sl->EditAttrs["class"] = "form-control"; $this->l_sl->EditCustomAttributes = ""; $this->l_sl->EditValue = $this->l_sl->CurrentValue; $this->l_sl->PlaceHolder = ew_RemoveHtml($this->l_sl->FldCaption()); // l_rb $this->l_rb->EditAttrs["class"] = "form-control"; $this->l_rb->EditCustomAttributes = ""; $this->l_rb->EditValue = $this->l_rb->CurrentValue; $this->l_rb->PlaceHolder = ew_RemoveHtml($this->l_rb->FldCaption()); // l_km $this->l_km->EditAttrs["class"] = "form-control"; $this->l_km->EditCustomAttributes = ""; $this->l_km->EditValue = $this->l_km->CurrentValue; $this->l_km->PlaceHolder = ew_RemoveHtml($this->l_km->FldCaption()); // l_jm $this->l_jm->EditAttrs["class"] = "form-control"; $this->l_jm->EditCustomAttributes = ""; $this->l_jm->EditValue = $this->l_jm->CurrentValue; $this->l_jm->PlaceHolder = ew_RemoveHtml($this->l_jm->FldCaption()); // l_sb $this->l_sb->EditAttrs["class"] = "form-control"; $this->l_sb->EditCustomAttributes = ""; $this->l_sb->EditValue = $this->l_sb->CurrentValue; $this->l_sb->PlaceHolder = ew_RemoveHtml($this->l_sb->FldCaption()); // Call Row Rendered event $this->Row_Rendered(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderEditRow()\n\t{\n\t\tglobal $Security, $CurrentLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// id\n\t\t$this->id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->id->EditCustomAttributes = \"\";\n\t\t$this->id->EditValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// fecha\n\t\t$this->fecha->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fecha->EditCustomAttributes = \"\";\n\t\t$this->fecha->EditValue = FormatDateTime($this->fecha->CurrentValue, 8);\n\t\t$this->fecha->PlaceHolder = RemoveHtml($this->fecha->caption());\n\n\t\t// hora\n\t\t$this->hora->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->hora->EditCustomAttributes = \"\";\n\t\t$this->hora->EditValue = $this->hora->CurrentValue;\n\t\t$this->hora->PlaceHolder = RemoveHtml($this->hora->caption());\n\n\t\t// audio\n\t\t$this->audio->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->audio->EditCustomAttributes = \"\";\n\t\tif (!$this->audio->Raw)\n\t\t\t$this->audio->CurrentValue = HtmlDecode($this->audio->CurrentValue);\n\t\t$this->audio->EditValue = $this->audio->CurrentValue;\n\t\t$this->audio->PlaceHolder = RemoveHtml($this->audio->caption());\n\n\t\t// st\n\t\t$this->st->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->st->EditCustomAttributes = \"\";\n\t\tif (!$this->st->Raw)\n\t\t\t$this->st->CurrentValue = HtmlDecode($this->st->CurrentValue);\n\t\t$this->st->EditValue = $this->st->CurrentValue;\n\t\t$this->st->PlaceHolder = RemoveHtml($this->st->caption());\n\n\t\t// fechaHoraIni\n\t\t$this->fechaHoraIni->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechaHoraIni->EditCustomAttributes = \"\";\n\t\t$this->fechaHoraIni->EditValue = FormatDateTime($this->fechaHoraIni->CurrentValue, 8);\n\t\t$this->fechaHoraIni->PlaceHolder = RemoveHtml($this->fechaHoraIni->caption());\n\n\t\t// fechaHoraFin\n\t\t$this->fechaHoraFin->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechaHoraFin->EditCustomAttributes = \"\";\n\t\t$this->fechaHoraFin->EditValue = FormatDateTime($this->fechaHoraFin->CurrentValue, 8);\n\t\t$this->fechaHoraFin->PlaceHolder = RemoveHtml($this->fechaHoraFin->caption());\n\n\t\t// telefono\n\t\t$this->telefono->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->telefono->EditCustomAttributes = \"\";\n\t\tif (!$this->telefono->Raw)\n\t\t\t$this->telefono->CurrentValue = HtmlDecode($this->telefono->CurrentValue);\n\t\t$this->telefono->EditValue = $this->telefono->CurrentValue;\n\t\t$this->telefono->PlaceHolder = RemoveHtml($this->telefono->caption());\n\n\t\t// agente\n\t\t$this->agente->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->agente->EditCustomAttributes = \"\";\n\t\t$this->agente->EditValue = $this->agente->CurrentValue;\n\t\t$this->agente->PlaceHolder = RemoveHtml($this->agente->caption());\n\n\t\t// fechabo\n\t\t$this->fechabo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fechabo->EditCustomAttributes = \"\";\n\t\t$this->fechabo->EditValue = FormatDateTime($this->fechabo->CurrentValue, 8);\n\t\t$this->fechabo->PlaceHolder = RemoveHtml($this->fechabo->caption());\n\n\t\t// agentebo\n\t\t$this->agentebo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->agentebo->EditCustomAttributes = \"\";\n\t\t$this->agentebo->EditValue = $this->agentebo->CurrentValue;\n\t\t$this->agentebo->PlaceHolder = RemoveHtml($this->agentebo->caption());\n\n\t\t// comentariosbo\n\t\t$this->comentariosbo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->comentariosbo->EditCustomAttributes = \"\";\n\t\t$this->comentariosbo->EditValue = $this->comentariosbo->CurrentValue;\n\t\t$this->comentariosbo->PlaceHolder = RemoveHtml($this->comentariosbo->caption());\n\n\t\t// IP\n\t\t$this->IP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IP->EditCustomAttributes = \"\";\n\t\tif (!$this->IP->Raw)\n\t\t\t$this->IP->CurrentValue = HtmlDecode($this->IP->CurrentValue);\n\t\t$this->IP->EditValue = $this->IP->CurrentValue;\n\t\t$this->IP->PlaceHolder = RemoveHtml($this->IP->caption());\n\n\t\t// actual\n\t\t$this->actual->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->actual->EditCustomAttributes = \"\";\n\t\tif (!$this->actual->Raw)\n\t\t\t$this->actual->CurrentValue = HtmlDecode($this->actual->CurrentValue);\n\t\t$this->actual->EditValue = $this->actual->CurrentValue;\n\t\t$this->actual->PlaceHolder = RemoveHtml($this->actual->caption());\n\n\t\t// completado\n\t\t$this->completado->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->completado->EditCustomAttributes = \"\";\n\t\tif (!$this->completado->Raw)\n\t\t\t$this->completado->CurrentValue = HtmlDecode($this->completado->CurrentValue);\n\t\t$this->completado->EditValue = $this->completado->CurrentValue;\n\t\t$this->completado->PlaceHolder = RemoveHtml($this->completado->caption());\n\n\t\t// 2_1_R\n\t\t$this->_2_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_1_R->EditCustomAttributes = \"\";\n\t\t$this->_2_1_R->EditValue = $this->_2_1_R->CurrentValue;\n\t\t$this->_2_1_R->PlaceHolder = RemoveHtml($this->_2_1_R->caption());\n\n\t\t// 2_2_R\n\t\t$this->_2_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_2_R->EditCustomAttributes = \"\";\n\t\t$this->_2_2_R->EditValue = $this->_2_2_R->CurrentValue;\n\t\t$this->_2_2_R->PlaceHolder = RemoveHtml($this->_2_2_R->caption());\n\n\t\t// 2_3_R\n\t\t$this->_2_3_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_2_3_R->EditCustomAttributes = \"\";\n\t\t$this->_2_3_R->EditValue = $this->_2_3_R->CurrentValue;\n\t\t$this->_2_3_R->PlaceHolder = RemoveHtml($this->_2_3_R->caption());\n\n\t\t// 3_4_R\n\t\t$this->_3_4_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_3_4_R->EditCustomAttributes = \"\";\n\t\t$this->_3_4_R->EditValue = $this->_3_4_R->CurrentValue;\n\t\t$this->_3_4_R->PlaceHolder = RemoveHtml($this->_3_4_R->caption());\n\n\t\t// 4_5_R\n\t\t$this->_4_5_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_5_R->EditCustomAttributes = \"\";\n\t\t$this->_4_5_R->EditValue = $this->_4_5_R->CurrentValue;\n\t\t$this->_4_5_R->PlaceHolder = RemoveHtml($this->_4_5_R->caption());\n\n\t\t// 4_6_R\n\t\t$this->_4_6_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_6_R->EditCustomAttributes = \"\";\n\t\t$this->_4_6_R->EditValue = $this->_4_6_R->CurrentValue;\n\t\t$this->_4_6_R->PlaceHolder = RemoveHtml($this->_4_6_R->caption());\n\n\t\t// 4_7_R\n\t\t$this->_4_7_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_7_R->EditCustomAttributes = \"\";\n\t\t$this->_4_7_R->EditValue = $this->_4_7_R->CurrentValue;\n\t\t$this->_4_7_R->PlaceHolder = RemoveHtml($this->_4_7_R->caption());\n\n\t\t// 4_8_R\n\t\t$this->_4_8_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_4_8_R->EditCustomAttributes = \"\";\n\t\t$this->_4_8_R->EditValue = $this->_4_8_R->CurrentValue;\n\t\t$this->_4_8_R->PlaceHolder = RemoveHtml($this->_4_8_R->caption());\n\n\t\t// 5_9_R\n\t\t$this->_5_9_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_9_R->EditCustomAttributes = \"\";\n\t\t$this->_5_9_R->EditValue = $this->_5_9_R->CurrentValue;\n\t\t$this->_5_9_R->PlaceHolder = RemoveHtml($this->_5_9_R->caption());\n\n\t\t// 5_10_R\n\t\t$this->_5_10_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_10_R->EditCustomAttributes = \"\";\n\t\t$this->_5_10_R->EditValue = $this->_5_10_R->CurrentValue;\n\t\t$this->_5_10_R->PlaceHolder = RemoveHtml($this->_5_10_R->caption());\n\n\t\t// 5_11_R\n\t\t$this->_5_11_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_11_R->EditCustomAttributes = \"\";\n\t\t$this->_5_11_R->EditValue = $this->_5_11_R->CurrentValue;\n\t\t$this->_5_11_R->PlaceHolder = RemoveHtml($this->_5_11_R->caption());\n\n\t\t// 5_12_R\n\t\t$this->_5_12_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_12_R->EditCustomAttributes = \"\";\n\t\t$this->_5_12_R->EditValue = $this->_5_12_R->CurrentValue;\n\t\t$this->_5_12_R->PlaceHolder = RemoveHtml($this->_5_12_R->caption());\n\n\t\t// 5_13_R\n\t\t$this->_5_13_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_13_R->EditCustomAttributes = \"\";\n\t\t$this->_5_13_R->EditValue = $this->_5_13_R->CurrentValue;\n\t\t$this->_5_13_R->PlaceHolder = RemoveHtml($this->_5_13_R->caption());\n\n\t\t// 5_14_R\n\t\t$this->_5_14_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_14_R->EditCustomAttributes = \"\";\n\t\t$this->_5_14_R->EditValue = $this->_5_14_R->CurrentValue;\n\t\t$this->_5_14_R->PlaceHolder = RemoveHtml($this->_5_14_R->caption());\n\n\t\t// 5_51_R\n\t\t$this->_5_51_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_5_51_R->EditCustomAttributes = \"\";\n\t\t$this->_5_51_R->EditValue = $this->_5_51_R->CurrentValue;\n\t\t$this->_5_51_R->PlaceHolder = RemoveHtml($this->_5_51_R->caption());\n\n\t\t// 6_15_R\n\t\t$this->_6_15_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_15_R->EditCustomAttributes = \"\";\n\t\t$this->_6_15_R->EditValue = $this->_6_15_R->CurrentValue;\n\t\t$this->_6_15_R->PlaceHolder = RemoveHtml($this->_6_15_R->caption());\n\n\t\t// 6_16_R\n\t\t$this->_6_16_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_16_R->EditCustomAttributes = \"\";\n\t\t$this->_6_16_R->EditValue = $this->_6_16_R->CurrentValue;\n\t\t$this->_6_16_R->PlaceHolder = RemoveHtml($this->_6_16_R->caption());\n\n\t\t// 6_17_R\n\t\t$this->_6_17_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_17_R->EditCustomAttributes = \"\";\n\t\t$this->_6_17_R->EditValue = $this->_6_17_R->CurrentValue;\n\t\t$this->_6_17_R->PlaceHolder = RemoveHtml($this->_6_17_R->caption());\n\n\t\t// 6_18_R\n\t\t$this->_6_18_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_18_R->EditCustomAttributes = \"\";\n\t\t$this->_6_18_R->EditValue = $this->_6_18_R->CurrentValue;\n\t\t$this->_6_18_R->PlaceHolder = RemoveHtml($this->_6_18_R->caption());\n\n\t\t// 6_19_R\n\t\t$this->_6_19_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_19_R->EditCustomAttributes = \"\";\n\t\t$this->_6_19_R->EditValue = $this->_6_19_R->CurrentValue;\n\t\t$this->_6_19_R->PlaceHolder = RemoveHtml($this->_6_19_R->caption());\n\n\t\t// 6_20_R\n\t\t$this->_6_20_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_20_R->EditCustomAttributes = \"\";\n\t\t$this->_6_20_R->EditValue = $this->_6_20_R->CurrentValue;\n\t\t$this->_6_20_R->PlaceHolder = RemoveHtml($this->_6_20_R->caption());\n\n\t\t// 6_52_R\n\t\t$this->_6_52_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_6_52_R->EditCustomAttributes = \"\";\n\t\t$this->_6_52_R->EditValue = $this->_6_52_R->CurrentValue;\n\t\t$this->_6_52_R->PlaceHolder = RemoveHtml($this->_6_52_R->caption());\n\n\t\t// 7_21_R\n\t\t$this->_7_21_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_7_21_R->EditCustomAttributes = \"\";\n\t\t$this->_7_21_R->EditValue = $this->_7_21_R->CurrentValue;\n\t\t$this->_7_21_R->PlaceHolder = RemoveHtml($this->_7_21_R->caption());\n\n\t\t// 8_22_R\n\t\t$this->_8_22_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_22_R->EditCustomAttributes = \"\";\n\t\t$this->_8_22_R->EditValue = $this->_8_22_R->CurrentValue;\n\t\t$this->_8_22_R->PlaceHolder = RemoveHtml($this->_8_22_R->caption());\n\n\t\t// 8_23_R\n\t\t$this->_8_23_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_23_R->EditCustomAttributes = \"\";\n\t\t$this->_8_23_R->EditValue = $this->_8_23_R->CurrentValue;\n\t\t$this->_8_23_R->PlaceHolder = RemoveHtml($this->_8_23_R->caption());\n\n\t\t// 8_24_R\n\t\t$this->_8_24_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_24_R->EditCustomAttributes = \"\";\n\t\t$this->_8_24_R->EditValue = $this->_8_24_R->CurrentValue;\n\t\t$this->_8_24_R->PlaceHolder = RemoveHtml($this->_8_24_R->caption());\n\n\t\t// 8_25_R\n\t\t$this->_8_25_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_8_25_R->EditCustomAttributes = \"\";\n\t\t$this->_8_25_R->EditValue = $this->_8_25_R->CurrentValue;\n\t\t$this->_8_25_R->PlaceHolder = RemoveHtml($this->_8_25_R->caption());\n\n\t\t// 9_26_R\n\t\t$this->_9_26_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_26_R->EditCustomAttributes = \"\";\n\t\t$this->_9_26_R->EditValue = $this->_9_26_R->CurrentValue;\n\t\t$this->_9_26_R->PlaceHolder = RemoveHtml($this->_9_26_R->caption());\n\n\t\t// 9_27_R\n\t\t$this->_9_27_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_27_R->EditCustomAttributes = \"\";\n\t\t$this->_9_27_R->EditValue = $this->_9_27_R->CurrentValue;\n\t\t$this->_9_27_R->PlaceHolder = RemoveHtml($this->_9_27_R->caption());\n\n\t\t// 9_28_R\n\t\t$this->_9_28_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_28_R->EditCustomAttributes = \"\";\n\t\t$this->_9_28_R->EditValue = $this->_9_28_R->CurrentValue;\n\t\t$this->_9_28_R->PlaceHolder = RemoveHtml($this->_9_28_R->caption());\n\n\t\t// 9_29_R\n\t\t$this->_9_29_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_29_R->EditCustomAttributes = \"\";\n\t\t$this->_9_29_R->EditValue = $this->_9_29_R->CurrentValue;\n\t\t$this->_9_29_R->PlaceHolder = RemoveHtml($this->_9_29_R->caption());\n\n\t\t// 9_30_R\n\t\t$this->_9_30_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_30_R->EditCustomAttributes = \"\";\n\t\t$this->_9_30_R->EditValue = $this->_9_30_R->CurrentValue;\n\t\t$this->_9_30_R->PlaceHolder = RemoveHtml($this->_9_30_R->caption());\n\n\t\t// 9_31_R\n\t\t$this->_9_31_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_31_R->EditCustomAttributes = \"\";\n\t\t$this->_9_31_R->EditValue = $this->_9_31_R->CurrentValue;\n\t\t$this->_9_31_R->PlaceHolder = RemoveHtml($this->_9_31_R->caption());\n\n\t\t// 9_32_R\n\t\t$this->_9_32_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_32_R->EditCustomAttributes = \"\";\n\t\t$this->_9_32_R->EditValue = $this->_9_32_R->CurrentValue;\n\t\t$this->_9_32_R->PlaceHolder = RemoveHtml($this->_9_32_R->caption());\n\n\t\t// 9_33_R\n\t\t$this->_9_33_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_33_R->EditCustomAttributes = \"\";\n\t\t$this->_9_33_R->EditValue = $this->_9_33_R->CurrentValue;\n\t\t$this->_9_33_R->PlaceHolder = RemoveHtml($this->_9_33_R->caption());\n\n\t\t// 9_34_R\n\t\t$this->_9_34_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_34_R->EditCustomAttributes = \"\";\n\t\t$this->_9_34_R->EditValue = $this->_9_34_R->CurrentValue;\n\t\t$this->_9_34_R->PlaceHolder = RemoveHtml($this->_9_34_R->caption());\n\n\t\t// 9_35_R\n\t\t$this->_9_35_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_35_R->EditCustomAttributes = \"\";\n\t\t$this->_9_35_R->EditValue = $this->_9_35_R->CurrentValue;\n\t\t$this->_9_35_R->PlaceHolder = RemoveHtml($this->_9_35_R->caption());\n\n\t\t// 9_36_R\n\t\t$this->_9_36_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_36_R->EditCustomAttributes = \"\";\n\t\t$this->_9_36_R->EditValue = $this->_9_36_R->CurrentValue;\n\t\t$this->_9_36_R->PlaceHolder = RemoveHtml($this->_9_36_R->caption());\n\n\t\t// 9_37_R\n\t\t$this->_9_37_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_37_R->EditCustomAttributes = \"\";\n\t\t$this->_9_37_R->EditValue = $this->_9_37_R->CurrentValue;\n\t\t$this->_9_37_R->PlaceHolder = RemoveHtml($this->_9_37_R->caption());\n\n\t\t// 9_38_R\n\t\t$this->_9_38_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_38_R->EditCustomAttributes = \"\";\n\t\t$this->_9_38_R->EditValue = $this->_9_38_R->CurrentValue;\n\t\t$this->_9_38_R->PlaceHolder = RemoveHtml($this->_9_38_R->caption());\n\n\t\t// 9_39_R\n\t\t$this->_9_39_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_9_39_R->EditCustomAttributes = \"\";\n\t\t$this->_9_39_R->EditValue = $this->_9_39_R->CurrentValue;\n\t\t$this->_9_39_R->PlaceHolder = RemoveHtml($this->_9_39_R->caption());\n\n\t\t// 10_40_R\n\t\t$this->_10_40_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_10_40_R->EditCustomAttributes = \"\";\n\t\t$this->_10_40_R->EditValue = $this->_10_40_R->CurrentValue;\n\t\t$this->_10_40_R->PlaceHolder = RemoveHtml($this->_10_40_R->caption());\n\n\t\t// 10_41_R\n\t\t$this->_10_41_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_10_41_R->EditCustomAttributes = \"\";\n\t\t$this->_10_41_R->EditValue = $this->_10_41_R->CurrentValue;\n\t\t$this->_10_41_R->PlaceHolder = RemoveHtml($this->_10_41_R->caption());\n\n\t\t// 11_42_R\n\t\t$this->_11_42_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_11_42_R->EditCustomAttributes = \"\";\n\t\t$this->_11_42_R->EditValue = $this->_11_42_R->CurrentValue;\n\t\t$this->_11_42_R->PlaceHolder = RemoveHtml($this->_11_42_R->caption());\n\n\t\t// 11_43_R\n\t\t$this->_11_43_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_11_43_R->EditCustomAttributes = \"\";\n\t\t$this->_11_43_R->EditValue = $this->_11_43_R->CurrentValue;\n\t\t$this->_11_43_R->PlaceHolder = RemoveHtml($this->_11_43_R->caption());\n\n\t\t// 12_44_R\n\t\t$this->_12_44_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_44_R->EditCustomAttributes = \"\";\n\t\t$this->_12_44_R->EditValue = $this->_12_44_R->CurrentValue;\n\t\t$this->_12_44_R->PlaceHolder = RemoveHtml($this->_12_44_R->caption());\n\n\t\t// 12_45_R\n\t\t$this->_12_45_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_45_R->EditCustomAttributes = \"\";\n\t\t$this->_12_45_R->EditValue = $this->_12_45_R->CurrentValue;\n\t\t$this->_12_45_R->PlaceHolder = RemoveHtml($this->_12_45_R->caption());\n\n\t\t// 12_46_R\n\t\t$this->_12_46_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_46_R->EditCustomAttributes = \"\";\n\t\t$this->_12_46_R->EditValue = $this->_12_46_R->CurrentValue;\n\t\t$this->_12_46_R->PlaceHolder = RemoveHtml($this->_12_46_R->caption());\n\n\t\t// 12_47_R\n\t\t$this->_12_47_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_47_R->EditCustomAttributes = \"\";\n\t\t$this->_12_47_R->EditValue = $this->_12_47_R->CurrentValue;\n\t\t$this->_12_47_R->PlaceHolder = RemoveHtml($this->_12_47_R->caption());\n\n\t\t// 12_48_R\n\t\t$this->_12_48_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_48_R->EditCustomAttributes = \"\";\n\t\t$this->_12_48_R->EditValue = $this->_12_48_R->CurrentValue;\n\t\t$this->_12_48_R->PlaceHolder = RemoveHtml($this->_12_48_R->caption());\n\n\t\t// 12_49_R\n\t\t$this->_12_49_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_49_R->EditCustomAttributes = \"\";\n\t\t$this->_12_49_R->EditValue = $this->_12_49_R->CurrentValue;\n\t\t$this->_12_49_R->PlaceHolder = RemoveHtml($this->_12_49_R->caption());\n\n\t\t// 12_50_R\n\t\t$this->_12_50_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_50_R->EditCustomAttributes = \"\";\n\t\t$this->_12_50_R->EditValue = $this->_12_50_R->CurrentValue;\n\t\t$this->_12_50_R->PlaceHolder = RemoveHtml($this->_12_50_R->caption());\n\n\t\t// 1__R\n\t\t$this->_1__R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_1__R->EditCustomAttributes = \"\";\n\t\t$this->_1__R->EditValue = $this->_1__R->CurrentValue;\n\t\t$this->_1__R->PlaceHolder = RemoveHtml($this->_1__R->caption());\n\n\t\t// 13_54_R\n\t\t$this->_13_54_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_R->EditValue = $this->_13_54_R->CurrentValue;\n\t\t$this->_13_54_R->PlaceHolder = RemoveHtml($this->_13_54_R->caption());\n\n\t\t// 13_54_1_R\n\t\t$this->_13_54_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_1_R->EditValue = $this->_13_54_1_R->CurrentValue;\n\t\t$this->_13_54_1_R->PlaceHolder = RemoveHtml($this->_13_54_1_R->caption());\n\n\t\t// 13_54_2_R\n\t\t$this->_13_54_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_54_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_54_2_R->EditValue = $this->_13_54_2_R->CurrentValue;\n\t\t$this->_13_54_2_R->PlaceHolder = RemoveHtml($this->_13_54_2_R->caption());\n\n\t\t// 13_55_R\n\t\t$this->_13_55_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_R->EditValue = $this->_13_55_R->CurrentValue;\n\t\t$this->_13_55_R->PlaceHolder = RemoveHtml($this->_13_55_R->caption());\n\n\t\t// 13_55_1_R\n\t\t$this->_13_55_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_1_R->EditValue = $this->_13_55_1_R->CurrentValue;\n\t\t$this->_13_55_1_R->PlaceHolder = RemoveHtml($this->_13_55_1_R->caption());\n\n\t\t// 13_55_2_R\n\t\t$this->_13_55_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_55_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_55_2_R->EditValue = $this->_13_55_2_R->CurrentValue;\n\t\t$this->_13_55_2_R->PlaceHolder = RemoveHtml($this->_13_55_2_R->caption());\n\n\t\t// 13_56_R\n\t\t$this->_13_56_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_R->EditValue = $this->_13_56_R->CurrentValue;\n\t\t$this->_13_56_R->PlaceHolder = RemoveHtml($this->_13_56_R->caption());\n\n\t\t// 13_56_1_R\n\t\t$this->_13_56_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_1_R->EditValue = $this->_13_56_1_R->CurrentValue;\n\t\t$this->_13_56_1_R->PlaceHolder = RemoveHtml($this->_13_56_1_R->caption());\n\n\t\t// 13_56_2_R\n\t\t$this->_13_56_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_56_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_56_2_R->EditValue = $this->_13_56_2_R->CurrentValue;\n\t\t$this->_13_56_2_R->PlaceHolder = RemoveHtml($this->_13_56_2_R->caption());\n\n\t\t// 12_53_R\n\t\t$this->_12_53_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_R->EditValue = $this->_12_53_R->CurrentValue;\n\t\t$this->_12_53_R->PlaceHolder = RemoveHtml($this->_12_53_R->caption());\n\n\t\t// 12_53_1_R\n\t\t$this->_12_53_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_1_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_1_R->EditValue = $this->_12_53_1_R->CurrentValue;\n\t\t$this->_12_53_1_R->PlaceHolder = RemoveHtml($this->_12_53_1_R->caption());\n\n\t\t// 12_53_2_R\n\t\t$this->_12_53_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_2_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_2_R->EditValue = $this->_12_53_2_R->CurrentValue;\n\t\t$this->_12_53_2_R->PlaceHolder = RemoveHtml($this->_12_53_2_R->caption());\n\n\t\t// 12_53_3_R\n\t\t$this->_12_53_3_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_3_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_3_R->EditValue = $this->_12_53_3_R->CurrentValue;\n\t\t$this->_12_53_3_R->PlaceHolder = RemoveHtml($this->_12_53_3_R->caption());\n\n\t\t// 12_53_4_R\n\t\t$this->_12_53_4_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_4_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_4_R->EditValue = $this->_12_53_4_R->CurrentValue;\n\t\t$this->_12_53_4_R->PlaceHolder = RemoveHtml($this->_12_53_4_R->caption());\n\n\t\t// 12_53_5_R\n\t\t$this->_12_53_5_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_5_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_5_R->EditValue = $this->_12_53_5_R->CurrentValue;\n\t\t$this->_12_53_5_R->PlaceHolder = RemoveHtml($this->_12_53_5_R->caption());\n\n\t\t// 12_53_6_R\n\t\t$this->_12_53_6_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_6_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_6_R->EditValue = $this->_12_53_6_R->CurrentValue;\n\t\t$this->_12_53_6_R->PlaceHolder = RemoveHtml($this->_12_53_6_R->caption());\n\n\t\t// 13_57_R\n\t\t$this->_13_57_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_R->EditValue = $this->_13_57_R->CurrentValue;\n\t\t$this->_13_57_R->PlaceHolder = RemoveHtml($this->_13_57_R->caption());\n\n\t\t// 13_57_1_R\n\t\t$this->_13_57_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_1_R->EditValue = $this->_13_57_1_R->CurrentValue;\n\t\t$this->_13_57_1_R->PlaceHolder = RemoveHtml($this->_13_57_1_R->caption());\n\n\t\t// 13_57_2_R\n\t\t$this->_13_57_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_57_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_57_2_R->EditValue = $this->_13_57_2_R->CurrentValue;\n\t\t$this->_13_57_2_R->PlaceHolder = RemoveHtml($this->_13_57_2_R->caption());\n\n\t\t// 13_58_R\n\t\t$this->_13_58_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_R->EditValue = $this->_13_58_R->CurrentValue;\n\t\t$this->_13_58_R->PlaceHolder = RemoveHtml($this->_13_58_R->caption());\n\n\t\t// 13_58_1_R\n\t\t$this->_13_58_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_1_R->EditValue = $this->_13_58_1_R->CurrentValue;\n\t\t$this->_13_58_1_R->PlaceHolder = RemoveHtml($this->_13_58_1_R->caption());\n\n\t\t// 13_58_2_R\n\t\t$this->_13_58_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_58_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_58_2_R->EditValue = $this->_13_58_2_R->CurrentValue;\n\t\t$this->_13_58_2_R->PlaceHolder = RemoveHtml($this->_13_58_2_R->caption());\n\n\t\t// 13_59_R\n\t\t$this->_13_59_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_R->EditValue = $this->_13_59_R->CurrentValue;\n\t\t$this->_13_59_R->PlaceHolder = RemoveHtml($this->_13_59_R->caption());\n\n\t\t// 13_59_1_R\n\t\t$this->_13_59_1_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_1_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_1_R->EditValue = $this->_13_59_1_R->CurrentValue;\n\t\t$this->_13_59_1_R->PlaceHolder = RemoveHtml($this->_13_59_1_R->caption());\n\n\t\t// 13_59_2_R\n\t\t$this->_13_59_2_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_59_2_R->EditCustomAttributes = \"\";\n\t\t$this->_13_59_2_R->EditValue = $this->_13_59_2_R->CurrentValue;\n\t\t$this->_13_59_2_R->PlaceHolder = RemoveHtml($this->_13_59_2_R->caption());\n\n\t\t// 13_60_R\n\t\t$this->_13_60_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_13_60_R->EditCustomAttributes = \"\";\n\t\t$this->_13_60_R->EditValue = $this->_13_60_R->CurrentValue;\n\t\t$this->_13_60_R->PlaceHolder = RemoveHtml($this->_13_60_R->caption());\n\n\t\t// 12_53_7_R\n\t\t$this->_12_53_7_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_7_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_7_R->EditValue = $this->_12_53_7_R->CurrentValue;\n\t\t$this->_12_53_7_R->PlaceHolder = RemoveHtml($this->_12_53_7_R->caption());\n\n\t\t// 12_53_8_R\n\t\t$this->_12_53_8_R->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->_12_53_8_R->EditCustomAttributes = \"\";\n\t\t$this->_12_53_8_R->EditValue = $this->_12_53_8_R->CurrentValue;\n\t\t$this->_12_53_8_R->PlaceHolder = RemoveHtml($this->_12_53_8_R->caption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// IDXDAFTAR\n\t\t$this->IDXDAFTAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IDXDAFTAR->EditCustomAttributes = \"\";\n\t\t$this->IDXDAFTAR->EditValue = $this->IDXDAFTAR->CurrentValue;\n\t\t$this->IDXDAFTAR->ViewCustomAttributes = \"\";\n\n\t\t// TGLREG\n\t\t$this->TGLREG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TGLREG->EditCustomAttributes = \"\";\n\t\t$this->TGLREG->EditValue = $this->TGLREG->CurrentValue;\n\t\t$this->TGLREG->EditValue = ew_FormatDateTime($this->TGLREG->EditValue, 0);\n\t\t$this->TGLREG->ViewCustomAttributes = \"\";\n\n\t\t// NOMR\n\t\t$this->NOMR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOMR->EditCustomAttributes = \"\";\n\t\t$this->NOMR->EditValue = $this->NOMR->CurrentValue;\n\t\tif (strval($this->NOMR->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`NOMR`\" . ew_SearchString(\"=\", $this->NOMR->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `NOMR`, `NOMR` AS `DispFld`, `NAMA` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_pasien`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->NOMR->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->NOMR, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->NOMR->EditValue = $this->NOMR->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->NOMR->EditValue = $this->NOMR->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->NOMR->EditValue = NULL;\n\t\t}\n\t\t$this->NOMR->ViewCustomAttributes = \"\";\n\n\t\t// KETERANGAN\n\t\t$this->KETERANGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KETERANGAN->EditCustomAttributes = \"\";\n\t\t$this->KETERANGAN->EditValue = $this->KETERANGAN->CurrentValue;\n\t\t$this->KETERANGAN->ViewCustomAttributes = \"\";\n\n\t\t// NOKARTU_BPJS\n\t\t$this->NOKARTU_BPJS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOKARTU_BPJS->EditCustomAttributes = \"\";\n\t\t$this->NOKARTU_BPJS->EditValue = $this->NOKARTU_BPJS->CurrentValue;\n\t\t$this->NOKARTU_BPJS->ViewCustomAttributes = \"\";\n\n\t\t// NOKTP\n\t\t$this->NOKTP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOKTP->EditCustomAttributes = \"\";\n\t\t$this->NOKTP->EditValue = $this->NOKTP->CurrentValue;\n\t\t$this->NOKTP->ViewCustomAttributes = \"\";\n\n\t\t// KDDOKTER\n\t\t$this->KDDOKTER->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDDOKTER->EditCustomAttributes = \"\";\n\t\t$this->KDDOKTER->EditValue = $this->KDDOKTER->CurrentValue;\n\t\tif (strval($this->KDDOKTER->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KDDOKTER`\" . ew_SearchString(\"=\", $this->KDDOKTER->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KDDOKTER`, `NAMADOKTER` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_dokter`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDDOKTER->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDDOKTER, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDDOKTER->EditValue = $this->KDDOKTER->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDDOKTER->EditValue = $this->KDDOKTER->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDDOKTER->EditValue = NULL;\n\t\t}\n\t\t$this->KDDOKTER->ViewCustomAttributes = \"\";\n\n\t\t// KDPOLY\n\t\t$this->KDPOLY->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDPOLY->EditCustomAttributes = \"\";\n\t\tif (strval($this->KDPOLY->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->KDPOLY->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kode`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_poly`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDPOLY->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDPOLY, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDPOLY->EditValue = $this->KDPOLY->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDPOLY->EditValue = $this->KDPOLY->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDPOLY->EditValue = NULL;\n\t\t}\n\t\t$this->KDPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KDRUJUK\n\t\t$this->KDRUJUK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDRUJUK->EditCustomAttributes = \"\";\n\t\t$this->KDRUJUK->EditValue = $this->KDRUJUK->CurrentValue;\n\t\tif (strval($this->KDRUJUK->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDRUJUK->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_rujukan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDRUJUK->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDRUJUK, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDRUJUK->EditValue = $this->KDRUJUK->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDRUJUK->EditValue = $this->KDRUJUK->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDRUJUK->EditValue = NULL;\n\t\t}\n\t\t$this->KDRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// KDCARABAYAR\n\t\t$this->KDCARABAYAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDCARABAYAR->EditCustomAttributes = \"\";\n\t\t$this->KDCARABAYAR->EditValue = $this->KDCARABAYAR->CurrentValue;\n\t\tif (strval($this->KDCARABAYAR->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDCARABAYAR->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_carabayar`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDCARABAYAR->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDCARABAYAR, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDCARABAYAR->EditValue = $this->KDCARABAYAR->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDCARABAYAR->EditValue = $this->KDCARABAYAR->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDCARABAYAR->EditValue = NULL;\n\t\t}\n\t\t$this->KDCARABAYAR->ViewCustomAttributes = \"\";\n\n\t\t// NOJAMINAN\n\t\t$this->NOJAMINAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOJAMINAN->EditCustomAttributes = \"\";\n\t\t$this->NOJAMINAN->EditValue = $this->NOJAMINAN->CurrentValue;\n\t\t$this->NOJAMINAN->ViewCustomAttributes = \"\";\n\n\t\t// SHIFT\n\t\t$this->SHIFT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SHIFT->EditCustomAttributes = \"\";\n\t\t$this->SHIFT->EditValue = $this->SHIFT->CurrentValue;\n\t\t$this->SHIFT->ViewCustomAttributes = \"\";\n\n\t\t// STATUS\n\t\t$this->STATUS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->STATUS->EditCustomAttributes = \"\";\n\t\t$this->STATUS->EditValue = $this->STATUS->CurrentValue;\n\t\t$this->STATUS->ViewCustomAttributes = \"\";\n\n\t\t// KETERANGAN_STATUS\n\t\t$this->KETERANGAN_STATUS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KETERANGAN_STATUS->EditCustomAttributes = \"\";\n\t\t$this->KETERANGAN_STATUS->EditValue = $this->KETERANGAN_STATUS->CurrentValue;\n\t\t$this->KETERANGAN_STATUS->ViewCustomAttributes = \"\";\n\n\t\t// PASIENBARU\n\t\t$this->PASIENBARU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PASIENBARU->EditCustomAttributes = \"\";\n\t\t$this->PASIENBARU->EditValue = $this->PASIENBARU->CurrentValue;\n\t\t$this->PASIENBARU->ViewCustomAttributes = \"\";\n\n\t\t// NIP\n\t\t$this->NIP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NIP->EditCustomAttributes = \"\";\n\t\t$this->NIP->EditValue = $this->NIP->CurrentValue;\n\t\t$this->NIP->ViewCustomAttributes = \"\";\n\n\t\t// MASUKPOLY\n\t\t$this->MASUKPOLY->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MASUKPOLY->EditCustomAttributes = \"\";\n\t\t$this->MASUKPOLY->EditValue = $this->MASUKPOLY->CurrentValue;\n\t\t$this->MASUKPOLY->EditValue = ew_FormatDateTime($this->MASUKPOLY->EditValue, 4);\n\t\t$this->MASUKPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KELUARPOLY\n\t\t$this->KELUARPOLY->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KELUARPOLY->EditCustomAttributes = \"\";\n\t\t$this->KELUARPOLY->EditValue = $this->KELUARPOLY->CurrentValue;\n\t\t$this->KELUARPOLY->EditValue = ew_FormatDateTime($this->KELUARPOLY->EditValue, 4);\n\t\t$this->KELUARPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KETRUJUK\n\t\t$this->KETRUJUK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KETRUJUK->EditCustomAttributes = \"\";\n\t\t$this->KETRUJUK->EditValue = $this->KETRUJUK->CurrentValue;\n\t\t$this->KETRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// KETBAYAR\n\t\t$this->KETBAYAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KETBAYAR->EditCustomAttributes = \"\";\n\t\t$this->KETBAYAR->EditValue = $this->KETBAYAR->CurrentValue;\n\t\t$this->KETBAYAR->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_NAMA\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditValue = $this->PENANGGUNGJAWAB_NAMA->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_NAMA->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditValue = $this->PENANGGUNGJAWAB_HUBUNGAN->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditValue = $this->PENANGGUNGJAWAB_ALAMAT->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_PHONE\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditValue = $this->PENANGGUNGJAWAB_PHONE->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_PHONE->ViewCustomAttributes = \"\";\n\n\t\t// JAMREG\n\t\t$this->JAMREG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JAMREG->EditCustomAttributes = \"\";\n\t\t$this->JAMREG->EditValue = $this->JAMREG->CurrentValue;\n\t\t$this->JAMREG->EditValue = ew_FormatDateTime($this->JAMREG->EditValue, 0);\n\t\t$this->JAMREG->ViewCustomAttributes = \"\";\n\n\t\t// BATAL\n\t\t$this->BATAL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BATAL->EditCustomAttributes = \"\";\n\t\t$this->BATAL->EditValue = $this->BATAL->CurrentValue;\n\t\t$this->BATAL->ViewCustomAttributes = \"\";\n\n\t\t// NO_SJP\n\t\t$this->NO_SJP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NO_SJP->EditCustomAttributes = \"\";\n\t\t$this->NO_SJP->EditValue = $this->NO_SJP->CurrentValue;\n\t\t$this->NO_SJP->ViewCustomAttributes = \"\";\n\n\t\t// NO_PESERTA\n\t\t$this->NO_PESERTA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NO_PESERTA->EditCustomAttributes = \"\";\n\t\t$this->NO_PESERTA->EditValue = $this->NO_PESERTA->CurrentValue;\n\t\t$this->NO_PESERTA->ViewCustomAttributes = \"\";\n\n\t\t// NOKARTU\n\t\t$this->NOKARTU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOKARTU->EditCustomAttributes = \"\";\n\t\t$this->NOKARTU->EditValue = $this->NOKARTU->CurrentValue;\n\t\t$this->NOKARTU->ViewCustomAttributes = \"\";\n\n\t\t// TANGGAL_SEP\n\t\t$this->TANGGAL_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TANGGAL_SEP->EditCustomAttributes = \"\";\n\t\t$this->TANGGAL_SEP->EditValue = $this->TANGGAL_SEP->CurrentValue;\n\t\t$this->TANGGAL_SEP->EditValue = ew_FormatDateTime($this->TANGGAL_SEP->EditValue, 0);\n\t\t$this->TANGGAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// TANGGALRUJUK_SEP\n\t\t$this->TANGGALRUJUK_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TANGGALRUJUK_SEP->EditCustomAttributes = \"\";\n\t\t$this->TANGGALRUJUK_SEP->EditValue = $this->TANGGALRUJUK_SEP->CurrentValue;\n\t\t$this->TANGGALRUJUK_SEP->EditValue = ew_FormatDateTime($this->TANGGALRUJUK_SEP->EditValue, 0);\n\t\t$this->TANGGALRUJUK_SEP->ViewCustomAttributes = \"\";\n\n\t\t// KELASRAWAT_SEP\n\t\t$this->KELASRAWAT_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KELASRAWAT_SEP->EditCustomAttributes = \"\";\n\t\t$this->KELASRAWAT_SEP->EditValue = $this->KELASRAWAT_SEP->CurrentValue;\n\t\t$this->KELASRAWAT_SEP->ViewCustomAttributes = \"\";\n\n\t\t// MINTA_RUJUKAN\n\t\t$this->MINTA_RUJUKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MINTA_RUJUKAN->EditCustomAttributes = \"\";\n\t\t$this->MINTA_RUJUKAN->EditValue = $this->MINTA_RUJUKAN->CurrentValue;\n\t\t$this->MINTA_RUJUKAN->ViewCustomAttributes = \"\";\n\n\t\t// NORUJUKAN_SEP\n\t\t$this->NORUJUKAN_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NORUJUKAN_SEP->EditCustomAttributes = \"\";\n\t\t$this->NORUJUKAN_SEP->EditValue = $this->NORUJUKAN_SEP->CurrentValue;\n\t\t$this->NORUJUKAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// PPKRUJUKANASAL_SEP\n\t\t$this->PPKRUJUKANASAL_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PPKRUJUKANASAL_SEP->EditCustomAttributes = \"\";\n\t\t$this->PPKRUJUKANASAL_SEP->EditValue = $this->PPKRUJUKANASAL_SEP->CurrentValue;\n\t\t$this->PPKRUJUKANASAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// NAMAPPKRUJUKANASAL_SEP\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->EditCustomAttributes = \"\";\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->EditValue = $this->NAMAPPKRUJUKANASAL_SEP->CurrentValue;\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// PPKPELAYANAN_SEP\n\t\t$this->PPKPELAYANAN_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PPKPELAYANAN_SEP->EditCustomAttributes = \"\";\n\t\t$this->PPKPELAYANAN_SEP->EditValue = $this->PPKPELAYANAN_SEP->CurrentValue;\n\t\t$this->PPKPELAYANAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// JENISPERAWATAN_SEP\n\t\t$this->JENISPERAWATAN_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JENISPERAWATAN_SEP->EditCustomAttributes = \"\";\n\t\t$this->JENISPERAWATAN_SEP->EditValue = $this->JENISPERAWATAN_SEP->CurrentValue;\n\t\t$this->JENISPERAWATAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// CATATAN_SEP\n\t\t$this->CATATAN_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->CATATAN_SEP->EditCustomAttributes = \"\";\n\t\t$this->CATATAN_SEP->EditValue = $this->CATATAN_SEP->CurrentValue;\n\t\t$this->CATATAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// DIAGNOSAAWAL_SEP\n\t\t$this->DIAGNOSAAWAL_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->DIAGNOSAAWAL_SEP->EditCustomAttributes = \"\";\n\t\t$this->DIAGNOSAAWAL_SEP->EditValue = $this->DIAGNOSAAWAL_SEP->CurrentValue;\n\t\t$this->DIAGNOSAAWAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// NAMADIAGNOSA_SEP\n\t\t$this->NAMADIAGNOSA_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NAMADIAGNOSA_SEP->EditCustomAttributes = \"\";\n\t\t$this->NAMADIAGNOSA_SEP->EditValue = $this->NAMADIAGNOSA_SEP->CurrentValue;\n\t\t$this->NAMADIAGNOSA_SEP->ViewCustomAttributes = \"\";\n\n\t\t// LAKALANTAS_SEP\n\t\t$this->LAKALANTAS_SEP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LAKALANTAS_SEP->EditCustomAttributes = \"\";\n\t\t$this->LAKALANTAS_SEP->EditValue = $this->LAKALANTAS_SEP->CurrentValue;\n\t\t$this->LAKALANTAS_SEP->ViewCustomAttributes = \"\";\n\n\t\t// LOKASILAKALANTAS\n\t\t$this->LOKASILAKALANTAS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LOKASILAKALANTAS->EditCustomAttributes = \"\";\n\t\t$this->LOKASILAKALANTAS->EditValue = $this->LOKASILAKALANTAS->CurrentValue;\n\t\t$this->LOKASILAKALANTAS->ViewCustomAttributes = \"\";\n\n\t\t// USER\n\t\t$this->USER->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->USER->EditCustomAttributes = \"\";\n\t\t$this->USER->EditValue = $this->USER->CurrentValue;\n\t\t$this->USER->ViewCustomAttributes = \"\";\n\n\t\t// tanggal\n\t\t$this->tanggal->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->tanggal->EditCustomAttributes = \"\";\n\t\t$this->tanggal->EditValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// bulan\n\t\t$this->bulan->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->bulan->EditCustomAttributes = \"\";\n\t\tif (strval($this->bulan->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`bulan_id`\" . ew_SearchString(\"=\", $this->bulan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `bulan_id`, `bulan_nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_bulan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->bulan->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->bulan, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->bulan->EditValue = $this->bulan->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->bulan->EditValue = $this->bulan->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->bulan->EditValue = NULL;\n\t\t}\n\t\t$this->bulan->ViewCustomAttributes = \"\";\n\n\t\t// tahun\n\t\t$this->tahun->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->tahun->EditCustomAttributes = \"\";\n\t\t$this->tahun->EditValue = $this->tahun->CurrentValue;\n\t\t$this->tahun->ViewCustomAttributes = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// rid\n\t\t$this->rid->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->rid->EditCustomAttributes = \"\";\n\t\t$this->rid->EditValue = $this->rid->CurrentValue;\n\t\t$this->rid->ViewCustomAttributes = \"\";\n\n\t\t// usn\n\t\t$this->usn->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->usn->EditCustomAttributes = \"\";\n\t\t$this->usn->EditValue = $this->usn->CurrentValue;\n\t\t$this->usn->PlaceHolder = ew_RemoveHtml($this->usn->FldCaption());\n\n\t\t// name\n\t\t$this->name->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->name->EditCustomAttributes = \"\";\n\t\t$this->name->EditValue = $this->name->CurrentValue;\n\t\t$this->name->PlaceHolder = ew_RemoveHtml($this->name->FldCaption());\n\n\t\t// sc1\n\t\t$this->sc1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc1->EditCustomAttributes = \"\";\n\t\t$this->sc1->EditValue = $this->sc1->CurrentValue;\n\t\t$this->sc1->PlaceHolder = ew_RemoveHtml($this->sc1->FldCaption());\n\n\t\t// s1\n\t\t$this->s1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s1->EditCustomAttributes = \"\";\n\t\t$this->s1->EditValue = $this->s1->CurrentValue;\n\t\t$this->s1->PlaceHolder = ew_RemoveHtml($this->s1->FldCaption());\n\n\t\t// sc2\n\t\t$this->sc2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc2->EditCustomAttributes = \"\";\n\t\t$this->sc2->EditValue = $this->sc2->CurrentValue;\n\t\t$this->sc2->PlaceHolder = ew_RemoveHtml($this->sc2->FldCaption());\n\n\t\t// s2\n\t\t$this->s2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s2->EditCustomAttributes = \"\";\n\t\t$this->s2->EditValue = $this->s2->CurrentValue;\n\t\t$this->s2->PlaceHolder = ew_RemoveHtml($this->s2->FldCaption());\n\n\t\t// sc3\n\t\t$this->sc3->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc3->EditCustomAttributes = \"\";\n\t\t$this->sc3->EditValue = $this->sc3->CurrentValue;\n\t\t$this->sc3->PlaceHolder = ew_RemoveHtml($this->sc3->FldCaption());\n\n\t\t// s3\n\t\t$this->s3->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s3->EditCustomAttributes = \"\";\n\t\t$this->s3->EditValue = $this->s3->CurrentValue;\n\t\t$this->s3->PlaceHolder = ew_RemoveHtml($this->s3->FldCaption());\n\n\t\t// sc4\n\t\t$this->sc4->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc4->EditCustomAttributes = \"\";\n\t\t$this->sc4->EditValue = $this->sc4->CurrentValue;\n\t\t$this->sc4->PlaceHolder = ew_RemoveHtml($this->sc4->FldCaption());\n\n\t\t// s4\n\t\t$this->s4->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s4->EditCustomAttributes = \"\";\n\t\t$this->s4->EditValue = $this->s4->CurrentValue;\n\t\t$this->s4->PlaceHolder = ew_RemoveHtml($this->s4->FldCaption());\n\n\t\t// sc5\n\t\t$this->sc5->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc5->EditCustomAttributes = \"\";\n\t\t$this->sc5->EditValue = $this->sc5->CurrentValue;\n\t\t$this->sc5->PlaceHolder = ew_RemoveHtml($this->sc5->FldCaption());\n\n\t\t// s5\n\t\t$this->s5->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s5->EditCustomAttributes = \"\";\n\t\t$this->s5->EditValue = $this->s5->CurrentValue;\n\t\t$this->s5->PlaceHolder = ew_RemoveHtml($this->s5->FldCaption());\n\n\t\t// sc6\n\t\t$this->sc6->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc6->EditCustomAttributes = \"\";\n\t\t$this->sc6->EditValue = $this->sc6->CurrentValue;\n\t\t$this->sc6->PlaceHolder = ew_RemoveHtml($this->sc6->FldCaption());\n\n\t\t// s6\n\t\t$this->s6->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s6->EditCustomAttributes = \"\";\n\t\t$this->s6->EditValue = $this->s6->CurrentValue;\n\t\t$this->s6->PlaceHolder = ew_RemoveHtml($this->s6->FldCaption());\n\n\t\t// sc7\n\t\t$this->sc7->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc7->EditCustomAttributes = \"\";\n\t\t$this->sc7->EditValue = $this->sc7->CurrentValue;\n\t\t$this->sc7->PlaceHolder = ew_RemoveHtml($this->sc7->FldCaption());\n\n\t\t// s7\n\t\t$this->s7->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s7->EditCustomAttributes = \"\";\n\t\t$this->s7->EditValue = $this->s7->CurrentValue;\n\t\t$this->s7->PlaceHolder = ew_RemoveHtml($this->s7->FldCaption());\n\n\t\t// sc8\n\t\t$this->sc8->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->sc8->EditCustomAttributes = \"\";\n\t\t$this->sc8->EditValue = $this->sc8->CurrentValue;\n\t\t$this->sc8->PlaceHolder = ew_RemoveHtml($this->sc8->FldCaption());\n\n\t\t// s8\n\t\t$this->s8->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->s8->EditCustomAttributes = \"\";\n\t\t$this->s8->EditValue = $this->s8->CurrentValue;\n\t\t$this->s8->PlaceHolder = ew_RemoveHtml($this->s8->FldCaption());\n\n\t\t// total\n\t\t$this->total->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->total->EditCustomAttributes = \"\";\n\t\t$this->total->EditValue = $this->total->CurrentValue;\n\t\t$this->total->PlaceHolder = ew_RemoveHtml($this->total->FldCaption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "abstract protected function renderEdit();", "public function renderEditRow()\n\t{\n\t\tglobal $Security, $CurrentLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// IncomeCode\n\t\t$this->IncomeCode->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IncomeCode->EditCustomAttributes = \"\";\n\t\t$this->IncomeCode->EditValue = $this->IncomeCode->CurrentValue;\n\t\t$this->IncomeCode->ViewCustomAttributes = \"\";\n\n\t\t// IncomeName\n\t\t$this->IncomeName->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IncomeName->EditCustomAttributes = \"\";\n\t\tif (!$this->IncomeName->Raw)\n\t\t\t$this->IncomeName->CurrentValue = HtmlDecode($this->IncomeName->CurrentValue);\n\t\t$this->IncomeName->EditValue = $this->IncomeName->CurrentValue;\n\t\t$this->IncomeName->PlaceHolder = RemoveHtml($this->IncomeName->caption());\n\n\t\t// IncomeDescription\n\t\t$this->IncomeDescription->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IncomeDescription->EditCustomAttributes = \"\";\n\t\tif (!$this->IncomeDescription->Raw)\n\t\t\t$this->IncomeDescription->CurrentValue = HtmlDecode($this->IncomeDescription->CurrentValue);\n\t\t$this->IncomeDescription->EditValue = $this->IncomeDescription->CurrentValue;\n\t\t$this->IncomeDescription->PlaceHolder = RemoveHtml($this->IncomeDescription->caption());\n\n\t\t// Division\n\t\t$this->Division->EditCustomAttributes = \"\";\n\n\t\t// IncomeAmount\n\t\t$this->IncomeAmount->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IncomeAmount->EditCustomAttributes = \"\";\n\t\t$this->IncomeAmount->EditValue = $this->IncomeAmount->CurrentValue;\n\t\t$this->IncomeAmount->PlaceHolder = RemoveHtml($this->IncomeAmount->caption());\n\t\tif (strval($this->IncomeAmount->EditValue) != \"\" && is_numeric($this->IncomeAmount->EditValue))\n\t\t\t$this->IncomeAmount->EditValue = FormatNumber($this->IncomeAmount->EditValue, -2, -2, -2, -2);\n\t\t\n\n\t\t// IncomeBasicRate\n\t\t$this->IncomeBasicRate->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IncomeBasicRate->EditCustomAttributes = \"\";\n\t\t$this->IncomeBasicRate->EditValue = $this->IncomeBasicRate->CurrentValue;\n\t\t$this->IncomeBasicRate->PlaceHolder = RemoveHtml($this->IncomeBasicRate->caption());\n\t\tif (strval($this->IncomeBasicRate->EditValue) != \"\" && is_numeric($this->IncomeBasicRate->EditValue))\n\t\t\t$this->IncomeBasicRate->EditValue = FormatNumber($this->IncomeBasicRate->EditValue, -2, -2, -2, -2);\n\t\t\n\n\t\t// BaseIncomeCode\n\t\t$this->BaseIncomeCode->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BaseIncomeCode->EditCustomAttributes = \"\";\n\n\t\t// Taxable\n\t\t$this->Taxable->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->Taxable->EditCustomAttributes = \"\";\n\n\t\t// AccountNo\n\t\t$this->AccountNo->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->AccountNo->EditCustomAttributes = \"\";\n\n\t\t// JobIncluded\n\t\t$this->JobIncluded->EditCustomAttributes = \"\";\n\n\t\t// Application\n\t\t$this->Application->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->Application->EditCustomAttributes = \"\";\n\n\t\t// JobExcluded\n\t\t$this->JobExcluded->EditCustomAttributes = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->AddUrl = $this->GetAddUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\t\t$this->ListUrl = $this->GetListUrl();\n\t\t$this->SetupOtherOptions();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// empleado_id\n\t\t// codigo\n\t\t// cui\n\t\t// nombre\n\t\t// apellido\n\t\t// direccion\n\t\t// departamento_origen_id\n\t\t// municipio_id\n\t\t// telefono_residencia\n\t\t// telefono_celular\n\t\t// fecha_nacimiento\n\t\t// nacionalidad\n\t\t// estado_civil\n\t\t// sexo\n\t\t// igss\n\t\t// nit\n\t\t// licencia_conducir\n\t\t// area_id\n\t\t// departmento_id\n\t\t// seccion_id\n\t\t// puesto_id\n\t\t// observaciones\n\t\t// tipo_sangre_id\n\t\t// estado\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// codigo\n\t\t$this->codigo->ViewValue = $this->codigo->CurrentValue;\n\t\t$this->codigo->ViewCustomAttributes = \"\";\n\n\t\t// cui\n\t\t$this->cui->ViewValue = $this->cui->CurrentValue;\n\t\t$this->cui->ViewCustomAttributes = \"\";\n\n\t\t// nombre\n\t\t$this->nombre->ViewValue = $this->nombre->CurrentValue;\n\t\t$this->nombre->ViewCustomAttributes = \"\";\n\n\t\t// apellido\n\t\t$this->apellido->ViewValue = $this->apellido->CurrentValue;\n\t\t$this->apellido->ViewCustomAttributes = \"\";\n\n\t\t// direccion\n\t\t$this->direccion->ViewValue = $this->direccion->CurrentValue;\n\t\t$this->direccion->ViewCustomAttributes = \"\";\n\n\t\t// departamento_origen_id\n\t\tif (strval($this->departamento_origen_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`departamento_origen_id`\" . ew_SearchString(\"=\", $this->departamento_origen_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `departamento_origen_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento_origen`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->departamento_origen_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->departamento_origen_id->ViewValue = $this->departamento_origen_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->departamento_origen_id->ViewValue = $this->departamento_origen_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->departamento_origen_id->ViewValue = NULL;\n\t\t}\n\t\t$this->departamento_origen_id->ViewCustomAttributes = \"\";\n\n\t\t// municipio_id\n\t\tif (strval($this->municipio_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`municipio_id`\" . ew_SearchString(\"=\", $this->municipio_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `municipio_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `municipio`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->municipio_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->municipio_id->ViewValue = $this->municipio_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->municipio_id->ViewValue = $this->municipio_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->municipio_id->ViewValue = NULL;\n\t\t}\n\t\t$this->municipio_id->ViewCustomAttributes = \"\";\n\n\t\t// telefono_residencia\n\t\t$this->telefono_residencia->ViewValue = $this->telefono_residencia->CurrentValue;\n\t\t$this->telefono_residencia->ViewCustomAttributes = \"\";\n\n\t\t// telefono_celular\n\t\t$this->telefono_celular->ViewValue = $this->telefono_celular->CurrentValue;\n\t\t$this->telefono_celular->ViewCustomAttributes = \"\";\n\n\t\t// fecha_nacimiento\n\t\t$this->fecha_nacimiento->ViewValue = $this->fecha_nacimiento->CurrentValue;\n\t\t$this->fecha_nacimiento->ViewValue = ew_FormatDateTime($this->fecha_nacimiento->ViewValue, 7);\n\t\t$this->fecha_nacimiento->ViewCustomAttributes = \"\";\n\n\t\t// nacionalidad\n\t\tif (strval($this->nacionalidad->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`nacionalidad_id`\" . ew_SearchString(\"=\", $this->nacionalidad->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `nacionalidad_id`, `nacionalidad` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `nacionalidad`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->nacionalidad, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->nacionalidad->ViewValue = $this->nacionalidad->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->nacionalidad->ViewValue = $this->nacionalidad->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->nacionalidad->ViewValue = NULL;\n\t\t}\n\t\t$this->nacionalidad->ViewCustomAttributes = \"\";\n\n\t\t// estado_civil\n\t\t$this->estado_civil->ViewValue = $this->estado_civil->CurrentValue;\n\t\tif (strval($this->estado_civil->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`estado_civil_id`\" . ew_SearchString(\"=\", $this->estado_civil->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `estado_civil_id`, `estado_civil` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estado_civil`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->estado_civil, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->estado_civil->ViewValue = $this->estado_civil->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->estado_civil->ViewValue = $this->estado_civil->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->estado_civil->ViewValue = NULL;\n\t\t}\n\t\t$this->estado_civil->ViewCustomAttributes = \"\";\n\n\t\t// sexo\n\t\t$this->sexo->ViewValue = $this->sexo->CurrentValue;\n\t\tif (strval($this->sexo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`sexo_id`\" . ew_SearchString(\"=\", $this->sexo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `sexo_id`, `sexo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sexo`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->sexo, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->sexo->ViewValue = $this->sexo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->sexo->ViewValue = $this->sexo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->sexo->ViewValue = NULL;\n\t\t}\n\t\t$this->sexo->ViewCustomAttributes = \"\";\n\n\t\t// igss\n\t\t$this->igss->ViewValue = $this->igss->CurrentValue;\n\t\t$this->igss->ViewCustomAttributes = \"\";\n\n\t\t// nit\n\t\t$this->nit->ViewValue = $this->nit->CurrentValue;\n\t\t$this->nit->ViewCustomAttributes = \"\";\n\n\t\t// licencia_conducir\n\t\t$this->licencia_conducir->ViewValue = $this->licencia_conducir->CurrentValue;\n\t\t$this->licencia_conducir->ViewCustomAttributes = \"\";\n\n\t\t// area_id\n\t\t$this->area_id->ViewValue = $this->area_id->CurrentValue;\n\t\tif (strval($this->area_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`area_id`\" . ew_SearchString(\"=\", $this->area_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `area_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `area`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->area_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->area_id->ViewValue = $this->area_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->area_id->ViewValue = $this->area_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->area_id->ViewValue = NULL;\n\t\t}\n\t\t$this->area_id->ViewCustomAttributes = \"\";\n\n\t\t// departmento_id\n\t\tif (strval($this->departmento_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`departamento_id`\" . ew_SearchString(\"=\", $this->departmento_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `departamento_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->departmento_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->departmento_id->ViewValue = $this->departmento_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->departmento_id->ViewValue = $this->departmento_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->departmento_id->ViewValue = NULL;\n\t\t}\n\t\t$this->departmento_id->ViewCustomAttributes = \"\";\n\n\t\t// seccion_id\n\t\tif (strval($this->seccion_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`seccion_id`\" . ew_SearchString(\"=\", $this->seccion_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `seccion_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `seccion`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->seccion_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->seccion_id->ViewValue = $this->seccion_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->seccion_id->ViewValue = $this->seccion_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->seccion_id->ViewValue = NULL;\n\t\t}\n\t\t$this->seccion_id->ViewCustomAttributes = \"\";\n\n\t\t// puesto_id\n\t\tif (strval($this->puesto_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`puesto_id`\" . ew_SearchString(\"=\", $this->puesto_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `puesto_id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `puesto`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->puesto_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->puesto_id->ViewValue = $this->puesto_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->puesto_id->ViewValue = $this->puesto_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->puesto_id->ViewValue = NULL;\n\t\t}\n\t\t$this->puesto_id->ViewCustomAttributes = \"\";\n\n\t\t// observaciones\n\t\t$this->observaciones->ViewValue = $this->observaciones->CurrentValue;\n\t\t$this->observaciones->ViewCustomAttributes = \"\";\n\n\t\t// tipo_sangre_id\n\t\tif (strval($this->tipo_sangre_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`tipo_sangre_id`\" . ew_SearchString(\"=\", $this->tipo_sangre_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `tipo_sangre_id`, `tipo_sangre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_sangre`\";\n\t\t$sWhereWrk = \"\";\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipo_sangre_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->tipo_sangre_id->ViewValue = $this->tipo_sangre_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipo_sangre_id->ViewValue = $this->tipo_sangre_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipo_sangre_id->ViewValue = NULL;\n\t\t}\n\t\t$this->tipo_sangre_id->ViewCustomAttributes = \"\";\n\n\t\t// estado\n\t\t$this->estado->ViewValue = $this->estado->CurrentValue;\n\t\t$this->estado->ViewCustomAttributes = \"\";\n\n\t\t\t// codigo\n\t\t\t$this->codigo->LinkCustomAttributes = \"\";\n\t\t\t$this->codigo->HrefValue = \"\";\n\t\t\t$this->codigo->TooltipValue = \"\";\n\n\t\t\t// cui\n\t\t\t$this->cui->LinkCustomAttributes = \"\";\n\t\t\t$this->cui->HrefValue = \"\";\n\t\t\t$this->cui->TooltipValue = \"\";\n\n\t\t\t// nombre\n\t\t\t$this->nombre->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre->HrefValue = \"\";\n\t\t\t$this->nombre->TooltipValue = \"\";\n\n\t\t\t// apellido\n\t\t\t$this->apellido->LinkCustomAttributes = \"\";\n\t\t\t$this->apellido->HrefValue = \"\";\n\t\t\t$this->apellido->TooltipValue = \"\";\n\n\t\t\t// direccion\n\t\t\t$this->direccion->LinkCustomAttributes = \"\";\n\t\t\t$this->direccion->HrefValue = \"\";\n\t\t\t$this->direccion->TooltipValue = \"\";\n\n\t\t\t// departamento_origen_id\n\t\t\t$this->departamento_origen_id->LinkCustomAttributes = \"\";\n\t\t\t$this->departamento_origen_id->HrefValue = \"\";\n\t\t\t$this->departamento_origen_id->TooltipValue = \"\";\n\n\t\t\t// municipio_id\n\t\t\t$this->municipio_id->LinkCustomAttributes = \"\";\n\t\t\t$this->municipio_id->HrefValue = \"\";\n\t\t\t$this->municipio_id->TooltipValue = \"\";\n\n\t\t\t// telefono_residencia\n\t\t\t$this->telefono_residencia->LinkCustomAttributes = \"\";\n\t\t\t$this->telefono_residencia->HrefValue = \"\";\n\t\t\t$this->telefono_residencia->TooltipValue = \"\";\n\n\t\t\t// telefono_celular\n\t\t\t$this->telefono_celular->LinkCustomAttributes = \"\";\n\t\t\t$this->telefono_celular->HrefValue = \"\";\n\t\t\t$this->telefono_celular->TooltipValue = \"\";\n\n\t\t\t// fecha_nacimiento\n\t\t\t$this->fecha_nacimiento->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_nacimiento->HrefValue = \"\";\n\t\t\t$this->fecha_nacimiento->TooltipValue = \"\";\n\n\t\t\t// nacionalidad\n\t\t\t$this->nacionalidad->LinkCustomAttributes = \"\";\n\t\t\t$this->nacionalidad->HrefValue = \"\";\n\t\t\t$this->nacionalidad->TooltipValue = \"\";\n\n\t\t\t// estado_civil\n\t\t\t$this->estado_civil->LinkCustomAttributes = \"\";\n\t\t\t$this->estado_civil->HrefValue = \"\";\n\t\t\t$this->estado_civil->TooltipValue = \"\";\n\n\t\t\t// sexo\n\t\t\t$this->sexo->LinkCustomAttributes = \"\";\n\t\t\t$this->sexo->HrefValue = \"\";\n\t\t\t$this->sexo->TooltipValue = \"\";\n\n\t\t\t// igss\n\t\t\t$this->igss->LinkCustomAttributes = \"\";\n\t\t\t$this->igss->HrefValue = \"\";\n\t\t\t$this->igss->TooltipValue = \"\";\n\n\t\t\t// nit\n\t\t\t$this->nit->LinkCustomAttributes = \"\";\n\t\t\t$this->nit->HrefValue = \"\";\n\t\t\t$this->nit->TooltipValue = \"\";\n\n\t\t\t// licencia_conducir\n\t\t\t$this->licencia_conducir->LinkCustomAttributes = \"\";\n\t\t\t$this->licencia_conducir->HrefValue = \"\";\n\t\t\t$this->licencia_conducir->TooltipValue = \"\";\n\n\t\t\t// area_id\n\t\t\t$this->area_id->LinkCustomAttributes = \"\";\n\t\t\t$this->area_id->HrefValue = \"\";\n\t\t\t$this->area_id->TooltipValue = \"\";\n\n\t\t\t// departmento_id\n\t\t\t$this->departmento_id->LinkCustomAttributes = \"\";\n\t\t\t$this->departmento_id->HrefValue = \"\";\n\t\t\t$this->departmento_id->TooltipValue = \"\";\n\n\t\t\t// seccion_id\n\t\t\t$this->seccion_id->LinkCustomAttributes = \"\";\n\t\t\t$this->seccion_id->HrefValue = \"\";\n\t\t\t$this->seccion_id->TooltipValue = \"\";\n\n\t\t\t// puesto_id\n\t\t\t$this->puesto_id->LinkCustomAttributes = \"\";\n\t\t\t$this->puesto_id->HrefValue = \"\";\n\t\t\t$this->puesto_id->TooltipValue = \"\";\n\n\t\t\t// observaciones\n\t\t\t$this->observaciones->LinkCustomAttributes = \"\";\n\t\t\t$this->observaciones->HrefValue = \"\";\n\t\t\t$this->observaciones->TooltipValue = \"\";\n\n\t\t\t// tipo_sangre_id\n\t\t\t$this->tipo_sangre_id->LinkCustomAttributes = \"\";\n\t\t\t$this->tipo_sangre_id->HrefValue = \"\";\n\t\t\t$this->tipo_sangre_id->TooltipValue = \"\";\n\n\t\t\t// estado\n\t\t\t$this->estado->LinkCustomAttributes = \"\";\n\t\t\t$this->estado->HrefValue = \"\";\n\t\t\t$this->estado->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->tarif->FormValue == $this->tarif->CurrentValue && is_numeric(ew_StrToFloat($this->tarif->CurrentValue)))\n\t\t\t$this->tarif->CurrentValue = ew_StrToFloat($this->tarif->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->bhp->FormValue == $this->bhp->CurrentValue && is_numeric(ew_StrToFloat($this->bhp->CurrentValue)))\n\t\t\t$this->bhp->CurrentValue = ew_StrToFloat($this->bhp->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// id_admission\n\t\t// nomr\n\t\t// statusbayar\n\t\t// kelas\n\t\t// tanggal\n\t\t// kode_tindakan\n\t\t// qty\n\t\t// tarif\n\t\t// bhp\n\t\t// user\n\t\t// nama_tindakan\n\t\t// kelompok_tindakan\n\t\t// kelompok1\n\t\t// kelompok2\n\t\t// kode_dokter\n\t\t// no_ruang\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// id_admission\n\t\t$this->id_admission->ViewValue = $this->id_admission->CurrentValue;\n\t\t$this->id_admission->ViewCustomAttributes = \"\";\n\n\t\t// nomr\n\t\t$this->nomr->ViewValue = $this->nomr->CurrentValue;\n\t\t$this->nomr->ViewCustomAttributes = \"\";\n\n\t\t// statusbayar\n\t\t$this->statusbayar->ViewValue = $this->statusbayar->CurrentValue;\n\t\t$this->statusbayar->ViewCustomAttributes = \"\";\n\n\t\t// kelas\n\t\t$this->kelas->ViewValue = $this->kelas->CurrentValue;\n\t\t$this->kelas->ViewCustomAttributes = \"\";\n\n\t\t// tanggal\n\t\t$this->tanggal->ViewValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewValue = ew_FormatDateTime($this->tanggal->ViewValue, 7);\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// kode_tindakan\n\t\tif (strval($this->kode_tindakan->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->kode_tindakan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kode`, `nama_tindakan` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vw_bill_ranap_data_tarif_tindakan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->kode_tindakan->LookupFilters = array();\n\t\t$lookuptblfilter = \"`kelompok_tindakan`='5'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->kode_tindakan, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->kode_tindakan->ViewValue = $this->kode_tindakan->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->kode_tindakan->ViewValue = $this->kode_tindakan->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->kode_tindakan->ViewValue = NULL;\n\t\t}\n\t\t$this->kode_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// qty\n\t\t$this->qty->ViewValue = $this->qty->CurrentValue;\n\t\t$this->qty->ViewCustomAttributes = \"\";\n\n\t\t// tarif\n\t\t$this->tarif->ViewValue = $this->tarif->CurrentValue;\n\t\t$this->tarif->ViewCustomAttributes = \"\";\n\n\t\t// bhp\n\t\t$this->bhp->ViewValue = $this->bhp->CurrentValue;\n\t\t$this->bhp->ViewCustomAttributes = \"\";\n\n\t\t// user\n\t\t$this->user->ViewValue = $this->user->CurrentValue;\n\t\t$this->user->ViewCustomAttributes = \"\";\n\n\t\t// nama_tindakan\n\t\t$this->nama_tindakan->ViewValue = $this->nama_tindakan->CurrentValue;\n\t\t$this->nama_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// kelompok_tindakan\n\t\t$this->kelompok_tindakan->ViewValue = $this->kelompok_tindakan->CurrentValue;\n\t\t$this->kelompok_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// kelompok1\n\t\t$this->kelompok1->ViewValue = $this->kelompok1->CurrentValue;\n\t\t$this->kelompok1->ViewCustomAttributes = \"\";\n\n\t\t// kelompok2\n\t\t$this->kelompok2->ViewValue = $this->kelompok2->CurrentValue;\n\t\t$this->kelompok2->ViewCustomAttributes = \"\";\n\n\t\t// kode_dokter\n\t\t$this->kode_dokter->ViewValue = $this->kode_dokter->CurrentValue;\n\t\t$this->kode_dokter->ViewCustomAttributes = \"\";\n\n\t\t// no_ruang\n\t\t$this->no_ruang->ViewValue = $this->no_ruang->CurrentValue;\n\t\t$this->no_ruang->ViewCustomAttributes = \"\";\n\n\t\t\t// id_admission\n\t\t\t$this->id_admission->LinkCustomAttributes = \"\";\n\t\t\t$this->id_admission->HrefValue = \"\";\n\t\t\t$this->id_admission->TooltipValue = \"\";\n\n\t\t\t// nomr\n\t\t\t$this->nomr->LinkCustomAttributes = \"\";\n\t\t\t$this->nomr->HrefValue = \"\";\n\t\t\t$this->nomr->TooltipValue = \"\";\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->LinkCustomAttributes = \"\";\n\t\t\t$this->statusbayar->HrefValue = \"\";\n\t\t\t$this->statusbayar->TooltipValue = \"\";\n\n\t\t\t// kelas\n\t\t\t$this->kelas->LinkCustomAttributes = \"\";\n\t\t\t$this->kelas->HrefValue = \"\";\n\t\t\t$this->kelas->TooltipValue = \"\";\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t\t$this->tanggal->HrefValue = \"\";\n\t\t\t$this->tanggal->TooltipValue = \"\";\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_tindakan->HrefValue = \"\";\n\t\t\t$this->kode_tindakan->TooltipValue = \"\";\n\n\t\t\t// qty\n\t\t\t$this->qty->LinkCustomAttributes = \"\";\n\t\t\t$this->qty->HrefValue = \"\";\n\t\t\t$this->qty->TooltipValue = \"\";\n\n\t\t\t// tarif\n\t\t\t$this->tarif->LinkCustomAttributes = \"\";\n\t\t\t$this->tarif->HrefValue = \"\";\n\t\t\t$this->tarif->TooltipValue = \"\";\n\n\t\t\t// bhp\n\t\t\t$this->bhp->LinkCustomAttributes = \"\";\n\t\t\t$this->bhp->HrefValue = \"\";\n\t\t\t$this->bhp->TooltipValue = \"\";\n\n\t\t\t// user\n\t\t\t$this->user->LinkCustomAttributes = \"\";\n\t\t\t$this->user->HrefValue = \"\";\n\t\t\t$this->user->TooltipValue = \"\";\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->HrefValue = \"\";\n\t\t\t$this->nama_tindakan->TooltipValue = \"\";\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->HrefValue = \"\";\n\t\t\t$this->kelompok_tindakan->TooltipValue = \"\";\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok1->HrefValue = \"\";\n\t\t\t$this->kelompok1->TooltipValue = \"\";\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok2->HrefValue = \"\";\n\t\t\t$this->kelompok2->TooltipValue = \"\";\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->HrefValue = \"\";\n\t\t\t$this->kode_dokter->TooltipValue = \"\";\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->LinkCustomAttributes = \"\";\n\t\t\t$this->no_ruang->HrefValue = \"\";\n\t\t\t$this->no_ruang->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// id_admission\n\t\t\t$this->id_admission->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_admission->EditCustomAttributes = \"\";\n\t\t\tif ($this->id_admission->getSessionValue() <> \"\") {\n\t\t\t\t$this->id_admission->CurrentValue = $this->id_admission->getSessionValue();\n\t\t\t$this->id_admission->ViewValue = $this->id_admission->CurrentValue;\n\t\t\t$this->id_admission->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->id_admission->EditValue = ew_HtmlEncode($this->id_admission->CurrentValue);\n\t\t\t$this->id_admission->PlaceHolder = ew_RemoveHtml($this->id_admission->FldCaption());\n\t\t\t}\n\n\t\t\t// nomr\n\t\t\t$this->nomr->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nomr->EditCustomAttributes = \"\";\n\t\t\tif ($this->nomr->getSessionValue() <> \"\") {\n\t\t\t\t$this->nomr->CurrentValue = $this->nomr->getSessionValue();\n\t\t\t$this->nomr->ViewValue = $this->nomr->CurrentValue;\n\t\t\t$this->nomr->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->nomr->EditValue = ew_HtmlEncode($this->nomr->CurrentValue);\n\t\t\t$this->nomr->PlaceHolder = ew_RemoveHtml($this->nomr->FldCaption());\n\t\t\t}\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->statusbayar->EditCustomAttributes = \"\";\n\t\t\tif ($this->statusbayar->getSessionValue() <> \"\") {\n\t\t\t\t$this->statusbayar->CurrentValue = $this->statusbayar->getSessionValue();\n\t\t\t$this->statusbayar->ViewValue = $this->statusbayar->CurrentValue;\n\t\t\t$this->statusbayar->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->statusbayar->EditValue = ew_HtmlEncode($this->statusbayar->CurrentValue);\n\t\t\t$this->statusbayar->PlaceHolder = ew_RemoveHtml($this->statusbayar->FldCaption());\n\t\t\t}\n\n\t\t\t// kelas\n\t\t\t$this->kelas->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelas->EditCustomAttributes = \"\";\n\t\t\tif ($this->kelas->getSessionValue() <> \"\") {\n\t\t\t\t$this->kelas->CurrentValue = $this->kelas->getSessionValue();\n\t\t\t$this->kelas->ViewValue = $this->kelas->CurrentValue;\n\t\t\t$this->kelas->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->kelas->EditValue = ew_HtmlEncode($this->kelas->CurrentValue);\n\t\t\t$this->kelas->PlaceHolder = ew_RemoveHtml($this->kelas->FldCaption());\n\t\t\t}\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tanggal->EditCustomAttributes = \"\";\n\t\t\t$this->tanggal->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->tanggal->CurrentValue, 7));\n\t\t\t$this->tanggal->PlaceHolder = ew_RemoveHtml($this->tanggal->FldCaption());\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kode_tindakan->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->kode_tindakan->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->kode_tindakan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `kode`, `nama_tindakan` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `vw_bill_ranap_data_tarif_tindakan`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->kode_tindakan->LookupFilters = array();\n\t\t\t$lookuptblfilter = \"`kelompok_tindakan`='5'\";\n\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->kode_tindakan, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->kode_tindakan->EditValue = $arwrk;\n\n\t\t\t// qty\n\t\t\t$this->qty->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->qty->EditCustomAttributes = \"\";\n\t\t\t$this->qty->EditValue = ew_HtmlEncode($this->qty->CurrentValue);\n\t\t\t$this->qty->PlaceHolder = ew_RemoveHtml($this->qty->FldCaption());\n\n\t\t\t// tarif\n\t\t\t$this->tarif->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tarif->EditCustomAttributes = \"\";\n\t\t\t$this->tarif->EditValue = ew_HtmlEncode($this->tarif->CurrentValue);\n\t\t\t$this->tarif->PlaceHolder = ew_RemoveHtml($this->tarif->FldCaption());\n\t\t\tif (strval($this->tarif->EditValue) <> \"\" && is_numeric($this->tarif->EditValue)) $this->tarif->EditValue = ew_FormatNumber($this->tarif->EditValue, -2, -1, -2, 0);\n\n\t\t\t// bhp\n\t\t\t$this->bhp->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->bhp->EditCustomAttributes = \"\";\n\t\t\t$this->bhp->EditValue = ew_HtmlEncode($this->bhp->CurrentValue);\n\t\t\t$this->bhp->PlaceHolder = ew_RemoveHtml($this->bhp->FldCaption());\n\t\t\tif (strval($this->bhp->EditValue) <> \"\" && is_numeric($this->bhp->EditValue)) $this->bhp->EditValue = ew_FormatNumber($this->bhp->EditValue, -2, -1, -2, 0);\n\n\t\t\t// user\n\t\t\t$this->user->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->user->EditCustomAttributes = \"\";\n\t\t\t$this->user->EditValue = ew_HtmlEncode($this->user->CurrentValue);\n\t\t\t$this->user->PlaceHolder = ew_RemoveHtml($this->user->FldCaption());\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nama_tindakan->EditCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->EditValue = ew_HtmlEncode($this->nama_tindakan->CurrentValue);\n\t\t\t$this->nama_tindakan->PlaceHolder = ew_RemoveHtml($this->nama_tindakan->FldCaption());\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok_tindakan->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->EditValue = ew_HtmlEncode($this->kelompok_tindakan->CurrentValue);\n\t\t\t$this->kelompok_tindakan->PlaceHolder = ew_RemoveHtml($this->kelompok_tindakan->FldCaption());\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok1->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok1->EditValue = ew_HtmlEncode($this->kelompok1->CurrentValue);\n\t\t\t$this->kelompok1->PlaceHolder = ew_RemoveHtml($this->kelompok1->FldCaption());\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok2->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok2->EditValue = ew_HtmlEncode($this->kelompok2->CurrentValue);\n\t\t\t$this->kelompok2->PlaceHolder = ew_RemoveHtml($this->kelompok2->FldCaption());\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kode_dokter->EditCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->EditValue = ew_HtmlEncode($this->kode_dokter->CurrentValue);\n\t\t\t$this->kode_dokter->PlaceHolder = ew_RemoveHtml($this->kode_dokter->FldCaption());\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->no_ruang->EditCustomAttributes = \"\";\n\t\t\t$this->no_ruang->EditValue = ew_HtmlEncode($this->no_ruang->CurrentValue);\n\t\t\t$this->no_ruang->PlaceHolder = ew_RemoveHtml($this->no_ruang->FldCaption());\n\n\t\t\t// Add refer script\n\t\t\t// id_admission\n\n\t\t\t$this->id_admission->LinkCustomAttributes = \"\";\n\t\t\t$this->id_admission->HrefValue = \"\";\n\n\t\t\t// nomr\n\t\t\t$this->nomr->LinkCustomAttributes = \"\";\n\t\t\t$this->nomr->HrefValue = \"\";\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->LinkCustomAttributes = \"\";\n\t\t\t$this->statusbayar->HrefValue = \"\";\n\n\t\t\t// kelas\n\t\t\t$this->kelas->LinkCustomAttributes = \"\";\n\t\t\t$this->kelas->HrefValue = \"\";\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t\t$this->tanggal->HrefValue = \"\";\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_tindakan->HrefValue = \"\";\n\n\t\t\t// qty\n\t\t\t$this->qty->LinkCustomAttributes = \"\";\n\t\t\t$this->qty->HrefValue = \"\";\n\n\t\t\t// tarif\n\t\t\t$this->tarif->LinkCustomAttributes = \"\";\n\t\t\t$this->tarif->HrefValue = \"\";\n\n\t\t\t// bhp\n\t\t\t$this->bhp->LinkCustomAttributes = \"\";\n\t\t\t$this->bhp->HrefValue = \"\";\n\n\t\t\t// user\n\t\t\t$this->user->LinkCustomAttributes = \"\";\n\t\t\t$this->user->HrefValue = \"\";\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->HrefValue = \"\";\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->HrefValue = \"\";\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok1->HrefValue = \"\";\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok2->HrefValue = \"\";\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->HrefValue = \"\";\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->LinkCustomAttributes = \"\";\n\t\t\t$this->no_ruang->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->besar->FormValue == $this->besar->CurrentValue && is_numeric(ew_StrToFloat($this->besar->CurrentValue)))\n\t\t\t$this->besar->CurrentValue = ew_StrToFloat($this->besar->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// replid\n\t\t// nama\n\t\t// besar\n\t\t// idkategori\n\t\t// rekkas\n\t\t// rekpendapatan\n\t\t// rekpiutang\n\t\t// aktif\n\t\t// keterangan\n\t\t// departemen\n\t\t// info1\n\t\t// info2\n\t\t// info3\n\t\t// ts\n\t\t// token\n\t\t// issync\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// replid\n\t\t$this->replid->ViewValue = $this->replid->CurrentValue;\n\t\t$this->replid->ViewCustomAttributes = \"\";\n\n\t\t// nama\n\t\t$this->nama->ViewValue = $this->nama->CurrentValue;\n\t\t$this->nama->ViewCustomAttributes = \"\";\n\n\t\t// besar\n\t\t$this->besar->ViewValue = $this->besar->CurrentValue;\n\t\t$this->besar->ViewCustomAttributes = \"\";\n\n\t\t// idkategori\n\t\t$this->idkategori->ViewValue = $this->idkategori->CurrentValue;\n\t\t$this->idkategori->ViewCustomAttributes = \"\";\n\n\t\t// rekkas\n\t\t$this->rekkas->ViewValue = $this->rekkas->CurrentValue;\n\t\t$this->rekkas->ViewCustomAttributes = \"\";\n\n\t\t// rekpendapatan\n\t\t$this->rekpendapatan->ViewValue = $this->rekpendapatan->CurrentValue;\n\t\t$this->rekpendapatan->ViewCustomAttributes = \"\";\n\n\t\t// rekpiutang\n\t\t$this->rekpiutang->ViewValue = $this->rekpiutang->CurrentValue;\n\t\t$this->rekpiutang->ViewCustomAttributes = \"\";\n\n\t\t// aktif\n\t\t$this->aktif->ViewValue = $this->aktif->CurrentValue;\n\t\t$this->aktif->ViewCustomAttributes = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->ViewValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->ViewCustomAttributes = \"\";\n\n\t\t// departemen\n\t\t$this->departemen->ViewValue = $this->departemen->CurrentValue;\n\t\t$this->departemen->ViewCustomAttributes = \"\";\n\n\t\t// info1\n\t\t$this->info1->ViewValue = $this->info1->CurrentValue;\n\t\t$this->info1->ViewCustomAttributes = \"\";\n\n\t\t// info2\n\t\t$this->info2->ViewValue = $this->info2->CurrentValue;\n\t\t$this->info2->ViewCustomAttributes = \"\";\n\n\t\t// info3\n\t\t$this->info3->ViewValue = $this->info3->CurrentValue;\n\t\t$this->info3->ViewCustomAttributes = \"\";\n\n\t\t// ts\n\t\t$this->ts->ViewValue = $this->ts->CurrentValue;\n\t\t$this->ts->ViewValue = ew_FormatDateTime($this->ts->ViewValue, 0);\n\t\t$this->ts->ViewCustomAttributes = \"\";\n\n\t\t// token\n\t\t$this->token->ViewValue = $this->token->CurrentValue;\n\t\t$this->token->ViewCustomAttributes = \"\";\n\n\t\t// issync\n\t\t$this->issync->ViewValue = $this->issync->CurrentValue;\n\t\t$this->issync->ViewCustomAttributes = \"\";\n\n\t\t\t// nama\n\t\t\t$this->nama->LinkCustomAttributes = \"\";\n\t\t\t$this->nama->HrefValue = \"\";\n\t\t\t$this->nama->TooltipValue = \"\";\n\n\t\t\t// besar\n\t\t\t$this->besar->LinkCustomAttributes = \"\";\n\t\t\t$this->besar->HrefValue = \"\";\n\t\t\t$this->besar->TooltipValue = \"\";\n\n\t\t\t// idkategori\n\t\t\t$this->idkategori->LinkCustomAttributes = \"\";\n\t\t\t$this->idkategori->HrefValue = \"\";\n\t\t\t$this->idkategori->TooltipValue = \"\";\n\n\t\t\t// rekkas\n\t\t\t$this->rekkas->LinkCustomAttributes = \"\";\n\t\t\t$this->rekkas->HrefValue = \"\";\n\t\t\t$this->rekkas->TooltipValue = \"\";\n\n\t\t\t// rekpendapatan\n\t\t\t$this->rekpendapatan->LinkCustomAttributes = \"\";\n\t\t\t$this->rekpendapatan->HrefValue = \"\";\n\t\t\t$this->rekpendapatan->TooltipValue = \"\";\n\n\t\t\t// rekpiutang\n\t\t\t$this->rekpiutang->LinkCustomAttributes = \"\";\n\t\t\t$this->rekpiutang->HrefValue = \"\";\n\t\t\t$this->rekpiutang->TooltipValue = \"\";\n\n\t\t\t// aktif\n\t\t\t$this->aktif->LinkCustomAttributes = \"\";\n\t\t\t$this->aktif->HrefValue = \"\";\n\t\t\t$this->aktif->TooltipValue = \"\";\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t\t$this->keterangan->HrefValue = \"\";\n\t\t\t$this->keterangan->TooltipValue = \"\";\n\n\t\t\t// departemen\n\t\t\t$this->departemen->LinkCustomAttributes = \"\";\n\t\t\t$this->departemen->HrefValue = \"\";\n\t\t\t$this->departemen->TooltipValue = \"\";\n\n\t\t\t// info1\n\t\t\t$this->info1->LinkCustomAttributes = \"\";\n\t\t\t$this->info1->HrefValue = \"\";\n\t\t\t$this->info1->TooltipValue = \"\";\n\n\t\t\t// info2\n\t\t\t$this->info2->LinkCustomAttributes = \"\";\n\t\t\t$this->info2->HrefValue = \"\";\n\t\t\t$this->info2->TooltipValue = \"\";\n\n\t\t\t// info3\n\t\t\t$this->info3->LinkCustomAttributes = \"\";\n\t\t\t$this->info3->HrefValue = \"\";\n\t\t\t$this->info3->TooltipValue = \"\";\n\n\t\t\t// ts\n\t\t\t$this->ts->LinkCustomAttributes = \"\";\n\t\t\t$this->ts->HrefValue = \"\";\n\t\t\t$this->ts->TooltipValue = \"\";\n\n\t\t\t// token\n\t\t\t$this->token->LinkCustomAttributes = \"\";\n\t\t\t$this->token->HrefValue = \"\";\n\t\t\t$this->token->TooltipValue = \"\";\n\n\t\t\t// issync\n\t\t\t$this->issync->LinkCustomAttributes = \"\";\n\t\t\t$this->issync->HrefValue = \"\";\n\t\t\t$this->issync->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// nama\n\t\t\t$this->nama->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nama->EditCustomAttributes = \"\";\n\t\t\t$this->nama->EditValue = ew_HtmlEncode($this->nama->CurrentValue);\n\t\t\t$this->nama->PlaceHolder = ew_RemoveHtml($this->nama->FldCaption());\n\n\t\t\t// besar\n\t\t\t$this->besar->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->besar->EditCustomAttributes = \"\";\n\t\t\t$this->besar->EditValue = ew_HtmlEncode($this->besar->CurrentValue);\n\t\t\t$this->besar->PlaceHolder = ew_RemoveHtml($this->besar->FldCaption());\n\t\t\tif (strval($this->besar->EditValue) <> \"\" && is_numeric($this->besar->EditValue)) $this->besar->EditValue = ew_FormatNumber($this->besar->EditValue, -2, -1, -2, 0);\n\n\t\t\t// idkategori\n\t\t\t$this->idkategori->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->idkategori->EditCustomAttributes = \"\";\n\t\t\t$this->idkategori->EditValue = ew_HtmlEncode($this->idkategori->CurrentValue);\n\t\t\t$this->idkategori->PlaceHolder = ew_RemoveHtml($this->idkategori->FldCaption());\n\n\t\t\t// rekkas\n\t\t\t$this->rekkas->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->rekkas->EditCustomAttributes = \"\";\n\t\t\t$this->rekkas->EditValue = ew_HtmlEncode($this->rekkas->CurrentValue);\n\t\t\t$this->rekkas->PlaceHolder = ew_RemoveHtml($this->rekkas->FldCaption());\n\n\t\t\t// rekpendapatan\n\t\t\t$this->rekpendapatan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->rekpendapatan->EditCustomAttributes = \"\";\n\t\t\t$this->rekpendapatan->EditValue = ew_HtmlEncode($this->rekpendapatan->CurrentValue);\n\t\t\t$this->rekpendapatan->PlaceHolder = ew_RemoveHtml($this->rekpendapatan->FldCaption());\n\n\t\t\t// rekpiutang\n\t\t\t$this->rekpiutang->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->rekpiutang->EditCustomAttributes = \"\";\n\t\t\t$this->rekpiutang->EditValue = ew_HtmlEncode($this->rekpiutang->CurrentValue);\n\t\t\t$this->rekpiutang->PlaceHolder = ew_RemoveHtml($this->rekpiutang->FldCaption());\n\n\t\t\t// aktif\n\t\t\t$this->aktif->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->aktif->EditCustomAttributes = \"\";\n\t\t\t$this->aktif->EditValue = ew_HtmlEncode($this->aktif->CurrentValue);\n\t\t\t$this->aktif->PlaceHolder = ew_RemoveHtml($this->aktif->FldCaption());\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->keterangan->EditCustomAttributes = \"\";\n\t\t\t$this->keterangan->EditValue = ew_HtmlEncode($this->keterangan->CurrentValue);\n\t\t\t$this->keterangan->PlaceHolder = ew_RemoveHtml($this->keterangan->FldCaption());\n\n\t\t\t// departemen\n\t\t\t$this->departemen->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->departemen->EditCustomAttributes = \"\";\n\t\t\t$this->departemen->EditValue = ew_HtmlEncode($this->departemen->CurrentValue);\n\t\t\t$this->departemen->PlaceHolder = ew_RemoveHtml($this->departemen->FldCaption());\n\n\t\t\t// info1\n\t\t\t$this->info1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->info1->EditCustomAttributes = \"\";\n\t\t\t$this->info1->EditValue = ew_HtmlEncode($this->info1->CurrentValue);\n\t\t\t$this->info1->PlaceHolder = ew_RemoveHtml($this->info1->FldCaption());\n\n\t\t\t// info2\n\t\t\t$this->info2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->info2->EditCustomAttributes = \"\";\n\t\t\t$this->info2->EditValue = ew_HtmlEncode($this->info2->CurrentValue);\n\t\t\t$this->info2->PlaceHolder = ew_RemoveHtml($this->info2->FldCaption());\n\n\t\t\t// info3\n\t\t\t$this->info3->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->info3->EditCustomAttributes = \"\";\n\t\t\t$this->info3->EditValue = ew_HtmlEncode($this->info3->CurrentValue);\n\t\t\t$this->info3->PlaceHolder = ew_RemoveHtml($this->info3->FldCaption());\n\n\t\t\t// ts\n\t\t\t$this->ts->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->ts->EditCustomAttributes = \"\";\n\t\t\t$this->ts->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->ts->CurrentValue, 8));\n\t\t\t$this->ts->PlaceHolder = ew_RemoveHtml($this->ts->FldCaption());\n\n\t\t\t// token\n\t\t\t$this->token->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->token->EditCustomAttributes = \"\";\n\t\t\t$this->token->EditValue = ew_HtmlEncode($this->token->CurrentValue);\n\t\t\t$this->token->PlaceHolder = ew_RemoveHtml($this->token->FldCaption());\n\n\t\t\t// issync\n\t\t\t$this->issync->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->issync->EditCustomAttributes = \"\";\n\t\t\t$this->issync->EditValue = ew_HtmlEncode($this->issync->CurrentValue);\n\t\t\t$this->issync->PlaceHolder = ew_RemoveHtml($this->issync->FldCaption());\n\n\t\t\t// Add refer script\n\t\t\t// nama\n\n\t\t\t$this->nama->LinkCustomAttributes = \"\";\n\t\t\t$this->nama->HrefValue = \"\";\n\n\t\t\t// besar\n\t\t\t$this->besar->LinkCustomAttributes = \"\";\n\t\t\t$this->besar->HrefValue = \"\";\n\n\t\t\t// idkategori\n\t\t\t$this->idkategori->LinkCustomAttributes = \"\";\n\t\t\t$this->idkategori->HrefValue = \"\";\n\n\t\t\t// rekkas\n\t\t\t$this->rekkas->LinkCustomAttributes = \"\";\n\t\t\t$this->rekkas->HrefValue = \"\";\n\n\t\t\t// rekpendapatan\n\t\t\t$this->rekpendapatan->LinkCustomAttributes = \"\";\n\t\t\t$this->rekpendapatan->HrefValue = \"\";\n\n\t\t\t// rekpiutang\n\t\t\t$this->rekpiutang->LinkCustomAttributes = \"\";\n\t\t\t$this->rekpiutang->HrefValue = \"\";\n\n\t\t\t// aktif\n\t\t\t$this->aktif->LinkCustomAttributes = \"\";\n\t\t\t$this->aktif->HrefValue = \"\";\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t\t$this->keterangan->HrefValue = \"\";\n\n\t\t\t// departemen\n\t\t\t$this->departemen->LinkCustomAttributes = \"\";\n\t\t\t$this->departemen->HrefValue = \"\";\n\n\t\t\t// info1\n\t\t\t$this->info1->LinkCustomAttributes = \"\";\n\t\t\t$this->info1->HrefValue = \"\";\n\n\t\t\t// info2\n\t\t\t$this->info2->LinkCustomAttributes = \"\";\n\t\t\t$this->info2->HrefValue = \"\";\n\n\t\t\t// info3\n\t\t\t$this->info3->LinkCustomAttributes = \"\";\n\t\t\t$this->info3->HrefValue = \"\";\n\n\t\t\t// ts\n\t\t\t$this->ts->LinkCustomAttributes = \"\";\n\t\t\t$this->ts->HrefValue = \"\";\n\n\t\t\t// token\n\t\t\t$this->token->LinkCustomAttributes = \"\";\n\t\t\t$this->token->HrefValue = \"\";\n\n\t\t\t// issync\n\t\t\t$this->issync->LinkCustomAttributes = \"\";\n\t\t\t$this->issync->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->SetupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// id\r\n\t\t// datetime\r\n\t\t// script\r\n\t\t// user\r\n\t\t// action\r\n\t\t// table\r\n\t\t// field\r\n\t\t// keyvalue\r\n\t\t// oldvalue\r\n\t\t// newvalue\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->ViewValue = $this->id->CurrentValue;\r\n\t\t\t$this->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->ViewValue = $this->datetime->CurrentValue;\r\n\t\t\t$this->datetime->ViewValue = ew_FormatDateTime($this->datetime->ViewValue, 5);\r\n\t\t\t$this->datetime->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->ViewValue = $this->script->CurrentValue;\r\n\t\t\t$this->script->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->ViewValue = $this->user->CurrentValue;\r\n\t\t\t$this->user->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->ViewValue = $this->action->CurrentValue;\r\n\t\t\t$this->action->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->ViewValue = $this->_table->CurrentValue;\r\n\t\t\t$this->_table->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->ViewValue = $this->_field->CurrentValue;\r\n\t\t\t$this->_field->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->ViewValue = $this->keyvalue->CurrentValue;\r\n\t\t\t$this->keyvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->ViewValue = $this->oldvalue->CurrentValue;\r\n\t\t\t$this->oldvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->ViewValue = $this->newvalue->CurrentValue;\r\n\t\t\t$this->newvalue->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->LinkCustomAttributes = \"\";\r\n\t\t\t$this->datetime->HrefValue = \"\";\r\n\t\t\t$this->datetime->TooltipValue = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->LinkCustomAttributes = \"\";\r\n\t\t\t$this->script->HrefValue = \"\";\r\n\t\t\t$this->script->TooltipValue = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->LinkCustomAttributes = \"\";\r\n\t\t\t$this->user->HrefValue = \"\";\r\n\t\t\t$this->user->TooltipValue = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->LinkCustomAttributes = \"\";\r\n\t\t\t$this->action->HrefValue = \"\";\r\n\t\t\t$this->action->TooltipValue = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->LinkCustomAttributes = \"\";\r\n\t\t\t$this->_table->HrefValue = \"\";\r\n\t\t\t$this->_table->TooltipValue = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->LinkCustomAttributes = \"\";\r\n\t\t\t$this->_field->HrefValue = \"\";\r\n\t\t\t$this->_field->TooltipValue = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->keyvalue->HrefValue = \"\";\r\n\t\t\t$this->keyvalue->TooltipValue = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->oldvalue->HrefValue = \"\";\r\n\t\t\t$this->oldvalue->TooltipValue = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->LinkCustomAttributes = \"\";\r\n\t\t\t$this->newvalue->HrefValue = \"\";\r\n\t\t\t$this->newvalue->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\r\n\r\n\t\t\t// datetime\r\n\t\t\t$this->datetime->EditCustomAttributes = \"\";\r\n\t\t\t$this->datetime->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->datetime->CurrentValue, 5));\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->EditCustomAttributes = \"\";\r\n\t\t\t$this->script->EditValue = ew_HtmlEncode($this->script->CurrentValue);\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->EditCustomAttributes = \"\";\r\n\t\t\t$this->user->EditValue = ew_HtmlEncode($this->user->CurrentValue);\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->EditCustomAttributes = \"\";\r\n\t\t\t$this->action->EditValue = ew_HtmlEncode($this->action->CurrentValue);\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->EditCustomAttributes = \"\";\r\n\t\t\t$this->_table->EditValue = ew_HtmlEncode($this->_table->CurrentValue);\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->EditCustomAttributes = \"\";\r\n\t\t\t$this->_field->EditValue = ew_HtmlEncode($this->_field->CurrentValue);\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->keyvalue->EditValue = ew_HtmlEncode($this->keyvalue->CurrentValue);\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->oldvalue->EditValue = ew_HtmlEncode($this->oldvalue->CurrentValue);\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->EditCustomAttributes = \"\";\r\n\t\t\t$this->newvalue->EditValue = ew_HtmlEncode($this->newvalue->CurrentValue);\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// datetime\r\n\r\n\t\t\t$this->datetime->HrefValue = \"\";\r\n\r\n\t\t\t// script\r\n\t\t\t$this->script->HrefValue = \"\";\r\n\r\n\t\t\t// user\r\n\t\t\t$this->user->HrefValue = \"\";\r\n\r\n\t\t\t// action\r\n\t\t\t$this->action->HrefValue = \"\";\r\n\r\n\t\t\t// table\r\n\t\t\t$this->_table->HrefValue = \"\";\r\n\r\n\t\t\t// field\r\n\t\t\t$this->_field->HrefValue = \"\";\r\n\r\n\t\t\t// keyvalue\r\n\t\t\t$this->keyvalue->HrefValue = \"\";\r\n\r\n\t\t\t// oldvalue\r\n\t\t\t$this->oldvalue->HrefValue = \"\";\r\n\r\n\t\t\t// newvalue\r\n\t\t\t$this->newvalue->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function editrow()\r\n {\r\n $c=$this->connector();\r\n $r='';\r\n $r.=$this->logout();\r\n $db=$_GET['db'];\r\n $tbl=$_GET['table'];\r\n $val=$_GET['val'];\r\n $col=$_GET['col'];\r\n $r.=\"<div id='isi'>\r\n <center><a href='?act=showtable&db=$db'>Show Tables </a></center><br />\";\r\n $r.=\"<form method='post' action='?act=showcon&db=$db&table=$tbl&col=$col&val=$val'>\";\r\n $r.=\"<table width=100% align='center' cellspacing=0 class='xpltab'>\";\r\n \r\n $cols=array();\r\n $iml=mysql_query(\"SHOW COLUMNS FROM $db.$tbl\");\r\n $query=mysql_query(\"SELECT * FROM $db.$tbl WHERE $col='$val'\");\r\n \r\n while($colom=mysql_fetch_assoc($iml))$cols[]=$colom['Field'];\r\n $data=mysql_fetch_assoc($query);\r\n for($i=0;$i<count($cols);$i++)\r\n {\r\n $pt=$cols[$i];\r\n $r.=\"<tr><td style='border:none'>\".$pt.\"</td><td style='border:none'>\".' : <input id=\"sqlbox\" type=\"text\" name=\"'.$cols[$i].'\" value=\"'.$data[$pt].'\"></td></tr>';\r\n\r\n }\r\n $r.=\"</table><input type='hidden' name='action' value='updaterow'><input id='but' type='submit' value='update'></form></div>\";\r\n return $r;\r\n $this->free();\r\n }", "function RenderRow() {\r\n\t\tglobal $Security, $Language, $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->AddUrl = $this->GetAddUrl();\r\n\t\t$this->EditUrl = $this->GetEditUrl();\r\n\t\t$this->CopyUrl = $this->GetCopyUrl();\r\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\r\n\t\t$this->ListUrl = $this->GetListUrl();\r\n\t\t$this->SetupOtherOptions();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Dni_Tutor\r\n\t\t// Apellidos_Nombres\r\n\t\t// Edad\r\n\t\t// Domicilio\r\n\t\t// Tel_Contacto\r\n\t\t// Fecha_Nac\r\n\t\t// Cuil\r\n\t\t// MasHijos\r\n\t\t// Id_Estado_Civil\r\n\t\t// Id_Sexo\r\n\t\t// Id_Relacion\r\n\t\t// Id_Ocupacion\r\n\t\t// Lugar_Nacimiento\r\n\t\t// Id_Provincia\r\n\t\t// Id_Departamento\r\n\t\t// Id_Localidad\r\n\t\t// Fecha_Actualizacion\r\n\t\t// Usuario\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t// Dni_Tutor\r\n\t\t$this->Dni_Tutor->ViewValue = $this->Dni_Tutor->CurrentValue;\r\n\t\t$this->Dni_Tutor->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Apellidos_Nombres\r\n\t\t$this->Apellidos_Nombres->ViewValue = $this->Apellidos_Nombres->CurrentValue;\r\n\t\t$this->Apellidos_Nombres->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Edad\r\n\t\t$this->Edad->ViewValue = $this->Edad->CurrentValue;\r\n\t\t$this->Edad->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Domicilio\r\n\t\t$this->Domicilio->ViewValue = $this->Domicilio->CurrentValue;\r\n\t\t$this->Domicilio->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Tel_Contacto\r\n\t\t$this->Tel_Contacto->ViewValue = $this->Tel_Contacto->CurrentValue;\r\n\t\t$this->Tel_Contacto->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Fecha_Nac\r\n\t\t$this->Fecha_Nac->ViewValue = $this->Fecha_Nac->CurrentValue;\r\n\t\t$this->Fecha_Nac->ViewValue = ew_FormatDateTime($this->Fecha_Nac->ViewValue, 7);\r\n\t\t$this->Fecha_Nac->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Cuil\r\n\t\t$this->Cuil->ViewValue = $this->Cuil->CurrentValue;\r\n\t\t$this->Cuil->ViewCustomAttributes = \"\";\r\n\r\n\t\t// MasHijos\r\n\t\tif (strval($this->MasHijos->CurrentValue) <> \"\") {\r\n\t\t\t$this->MasHijos->ViewValue = $this->MasHijos->OptionCaption($this->MasHijos->CurrentValue);\r\n\t\t} else {\r\n\t\t\t$this->MasHijos->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->MasHijos->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Estado_Civil\r\n\t\tif (strval($this->Id_Estado_Civil->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Estado_Civil`\" . ew_SearchString(\"=\", $this->Id_Estado_Civil->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Estado_Civil`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estado_civil`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Estado_Civil->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Estado_Civil, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Estado_Civil->ViewValue = $this->Id_Estado_Civil->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Estado_Civil->ViewValue = $this->Id_Estado_Civil->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Estado_Civil->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Estado_Civil->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Sexo\r\n\t\tif (strval($this->Id_Sexo->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Sexo`\" . ew_SearchString(\"=\", $this->Id_Sexo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Sexo`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sexo_personas`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Sexo->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Sexo, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Sexo->ViewValue = $this->Id_Sexo->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Sexo->ViewValue = $this->Id_Sexo->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Sexo->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Sexo->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Relacion\r\n\t\tif (strval($this->Id_Relacion->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Relacion`\" . ew_SearchString(\"=\", $this->Id_Relacion->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Relacion`, `Desripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_relacion_alumno_tutor`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Relacion->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Relacion, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Desripcion` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Relacion->ViewValue = $this->Id_Relacion->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Relacion->ViewValue = $this->Id_Relacion->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Relacion->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Relacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Ocupacion\r\n\t\tif (strval($this->Id_Ocupacion->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Ocupacion`\" . ew_SearchString(\"=\", $this->Id_Ocupacion->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Ocupacion`, `Descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ocupacion_tutor`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Ocupacion->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Ocupacion, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Ocupacion->ViewValue = $this->Id_Ocupacion->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Ocupacion->ViewValue = $this->Id_Ocupacion->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Ocupacion->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Ocupacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Lugar_Nacimiento\r\n\t\t$this->Lugar_Nacimiento->ViewValue = $this->Lugar_Nacimiento->CurrentValue;\r\n\t\t$this->Lugar_Nacimiento->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Provincia\r\n\t\tif (strval($this->Id_Provincia->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Provincia`\" . ew_SearchString(\"=\", $this->Id_Provincia->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Provincia`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincias`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Provincia->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Provincia, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Provincia->ViewValue = $this->Id_Provincia->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Provincia->ViewValue = $this->Id_Provincia->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Provincia->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Provincia->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Departamento\r\n\t\tif (strval($this->Id_Departamento->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Departamento`\" . ew_SearchString(\"=\", $this->Id_Departamento->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Departamento`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Departamento->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Departamento, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Departamento->ViewValue = $this->Id_Departamento->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Departamento->ViewValue = $this->Id_Departamento->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Departamento->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Departamento->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Localidad\r\n\t\tif (strval($this->Id_Localidad->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Localidad`\" . ew_SearchString(\"=\", $this->Id_Localidad->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Localidad`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidades`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Localidad->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Localidad, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Localidad->ViewValue = $this->Id_Localidad->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Localidad->ViewValue = $this->Id_Localidad->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Localidad->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Localidad->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Fecha_Actualizacion\r\n\t\t$this->Fecha_Actualizacion->ViewValue = $this->Fecha_Actualizacion->CurrentValue;\r\n\t\t$this->Fecha_Actualizacion->ViewValue = ew_FormatDateTime($this->Fecha_Actualizacion->ViewValue, 7);\r\n\t\t$this->Fecha_Actualizacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Usuario\r\n\t\t$this->Usuario->ViewValue = $this->Usuario->CurrentValue;\r\n\t\t$this->Usuario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Dni_Tutor\r\n\t\t\t$this->Dni_Tutor->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Dni_Tutor->HrefValue = \"\";\r\n\t\t\t$this->Dni_Tutor->TooltipValue = \"\";\r\n\r\n\t\t\t// Apellidos_Nombres\r\n\t\t\t$this->Apellidos_Nombres->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Apellidos_Nombres->HrefValue = \"\";\r\n\t\t\t$this->Apellidos_Nombres->TooltipValue = \"\";\r\n\r\n\t\t\t// Edad\r\n\t\t\t$this->Edad->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Edad->HrefValue = \"\";\r\n\t\t\t$this->Edad->TooltipValue = \"\";\r\n\r\n\t\t\t// Domicilio\r\n\t\t\t$this->Domicilio->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Domicilio->HrefValue = \"\";\r\n\t\t\t$this->Domicilio->TooltipValue = \"\";\r\n\r\n\t\t\t// Tel_Contacto\r\n\t\t\t$this->Tel_Contacto->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Tel_Contacto->HrefValue = \"\";\r\n\t\t\t$this->Tel_Contacto->TooltipValue = \"\";\r\n\r\n\t\t\t// Fecha_Nac\r\n\t\t\t$this->Fecha_Nac->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Nac->HrefValue = \"\";\r\n\t\t\t$this->Fecha_Nac->TooltipValue = \"\";\r\n\r\n\t\t\t// Cuil\r\n\t\t\t$this->Cuil->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Cuil->HrefValue = \"\";\r\n\t\t\t$this->Cuil->TooltipValue = \"\";\r\n\r\n\t\t\t// MasHijos\r\n\t\t\t$this->MasHijos->LinkCustomAttributes = \"\";\r\n\t\t\t$this->MasHijos->HrefValue = \"\";\r\n\t\t\t$this->MasHijos->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Estado_Civil\r\n\t\t\t$this->Id_Estado_Civil->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Estado_Civil->HrefValue = \"\";\r\n\t\t\t$this->Id_Estado_Civil->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Sexo\r\n\t\t\t$this->Id_Sexo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Sexo->HrefValue = \"\";\r\n\t\t\t$this->Id_Sexo->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Relacion\r\n\t\t\t$this->Id_Relacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Relacion->HrefValue = \"\";\r\n\t\t\t$this->Id_Relacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Ocupacion\r\n\t\t\t$this->Id_Ocupacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Ocupacion->HrefValue = \"\";\r\n\t\t\t$this->Id_Ocupacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Lugar_Nacimiento\r\n\t\t\t$this->Lugar_Nacimiento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Lugar_Nacimiento->HrefValue = \"\";\r\n\t\t\t$this->Lugar_Nacimiento->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Provincia\r\n\t\t\t$this->Id_Provincia->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Provincia->HrefValue = \"\";\r\n\t\t\t$this->Id_Provincia->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Departamento\r\n\t\t\t$this->Id_Departamento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Departamento->HrefValue = \"\";\r\n\t\t\t$this->Id_Departamento->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Localidad\r\n\t\t\t$this->Id_Localidad->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Localidad->HrefValue = \"\";\r\n\t\t\t$this->Id_Localidad->TooltipValue = \"\";\r\n\r\n\t\t\t// Fecha_Actualizacion\r\n\t\t\t$this->Fecha_Actualizacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->HrefValue = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Usuario\r\n\t\t\t$this->Usuario->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Usuario->HrefValue = \"\";\r\n\t\t\t$this->Usuario->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Convert decimal values if posted back\r\n\r\n\t\tif ($this->PrecioUnitario->FormValue == $this->PrecioUnitario->CurrentValue && is_numeric(ew_StrToFloat($this->PrecioUnitario->CurrentValue)))\r\n\t\t\t$this->PrecioUnitario->CurrentValue = ew_StrToFloat($this->PrecioUnitario->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->MontoDescuento->FormValue == $this->MontoDescuento->CurrentValue && is_numeric(ew_StrToFloat($this->MontoDescuento->CurrentValue)))\r\n\t\t\t$this->MontoDescuento->CurrentValue = ew_StrToFloat($this->MontoDescuento->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->Precio_SIM->FormValue == $this->Precio_SIM->CurrentValue && is_numeric(ew_StrToFloat($this->Precio_SIM->CurrentValue)))\r\n\t\t\t$this->Precio_SIM->CurrentValue = ew_StrToFloat($this->Precio_SIM->CurrentValue);\r\n\r\n\t\t// Convert decimal values if posted back\r\n\t\tif ($this->Monto->FormValue == $this->Monto->CurrentValue && is_numeric(ew_StrToFloat($this->Monto->CurrentValue)))\r\n\t\t\t$this->Monto->CurrentValue = ew_StrToFloat($this->Monto->CurrentValue);\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Id_Venta_Eq\r\n\t\t// CLIENTE\r\n\t\t// Id_Articulo\r\n\t\t// Acabado_eq\r\n\t\t// Num_IMEI\r\n\t\t// Num_ICCID\r\n\t\t// Num_CEL\r\n\t\t// Causa\r\n\t\t// Con_SIM\r\n\t\t// Observaciones\r\n\t\t// PrecioUnitario\r\n\t\t// MontoDescuento\r\n\t\t// Precio_SIM\r\n\t\t// Monto\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// Id_Venta_Eq\r\n\t\t\t$this->Id_Venta_Eq->ViewValue = $this->Id_Venta_Eq->CurrentValue;\r\n\t\t\t$this->Id_Venta_Eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->ViewValue = $this->CLIENTE->CurrentValue;\r\n\t\t\t$this->CLIENTE->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\tif (strval($this->Id_Articulo->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id_Articulo`\" . ew_SearchString(\"=\", $this->Id_Articulo->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Articulo`, `Articulo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ca_articulos`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Articulo`\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Id_Articulo->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Id_Articulo->ViewValue = $this->Id_Articulo->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Articulo->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Id_Articulo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->ViewValue = $this->Acabado_eq->CurrentValue;\r\n\t\t\t$this->Acabado_eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->ViewValue = $this->Num_IMEI->CurrentValue;\r\n\t\t\t$this->Num_IMEI->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->ViewValue = $this->Num_ICCID->CurrentValue;\r\n\t\t\t$this->Num_ICCID->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->ViewValue = $this->Num_CEL->CurrentValue;\r\n\t\t\t$this->Num_CEL->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\tif (strval($this->Causa->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Causa->CurrentValue) {\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(1) <> \"\" ? $this->Causa->FldTagCaption(1) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(2) <> \"\" ? $this->Causa->FldTagCaption(2) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(3):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(3) <> \"\" ? $this->Causa->FldTagCaption(3) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(4):\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->FldTagCaption(4) <> \"\" ? $this->Causa->FldTagCaption(4) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Causa->ViewValue = $this->Causa->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Causa->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Causa->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\tif (strval($this->Con_SIM->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Con_SIM->CurrentValue) {\r\n\t\t\t\t\tcase $this->Con_SIM->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->FldTagCaption(1) <> \"\" ? $this->Con_SIM->FldTagCaption(1) : $this->Con_SIM->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Con_SIM->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->FldTagCaption(2) <> \"\" ? $this->Con_SIM->FldTagCaption(2) : $this->Con_SIM->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Con_SIM->ViewValue = $this->Con_SIM->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Con_SIM->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Con_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->ViewValue = $this->Observaciones->CurrentValue;\r\n\t\t\t$this->Observaciones->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->ViewValue = $this->PrecioUnitario->CurrentValue;\r\n\t\t\t$this->PrecioUnitario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->ViewValue = $this->MontoDescuento->CurrentValue;\r\n\t\t\t$this->MontoDescuento->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->ViewValue = $this->Precio_SIM->CurrentValue;\r\n\t\t\t$this->Precio_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->ViewValue = $this->Monto->CurrentValue;\r\n\t\t\t$this->Monto->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->LinkCustomAttributes = \"\";\r\n\t\t\t$this->CLIENTE->HrefValue = \"\";\r\n\t\t\t$this->CLIENTE->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Articulo->HrefValue = \"\";\r\n\t\t\t$this->Id_Articulo->TooltipValue = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Acabado_eq->HrefValue = \"\";\r\n\t\t\t$this->Acabado_eq->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_IMEI->HrefValue = \"\";\r\n\t\t\t$this->Num_IMEI->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_ICCID->HrefValue = \"\";\r\n\t\t\t$this->Num_ICCID->TooltipValue = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Num_CEL->HrefValue = \"\";\r\n\t\t\t$this->Num_CEL->TooltipValue = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Causa->HrefValue = \"\";\r\n\t\t\t$this->Causa->TooltipValue = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Con_SIM->HrefValue = \"\";\r\n\t\t\t$this->Con_SIM->TooltipValue = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Observaciones->HrefValue = \"\";\r\n\t\t\t$this->Observaciones->TooltipValue = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->LinkCustomAttributes = \"\";\r\n\t\t\t$this->PrecioUnitario->HrefValue = \"\";\r\n\t\t\t$this->PrecioUnitario->TooltipValue = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->MontoDescuento->HrefValue = \"\";\r\n\t\t\t$this->MontoDescuento->TooltipValue = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Precio_SIM->HrefValue = \"\";\r\n\t\t\t$this->Precio_SIM->TooltipValue = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Monto->HrefValue = \"\";\r\n\t\t\t$this->Monto->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\n\r\n\t\t\t// CLIENTE\r\n\t\t\t$this->CLIENTE->EditCustomAttributes = \"\";\r\n\t\t\t$this->CLIENTE->EditValue = $this->CLIENTE->CurrentValue;\r\n\t\t\t$this->CLIENTE->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->EditCustomAttributes = \"\";\r\n\t\t\tif (strval($this->Id_Articulo->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id_Articulo`\" . ew_SearchString(\"=\", $this->Id_Articulo->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Articulo`, `Articulo` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `ca_articulos`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Articulo`\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Id_Articulo->EditValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Id_Articulo->EditValue = $this->Id_Articulo->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Articulo->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Id_Articulo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->EditCustomAttributes = \"\";\r\n\t\t\t$this->Acabado_eq->EditValue = $this->Acabado_eq->CurrentValue;\r\n\t\t\t$this->Acabado_eq->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->EditCustomAttributes = \"\";\r\n\t\t\t$this->Num_IMEI->EditValue = $this->Num_IMEI->CurrentValue;\r\n\t\t\t$this->Num_IMEI->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->EditCustomAttributes = \"onchange= 'ValidaICCID(this);' \";\r\n\t\t\t$this->Num_ICCID->EditValue = $this->Num_ICCID->CurrentValue;\r\n\t\t\t$this->Num_ICCID->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->EditCustomAttributes = \"\";\r\n\t\t\t$this->Num_CEL->EditValue = $this->Num_CEL->CurrentValue;\r\n\t\t\t$this->Num_CEL->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->EditCustomAttributes = \"\";\r\n\t\t\tif (strval($this->Causa->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Causa->CurrentValue) {\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(1) <> \"\" ? $this->Causa->FldTagCaption(1) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(2) <> \"\" ? $this->Causa->FldTagCaption(2) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(3):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(3) <> \"\" ? $this->Causa->FldTagCaption(3) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Causa->FldTagValue(4):\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->FldTagCaption(4) <> \"\" ? $this->Causa->FldTagCaption(4) : $this->Causa->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Causa->EditValue = $this->Causa->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Causa->EditValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Causa->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Con_SIM->FldTagValue(1), $this->Con_SIM->FldTagCaption(1) <> \"\" ? $this->Con_SIM->FldTagCaption(1) : $this->Con_SIM->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Con_SIM->FldTagValue(2), $this->Con_SIM->FldTagCaption(2) <> \"\" ? $this->Con_SIM->FldTagCaption(2) : $this->Con_SIM->FldTagValue(2));\r\n\t\t\t$this->Con_SIM->EditValue = $arwrk;\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->EditCustomAttributes = 'class=\"mayusculas\" onchange=\"conMayusculas(this)\" autocomplete=\"off\" ';\r\n\t\t\t$this->Observaciones->EditValue = ew_HtmlEncode($this->Observaciones->CurrentValue);\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->EditCustomAttributes = \"\";\r\n\t\t\t$this->PrecioUnitario->EditValue = $this->PrecioUnitario->CurrentValue;\r\n\t\t\t$this->PrecioUnitario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->EditCustomAttributes = \"\";\r\n\t\t\t$this->MontoDescuento->EditValue = $this->MontoDescuento->CurrentValue;\r\n\t\t\t$this->MontoDescuento->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->EditCustomAttributes = \"\";\r\n\t\t\t$this->Precio_SIM->EditValue = $this->Precio_SIM->CurrentValue;\r\n\t\t\t$this->Precio_SIM->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->EditCustomAttributes = \"\";\r\n\t\t\t$this->Monto->EditValue = $this->Monto->CurrentValue;\r\n\t\t\t$this->Monto->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Edit refer script\r\n\t\t\t// CLIENTE\r\n\r\n\t\t\t$this->CLIENTE->HrefValue = \"\";\r\n\r\n\t\t\t// Id_Articulo\r\n\t\t\t$this->Id_Articulo->HrefValue = \"\";\r\n\r\n\t\t\t// Acabado_eq\r\n\t\t\t$this->Acabado_eq->HrefValue = \"\";\r\n\r\n\t\t\t// Num_IMEI\r\n\t\t\t$this->Num_IMEI->HrefValue = \"\";\r\n\r\n\t\t\t// Num_ICCID\r\n\t\t\t$this->Num_ICCID->HrefValue = \"\";\r\n\r\n\t\t\t// Num_CEL\r\n\t\t\t$this->Num_CEL->HrefValue = \"\";\r\n\r\n\t\t\t// Causa\r\n\t\t\t$this->Causa->HrefValue = \"\";\r\n\r\n\t\t\t// Con_SIM\r\n\t\t\t$this->Con_SIM->HrefValue = \"\";\r\n\r\n\t\t\t// Observaciones\r\n\t\t\t$this->Observaciones->HrefValue = \"\";\r\n\r\n\t\t\t// PrecioUnitario\r\n\t\t\t$this->PrecioUnitario->HrefValue = \"\";\r\n\r\n\t\t\t// MontoDescuento\r\n\t\t\t$this->MontoDescuento->HrefValue = \"\";\r\n\r\n\t\t\t// Precio_SIM\r\n\t\t\t$this->Precio_SIM->HrefValue = \"\";\r\n\r\n\t\t\t// Monto\r\n\t\t\t$this->Monto->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// fecha_tamizaje\n\t\t// id_centro\n\t\t// apellidopaterno\n\t\t// apellidomaterno\n\t\t// nombre\n\t\t// ci\n\t\t// fecha_nacimiento\n\t\t// dias\n\t\t// semanas\n\t\t// meses\n\t\t// sexo\n\t\t// discapacidad\n\t\t// id_tipodiscapacidad\n\t\t// resultado\n\t\t// resultadotamizaje\n\t\t// tapon\n\t\t// tipo\n\t\t// repetirprueba\n\t\t// observaciones\n\t\t// id_apoderado\n\t\t// id_referencia\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// fecha_tamizaje\n\t\t$this->fecha_tamizaje->ViewValue = $this->fecha_tamizaje->CurrentValue;\n\t\t$this->fecha_tamizaje->ViewValue = ew_FormatDateTime($this->fecha_tamizaje->ViewValue, 0);\n\t\t$this->fecha_tamizaje->ViewCustomAttributes = \"\";\n\n\t\t// id_centro\n\t\tif (strval($this->id_centro->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_centro->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `institucionesdesalud`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_centro->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_centro, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_centro->ViewValue = $this->id_centro->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_centro->ViewValue = $this->id_centro->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_centro->ViewValue = NULL;\n\t\t}\n\t\t$this->id_centro->ViewCustomAttributes = \"\";\n\n\t\t// apellidopaterno\n\t\t$this->apellidopaterno->ViewValue = $this->apellidopaterno->CurrentValue;\n\t\t$this->apellidopaterno->ViewCustomAttributes = \"\";\n\n\t\t// apellidomaterno\n\t\t$this->apellidomaterno->ViewValue = $this->apellidomaterno->CurrentValue;\n\t\t$this->apellidomaterno->ViewCustomAttributes = \"\";\n\n\t\t// nombre\n\t\t$this->nombre->ViewValue = $this->nombre->CurrentValue;\n\t\t$this->nombre->ViewCustomAttributes = \"\";\n\n\t\t// ci\n\t\t$this->ci->ViewValue = $this->ci->CurrentValue;\n\t\t$this->ci->ViewCustomAttributes = \"\";\n\n\t\t// fecha_nacimiento\n\t\t$this->fecha_nacimiento->ViewValue = $this->fecha_nacimiento->CurrentValue;\n\t\t$this->fecha_nacimiento->ViewValue = ew_FormatDateTime($this->fecha_nacimiento->ViewValue, 0);\n\t\t$this->fecha_nacimiento->ViewCustomAttributes = \"\";\n\n\t\t// dias\n\t\t$this->dias->ViewValue = $this->dias->CurrentValue;\n\t\t$this->dias->ViewCustomAttributes = \"\";\n\n\t\t// semanas\n\t\t$this->semanas->ViewValue = $this->semanas->CurrentValue;\n\t\t$this->semanas->ViewCustomAttributes = \"\";\n\n\t\t// meses\n\t\t$this->meses->ViewValue = $this->meses->CurrentValue;\n\t\t$this->meses->ViewCustomAttributes = \"\";\n\n\t\t// sexo\n\t\tif (strval($this->sexo->CurrentValue) <> \"\") {\n\t\t\t$this->sexo->ViewValue = $this->sexo->OptionCaption($this->sexo->CurrentValue);\n\t\t} else {\n\t\t\t$this->sexo->ViewValue = NULL;\n\t\t}\n\t\t$this->sexo->ViewCustomAttributes = \"\";\n\n\t\t// discapacidad\n\t\t$this->discapacidad->ViewValue = $this->discapacidad->CurrentValue;\n\t\tif (strval($this->discapacidad->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->discapacidad->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `discapacidad`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->discapacidad->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->discapacidad, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->discapacidad->ViewValue = $this->discapacidad->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->discapacidad->ViewValue = $this->discapacidad->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->discapacidad->ViewValue = NULL;\n\t\t}\n\t\t$this->discapacidad->ViewCustomAttributes = \"\";\n\n\t\t// id_tipodiscapacidad\n\t\t$this->id_tipodiscapacidad->ViewValue = $this->id_tipodiscapacidad->CurrentValue;\n\t\t$this->id_tipodiscapacidad->ViewCustomAttributes = \"\";\n\n\t\t// resultado\n\t\t$this->resultado->ViewValue = $this->resultado->CurrentValue;\n\t\t$this->resultado->ViewCustomAttributes = \"\";\n\n\t\t// resultadotamizaje\n\t\t$this->resultadotamizaje->ViewValue = $this->resultadotamizaje->CurrentValue;\n\t\t$this->resultadotamizaje->ViewCustomAttributes = \"\";\n\n\t\t// tapon\n\t\tif (strval($this->tapon->CurrentValue) <> \"\") {\n\t\t\t$this->tapon->ViewValue = $this->tapon->OptionCaption($this->tapon->CurrentValue);\n\t\t} else {\n\t\t\t$this->tapon->ViewValue = NULL;\n\t\t}\n\t\t$this->tapon->ViewCustomAttributes = \"\";\n\n\t\t// tipo\n\t\tif (strval($this->tipo->CurrentValue) <> \"\") {\n\t\t\t$this->tipo->ViewValue = $this->tipo->OptionCaption($this->tipo->CurrentValue);\n\t\t} else {\n\t\t\t$this->tipo->ViewValue = NULL;\n\t\t}\n\t\t$this->tipo->ViewCustomAttributes = \"\";\n\n\t\t// repetirprueba\n\t\tif (strval($this->repetirprueba->CurrentValue) <> \"\") {\n\t\t\t$this->repetirprueba->ViewValue = $this->repetirprueba->OptionCaption($this->repetirprueba->CurrentValue);\n\t\t} else {\n\t\t\t$this->repetirprueba->ViewValue = NULL;\n\t\t}\n\t\t$this->repetirprueba->ViewCustomAttributes = \"\";\n\n\t\t// observaciones\n\t\t$this->observaciones->ViewValue = $this->observaciones->CurrentValue;\n\t\t$this->observaciones->ViewCustomAttributes = \"\";\n\n\t\t// id_apoderado\n\t\tif ($this->id_apoderado->VirtualValue <> \"\") {\n\t\t\t$this->id_apoderado->ViewValue = $this->id_apoderado->VirtualValue;\n\t\t} else {\n\t\tif (strval($this->id_apoderado->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_apoderado->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombres` AS `DispFld`, `apellidopaterno` AS `Disp2Fld`, `apellidopaterno` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `apoderado`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_apoderado->LookupFilters = array(\"dx1\" => '`nombres`', \"dx2\" => '`apellidopaterno`', \"dx3\" => '`apellidopaterno`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_apoderado, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$arwrk[3] = $rswrk->fields('Disp3Fld');\n\t\t\t\t$this->id_apoderado->ViewValue = $this->id_apoderado->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_apoderado->ViewValue = $this->id_apoderado->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_apoderado->ViewValue = NULL;\n\t\t}\n\t\t}\n\t\t$this->id_apoderado->ViewCustomAttributes = \"\";\n\n\t\t// id_referencia\n\t\tif ($this->id_referencia->VirtualValue <> \"\") {\n\t\t\t$this->id_referencia->ViewValue = $this->id_referencia->VirtualValue;\n\t\t} else {\n\t\tif (strval($this->id_referencia->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_referencia->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombrescentromedico` AS `DispFld`, `nombrescompleto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `referencia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_referencia->LookupFilters = array(\"dx1\" => '`nombrescentromedico`', \"dx2\" => '`nombrescompleto`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_referencia, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->id_referencia->ViewValue = $this->id_referencia->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_referencia->ViewValue = $this->id_referencia->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_referencia->ViewValue = NULL;\n\t\t}\n\t\t}\n\t\t$this->id_referencia->ViewCustomAttributes = \"\";\n\n\t\t\t// fecha_tamizaje\n\t\t\t$this->fecha_tamizaje->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_tamizaje->HrefValue = \"\";\n\t\t\t$this->fecha_tamizaje->TooltipValue = \"\";\n\n\t\t\t// id_centro\n\t\t\t$this->id_centro->LinkCustomAttributes = \"\";\n\t\t\t$this->id_centro->HrefValue = \"\";\n\t\t\t$this->id_centro->TooltipValue = \"\";\n\n\t\t\t// apellidopaterno\n\t\t\t$this->apellidopaterno->LinkCustomAttributes = \"\";\n\t\t\t$this->apellidopaterno->HrefValue = \"\";\n\t\t\t$this->apellidopaterno->TooltipValue = \"\";\n\n\t\t\t// apellidomaterno\n\t\t\t$this->apellidomaterno->LinkCustomAttributes = \"\";\n\t\t\t$this->apellidomaterno->HrefValue = \"\";\n\t\t\t$this->apellidomaterno->TooltipValue = \"\";\n\n\t\t\t// nombre\n\t\t\t$this->nombre->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre->HrefValue = \"\";\n\t\t\t$this->nombre->TooltipValue = \"\";\n\n\t\t\t// ci\n\t\t\t$this->ci->LinkCustomAttributes = \"\";\n\t\t\t$this->ci->HrefValue = \"\";\n\t\t\t$this->ci->TooltipValue = \"\";\n\n\t\t\t// fecha_nacimiento\n\t\t\t$this->fecha_nacimiento->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_nacimiento->HrefValue = \"\";\n\t\t\t$this->fecha_nacimiento->TooltipValue = \"\";\n\n\t\t\t// dias\n\t\t\t$this->dias->LinkCustomAttributes = \"\";\n\t\t\t$this->dias->HrefValue = \"\";\n\t\t\t$this->dias->TooltipValue = \"\";\n\n\t\t\t// semanas\n\t\t\t$this->semanas->LinkCustomAttributes = \"\";\n\t\t\t$this->semanas->HrefValue = \"\";\n\t\t\t$this->semanas->TooltipValue = \"\";\n\n\t\t\t// meses\n\t\t\t$this->meses->LinkCustomAttributes = \"\";\n\t\t\t$this->meses->HrefValue = \"\";\n\t\t\t$this->meses->TooltipValue = \"\";\n\n\t\t\t// sexo\n\t\t\t$this->sexo->LinkCustomAttributes = \"\";\n\t\t\t$this->sexo->HrefValue = \"\";\n\t\t\t$this->sexo->TooltipValue = \"\";\n\n\t\t\t// discapacidad\n\t\t\t$this->discapacidad->LinkCustomAttributes = \"\";\n\t\t\t$this->discapacidad->HrefValue = \"\";\n\t\t\t$this->discapacidad->TooltipValue = \"\";\n\n\t\t\t// id_tipodiscapacidad\n\t\t\t$this->id_tipodiscapacidad->LinkCustomAttributes = \"\";\n\t\t\t$this->id_tipodiscapacidad->HrefValue = \"\";\n\t\t\t$this->id_tipodiscapacidad->TooltipValue = \"\";\n\n\t\t\t// resultado\n\t\t\t$this->resultado->LinkCustomAttributes = \"\";\n\t\t\t$this->resultado->HrefValue = \"\";\n\t\t\t$this->resultado->TooltipValue = \"\";\n\n\t\t\t// resultadotamizaje\n\t\t\t$this->resultadotamizaje->LinkCustomAttributes = \"\";\n\t\t\t$this->resultadotamizaje->HrefValue = \"\";\n\t\t\t$this->resultadotamizaje->TooltipValue = \"\";\n\n\t\t\t// tapon\n\t\t\t$this->tapon->LinkCustomAttributes = \"\";\n\t\t\t$this->tapon->HrefValue = \"\";\n\t\t\t$this->tapon->TooltipValue = \"\";\n\n\t\t\t// tipo\n\t\t\t$this->tipo->LinkCustomAttributes = \"\";\n\t\t\t$this->tipo->HrefValue = \"\";\n\t\t\t$this->tipo->TooltipValue = \"\";\n\n\t\t\t// repetirprueba\n\t\t\t$this->repetirprueba->LinkCustomAttributes = \"\";\n\t\t\t$this->repetirprueba->HrefValue = \"\";\n\t\t\t$this->repetirprueba->TooltipValue = \"\";\n\n\t\t\t// observaciones\n\t\t\t$this->observaciones->LinkCustomAttributes = \"\";\n\t\t\t$this->observaciones->HrefValue = \"\";\n\t\t\t$this->observaciones->TooltipValue = \"\";\n\n\t\t\t// id_apoderado\n\t\t\t$this->id_apoderado->LinkCustomAttributes = \"\";\n\t\t\t$this->id_apoderado->HrefValue = \"\";\n\t\t\t$this->id_apoderado->TooltipValue = \"\";\n\n\t\t\t// id_referencia\n\t\t\t$this->id_referencia->LinkCustomAttributes = \"\";\n\t\t\t$this->id_referencia->HrefValue = \"\";\n\t\t\t$this->id_referencia->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// fecha_tamizaje\n\t\t\t$this->fecha_tamizaje->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->fecha_tamizaje->EditCustomAttributes = \"\";\n\t\t\t$this->fecha_tamizaje->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->fecha_tamizaje->AdvancedSearch->SearchValue, 0), 8));\n\t\t\t$this->fecha_tamizaje->PlaceHolder = ew_RemoveHtml($this->fecha_tamizaje->FldCaption());\n\n\t\t\t// id_centro\n\t\t\t$this->id_centro->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_centro->EditCustomAttributes = \"\";\n\n\t\t\t// apellidopaterno\n\t\t\t$this->apellidopaterno->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->apellidopaterno->EditCustomAttributes = \"\";\n\t\t\t$this->apellidopaterno->EditValue = ew_HtmlEncode($this->apellidopaterno->AdvancedSearch->SearchValue);\n\t\t\t$this->apellidopaterno->PlaceHolder = ew_RemoveHtml($this->apellidopaterno->FldCaption());\n\n\t\t\t// apellidomaterno\n\t\t\t$this->apellidomaterno->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->apellidomaterno->EditCustomAttributes = \"\";\n\t\t\t$this->apellidomaterno->EditValue = ew_HtmlEncode($this->apellidomaterno->AdvancedSearch->SearchValue);\n\t\t\t$this->apellidomaterno->PlaceHolder = ew_RemoveHtml($this->apellidomaterno->FldCaption());\n\n\t\t\t// nombre\n\t\t\t$this->nombre->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nombre->EditCustomAttributes = \"\";\n\t\t\t$this->nombre->EditValue = ew_HtmlEncode($this->nombre->AdvancedSearch->SearchValue);\n\t\t\t$this->nombre->PlaceHolder = ew_RemoveHtml($this->nombre->FldCaption());\n\n\t\t\t// ci\n\t\t\t$this->ci->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->ci->EditCustomAttributes = \"\";\n\t\t\t$this->ci->EditValue = ew_HtmlEncode($this->ci->AdvancedSearch->SearchValue);\n\t\t\t$this->ci->PlaceHolder = ew_RemoveHtml($this->ci->FldCaption());\n\n\t\t\t// fecha_nacimiento\n\t\t\t$this->fecha_nacimiento->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->fecha_nacimiento->EditCustomAttributes = \"\";\n\t\t\t$this->fecha_nacimiento->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->fecha_nacimiento->AdvancedSearch->SearchValue, 0), 8));\n\t\t\t$this->fecha_nacimiento->PlaceHolder = ew_RemoveHtml($this->fecha_nacimiento->FldCaption());\n\n\t\t\t// dias\n\t\t\t$this->dias->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->dias->EditCustomAttributes = \"\";\n\t\t\t$this->dias->EditValue = ew_HtmlEncode($this->dias->AdvancedSearch->SearchValue);\n\t\t\t$this->dias->PlaceHolder = ew_RemoveHtml($this->dias->FldCaption());\n\n\t\t\t// semanas\n\t\t\t$this->semanas->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->semanas->EditCustomAttributes = \"\";\n\t\t\t$this->semanas->EditValue = ew_HtmlEncode($this->semanas->AdvancedSearch->SearchValue);\n\t\t\t$this->semanas->PlaceHolder = ew_RemoveHtml($this->semanas->FldCaption());\n\n\t\t\t// meses\n\t\t\t$this->meses->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->meses->EditCustomAttributes = \"\";\n\t\t\t$this->meses->EditValue = ew_HtmlEncode($this->meses->AdvancedSearch->SearchValue);\n\t\t\t$this->meses->PlaceHolder = ew_RemoveHtml($this->meses->FldCaption());\n\n\t\t\t// sexo\n\t\t\t$this->sexo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->sexo->EditCustomAttributes = \"\";\n\t\t\t$this->sexo->EditValue = $this->sexo->Options(TRUE);\n\n\t\t\t// discapacidad\n\t\t\t$this->discapacidad->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->discapacidad->EditCustomAttributes = \"\";\n\t\t\t$this->discapacidad->EditValue = ew_HtmlEncode($this->discapacidad->AdvancedSearch->SearchValue);\n\t\t\tif (strval($this->discapacidad->AdvancedSearch->SearchValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->discapacidad->AdvancedSearch->SearchValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `discapacidad`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->discapacidad->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->discapacidad, $sWhereWrk); // Call Lookup Selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\n\t\t\t\t\t$this->discapacidad->EditValue = $this->discapacidad->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->discapacidad->EditValue = ew_HtmlEncode($this->discapacidad->AdvancedSearch->SearchValue);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->discapacidad->EditValue = NULL;\n\t\t\t}\n\t\t\t$this->discapacidad->PlaceHolder = ew_RemoveHtml($this->discapacidad->FldCaption());\n\n\t\t\t// id_tipodiscapacidad\n\t\t\t$this->id_tipodiscapacidad->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_tipodiscapacidad->EditCustomAttributes = \"\";\n\t\t\t$this->id_tipodiscapacidad->EditValue = ew_HtmlEncode($this->id_tipodiscapacidad->AdvancedSearch->SearchValue);\n\t\t\t$this->id_tipodiscapacidad->PlaceHolder = ew_RemoveHtml($this->id_tipodiscapacidad->FldCaption());\n\n\t\t\t// resultado\n\t\t\t$this->resultado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->resultado->EditCustomAttributes = \"\";\n\t\t\t$this->resultado->EditValue = ew_HtmlEncode($this->resultado->AdvancedSearch->SearchValue);\n\t\t\t$this->resultado->PlaceHolder = ew_RemoveHtml($this->resultado->FldCaption());\n\n\t\t\t// resultadotamizaje\n\t\t\t$this->resultadotamizaje->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->resultadotamizaje->EditCustomAttributes = \"\";\n\t\t\t$this->resultadotamizaje->EditValue = ew_HtmlEncode($this->resultadotamizaje->AdvancedSearch->SearchValue);\n\t\t\t$this->resultadotamizaje->PlaceHolder = ew_RemoveHtml($this->resultadotamizaje->FldCaption());\n\n\t\t\t// tapon\n\t\t\t$this->tapon->EditCustomAttributes = \"\";\n\t\t\t$this->tapon->EditValue = $this->tapon->Options(FALSE);\n\n\t\t\t// tipo\n\t\t\t$this->tipo->EditCustomAttributes = \"\";\n\t\t\t$this->tipo->EditValue = $this->tipo->Options(FALSE);\n\n\t\t\t// repetirprueba\n\t\t\t$this->repetirprueba->EditCustomAttributes = \"\";\n\t\t\t$this->repetirprueba->EditValue = $this->repetirprueba->Options(FALSE);\n\n\t\t\t// observaciones\n\t\t\t$this->observaciones->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->observaciones->EditCustomAttributes = \"\";\n\t\t\t$this->observaciones->EditValue = ew_HtmlEncode($this->observaciones->AdvancedSearch->SearchValue);\n\t\t\t$this->observaciones->PlaceHolder = ew_RemoveHtml($this->observaciones->FldCaption());\n\n\t\t\t// id_apoderado\n\t\t\t$this->id_apoderado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_apoderado->EditCustomAttributes = \"\";\n\t\t\t$this->id_apoderado->EditValue = ew_HtmlEncode($this->id_apoderado->AdvancedSearch->SearchValue);\n\t\t\t$this->id_apoderado->PlaceHolder = ew_RemoveHtml($this->id_apoderado->FldCaption());\n\n\t\t\t// id_referencia\n\t\t\t$this->id_referencia->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_referencia->EditCustomAttributes = \"\";\n\t\t\t$this->id_referencia->EditValue = ew_HtmlEncode($this->id_referencia->AdvancedSearch->SearchValue);\n\t\t\t$this->id_referencia->PlaceHolder = ew_RemoveHtml($this->id_referencia->FldCaption());\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->SetupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->ViewUrl = $this->GetViewUrl();\r\n\t\t$this->EditUrl = $this->GetEditUrl();\r\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\r\n\t\t$this->CopyUrl = $this->GetCopyUrl();\r\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\r\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Id_Proveedor\r\n\t\t// RazonSocial\r\n\t\t// RFC\r\n\t\t// NombreContacto\r\n\t\t// CalleYNumero\r\n\t\t// Colonia\r\n\t\t// Poblacion\r\n\t\t// Municipio_Delegacion\r\n\t\t// Id_Estado\r\n\t\t// CP\r\n\t\t// EMail\r\n\t\t// Telefonos\r\n\t\t// Celular\r\n\t\t// Fax\r\n\t\t// Banco\r\n\t\t// NumCuenta\r\n\t\t// CLABE\r\n\t\t// Maneja_Papeleta\r\n\t\t// Observaciones\r\n\t\t// Maneja_Activacion_Movi\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// RazonSocial\r\n\t\t\t$this->RazonSocial->ViewValue = $this->RazonSocial->CurrentValue;\r\n\t\t\t$this->RazonSocial->ViewValue = strtoupper($this->RazonSocial->ViewValue);\r\n\t\t\t$this->RazonSocial->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// NombreContacto\r\n\t\t\t$this->NombreContacto->ViewValue = $this->NombreContacto->CurrentValue;\r\n\t\t\t$this->NombreContacto->ViewValue = strtoupper($this->NombreContacto->ViewValue);\r\n\t\t\t$this->NombreContacto->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Poblacion\r\n\t\t\t$this->Poblacion->ViewValue = $this->Poblacion->CurrentValue;\r\n\t\t\t$this->Poblacion->ViewValue = strtoupper($this->Poblacion->ViewValue);\r\n\t\t\t$this->Poblacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Id_Estado\r\n\t\t\tif (strval($this->Id_Estado->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id_estado`\" . ew_SearchString(\"=\", $this->Id_Estado->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id_estado`, `Estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `li_estados`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Estado` Asc\";\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Id_Estado->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Id_Estado->ViewValue = $this->Id_Estado->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Estado->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Id_Estado->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Telefonos\r\n\t\t\t$this->Telefonos->ViewValue = $this->Telefonos->CurrentValue;\r\n\t\t\t$this->Telefonos->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Celular\r\n\t\t\t$this->Celular->ViewValue = $this->Celular->CurrentValue;\r\n\t\t\t$this->Celular->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Maneja_Papeleta\r\n\t\t\tif (strval($this->Maneja_Papeleta->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Maneja_Papeleta->CurrentValue) {\r\n\t\t\t\t\tcase $this->Maneja_Papeleta->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Maneja_Papeleta->ViewValue = $this->Maneja_Papeleta->FldTagCaption(1) <> \"\" ? $this->Maneja_Papeleta->FldTagCaption(1) : $this->Maneja_Papeleta->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Maneja_Papeleta->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Maneja_Papeleta->ViewValue = $this->Maneja_Papeleta->FldTagCaption(2) <> \"\" ? $this->Maneja_Papeleta->FldTagCaption(2) : $this->Maneja_Papeleta->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Maneja_Papeleta->ViewValue = $this->Maneja_Papeleta->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Maneja_Papeleta->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Maneja_Papeleta->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Maneja_Activacion_Movi\r\n\t\t\tif (strval($this->Maneja_Activacion_Movi->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Maneja_Activacion_Movi->CurrentValue) {\r\n\t\t\t\t\tcase $this->Maneja_Activacion_Movi->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Maneja_Activacion_Movi->ViewValue = $this->Maneja_Activacion_Movi->FldTagCaption(1) <> \"\" ? $this->Maneja_Activacion_Movi->FldTagCaption(1) : $this->Maneja_Activacion_Movi->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Maneja_Activacion_Movi->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Maneja_Activacion_Movi->ViewValue = $this->Maneja_Activacion_Movi->FldTagCaption(2) <> \"\" ? $this->Maneja_Activacion_Movi->FldTagCaption(2) : $this->Maneja_Activacion_Movi->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Maneja_Activacion_Movi->ViewValue = $this->Maneja_Activacion_Movi->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Maneja_Activacion_Movi->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Maneja_Activacion_Movi->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// RazonSocial\r\n\t\t\t$this->RazonSocial->LinkCustomAttributes = \"\";\r\n\t\t\t$this->RazonSocial->HrefValue = \"\";\r\n\t\t\t$this->RazonSocial->TooltipValue = \"\";\r\n\r\n\t\t\t// NombreContacto\r\n\t\t\t$this->NombreContacto->LinkCustomAttributes = \"\";\r\n\t\t\t$this->NombreContacto->HrefValue = \"\";\r\n\t\t\t$this->NombreContacto->TooltipValue = \"\";\r\n\r\n\t\t\t// Poblacion\r\n\t\t\t$this->Poblacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Poblacion->HrefValue = \"\";\r\n\t\t\t$this->Poblacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Estado\r\n\t\t\t$this->Id_Estado->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Estado->HrefValue = \"\";\r\n\t\t\t$this->Id_Estado->TooltipValue = \"\";\r\n\r\n\t\t\t// Telefonos\r\n\t\t\t$this->Telefonos->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Telefonos->HrefValue = \"\";\r\n\t\t\t$this->Telefonos->TooltipValue = \"\";\r\n\r\n\t\t\t// Celular\r\n\t\t\t$this->Celular->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Celular->HrefValue = \"\";\r\n\t\t\t$this->Celular->TooltipValue = \"\";\r\n\r\n\t\t\t// Maneja_Papeleta\r\n\t\t\t$this->Maneja_Papeleta->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Maneja_Papeleta->HrefValue = \"\";\r\n\t\t\t$this->Maneja_Papeleta->TooltipValue = \"\";\r\n\r\n\t\t\t// Maneja_Activacion_Movi\r\n\t\t\t$this->Maneja_Activacion_Movi->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Maneja_Activacion_Movi->HrefValue = \"\";\r\n\t\t\t$this->Maneja_Activacion_Movi->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// detail_jenis_spp\n\t\t// id_jenis_spp\n\t\t// status_spp\n\t\t// no_spp\n\t\t// tgl_spp\n\t\t// keterangan\n\t\t// jumlah_up\n\t\t// bendahara\n\t\t// nama_pptk\n\t\t// nip_pptk\n\t\t// kode_program\n\t\t// kode_kegiatan\n\t\t// kode_sub_kegiatan\n\t\t// tahun_anggaran\n\t\t// jumlah_spd\n\t\t// nomer_dasar_spd\n\t\t// tanggal_spd\n\t\t// id_spd\n\t\t// kode_rekening\n\t\t// nama_bendahara\n\t\t// nip_bendahara\n\t\t// no_spm\n\t\t// tgl_spm\n\t\t// status_spm\n\t\t// nama_bank\n\t\t// nomer_rekening_bank\n\t\t// npwp\n\t\t// pimpinan_blud\n\t\t// nip_pimpinan\n\t\t// no_sptb\n\t\t// tgl_sptb\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// detail_jenis_spp\n\t\tif (strval($this->detail_jenis_spp->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->detail_jenis_spp->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `detail_jenis_spp` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_jenis_detail_spp`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->detail_jenis_spp->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->detail_jenis_spp, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->detail_jenis_spp->ViewValue = $this->detail_jenis_spp->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->detail_jenis_spp->ViewValue = $this->detail_jenis_spp->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->detail_jenis_spp->ViewValue = NULL;\n\t\t}\n\t\t$this->detail_jenis_spp->ViewCustomAttributes = \"\";\n\n\t\t// id_jenis_spp\n\t\t$this->id_jenis_spp->ViewValue = $this->id_jenis_spp->CurrentValue;\n\t\t$this->id_jenis_spp->ViewCustomAttributes = \"\";\n\n\t\t// status_spp\n\t\tif (strval($this->status_spp->CurrentValue) <> \"\") {\n\t\t\t$this->status_spp->ViewValue = $this->status_spp->OptionCaption($this->status_spp->CurrentValue);\n\t\t} else {\n\t\t\t$this->status_spp->ViewValue = NULL;\n\t\t}\n\t\t$this->status_spp->ViewCustomAttributes = \"\";\n\n\t\t// no_spp\n\t\t$this->no_spp->ViewValue = $this->no_spp->CurrentValue;\n\t\t$this->no_spp->ViewCustomAttributes = \"\";\n\n\t\t// tgl_spp\n\t\t$this->tgl_spp->ViewValue = $this->tgl_spp->CurrentValue;\n\t\t$this->tgl_spp->ViewValue = ew_FormatDateTime($this->tgl_spp->ViewValue, 0);\n\t\t$this->tgl_spp->ViewCustomAttributes = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->ViewValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->ViewCustomAttributes = \"\";\n\n\t\t// jumlah_up\n\t\t$this->jumlah_up->ViewValue = $this->jumlah_up->CurrentValue;\n\t\t$this->jumlah_up->ViewCustomAttributes = \"\";\n\n\t\t// bendahara\n\t\t$this->bendahara->ViewValue = $this->bendahara->CurrentValue;\n\t\t$this->bendahara->ViewCustomAttributes = \"\";\n\n\t\t// nama_pptk\n\t\t$this->nama_pptk->ViewValue = $this->nama_pptk->CurrentValue;\n\t\t$this->nama_pptk->ViewCustomAttributes = \"\";\n\n\t\t// nip_pptk\n\t\t$this->nip_pptk->ViewValue = $this->nip_pptk->CurrentValue;\n\t\t$this->nip_pptk->ViewCustomAttributes = \"\";\n\n\t\t// kode_program\n\t\t$this->kode_program->ViewValue = $this->kode_program->CurrentValue;\n\t\t$this->kode_program->ViewCustomAttributes = \"\";\n\n\t\t// kode_kegiatan\n\t\t$this->kode_kegiatan->ViewValue = $this->kode_kegiatan->CurrentValue;\n\t\t$this->kode_kegiatan->ViewCustomAttributes = \"\";\n\n\t\t// kode_sub_kegiatan\n\t\t$this->kode_sub_kegiatan->ViewValue = $this->kode_sub_kegiatan->CurrentValue;\n\t\t$this->kode_sub_kegiatan->ViewCustomAttributes = \"\";\n\n\t\t// tahun_anggaran\n\t\t$this->tahun_anggaran->ViewValue = $this->tahun_anggaran->CurrentValue;\n\t\t$this->tahun_anggaran->ViewCustomAttributes = \"\";\n\n\t\t// jumlah_spd\n\t\t$this->jumlah_spd->ViewValue = $this->jumlah_spd->CurrentValue;\n\t\t$this->jumlah_spd->ViewCustomAttributes = \"\";\n\n\t\t// nomer_dasar_spd\n\t\t$this->nomer_dasar_spd->ViewValue = $this->nomer_dasar_spd->CurrentValue;\n\t\t$this->nomer_dasar_spd->ViewCustomAttributes = \"\";\n\n\t\t// tanggal_spd\n\t\t$this->tanggal_spd->ViewValue = $this->tanggal_spd->CurrentValue;\n\t\t$this->tanggal_spd->ViewValue = ew_FormatDateTime($this->tanggal_spd->ViewValue, 0);\n\t\t$this->tanggal_spd->ViewCustomAttributes = \"\";\n\n\t\t// id_spd\n\t\t$this->id_spd->ViewValue = $this->id_spd->CurrentValue;\n\t\t$this->id_spd->ViewCustomAttributes = \"\";\n\n\t\t// kode_rekening\n\t\t$this->kode_rekening->ViewValue = $this->kode_rekening->CurrentValue;\n\t\t$this->kode_rekening->ViewCustomAttributes = \"\";\n\n\t\t// nama_bendahara\n\t\t$this->nama_bendahara->ViewValue = $this->nama_bendahara->CurrentValue;\n\t\t$this->nama_bendahara->ViewCustomAttributes = \"\";\n\n\t\t// nip_bendahara\n\t\t$this->nip_bendahara->ViewValue = $this->nip_bendahara->CurrentValue;\n\t\t$this->nip_bendahara->ViewCustomAttributes = \"\";\n\n\t\t// no_spm\n\t\t$this->no_spm->ViewValue = $this->no_spm->CurrentValue;\n\t\t$this->no_spm->ViewCustomAttributes = \"\";\n\n\t\t// tgl_spm\n\t\t$this->tgl_spm->ViewValue = $this->tgl_spm->CurrentValue;\n\t\t$this->tgl_spm->ViewValue = ew_FormatDateTime($this->tgl_spm->ViewValue, 7);\n\t\t$this->tgl_spm->ViewCustomAttributes = \"\";\n\n\t\t// status_spm\n\t\tif (strval($this->status_spm->CurrentValue) <> \"\") {\n\t\t\t$this->status_spm->ViewValue = $this->status_spm->OptionCaption($this->status_spm->CurrentValue);\n\t\t} else {\n\t\t\t$this->status_spm->ViewValue = NULL;\n\t\t}\n\t\t$this->status_spm->ViewCustomAttributes = \"\";\n\n\t\t// nama_bank\n\t\tif (strval($this->nama_bank->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`rekening`\" . ew_SearchString(\"=\", $this->nama_bank->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `rekening`, `rekening` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_blud_rs`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->nama_bank->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->nama_bank, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->nama_bank->ViewValue = $this->nama_bank->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->nama_bank->ViewValue = $this->nama_bank->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->nama_bank->ViewValue = NULL;\n\t\t}\n\t\t$this->nama_bank->ViewCustomAttributes = \"\";\n\n\t\t// nomer_rekening_bank\n\t\t$this->nomer_rekening_bank->ViewValue = $this->nomer_rekening_bank->CurrentValue;\n\t\t$this->nomer_rekening_bank->ViewCustomAttributes = \"\";\n\n\t\t// npwp\n\t\t$this->npwp->ViewValue = $this->npwp->CurrentValue;\n\t\t$this->npwp->ViewCustomAttributes = \"\";\n\n\t\t// pimpinan_blud\n\t\t$this->pimpinan_blud->ViewValue = $this->pimpinan_blud->CurrentValue;\n\t\t$this->pimpinan_blud->ViewCustomAttributes = \"\";\n\n\t\t// nip_pimpinan\n\t\t$this->nip_pimpinan->ViewValue = $this->nip_pimpinan->CurrentValue;\n\t\t$this->nip_pimpinan->ViewCustomAttributes = \"\";\n\n\t\t// no_sptb\n\t\t$this->no_sptb->ViewValue = $this->no_sptb->CurrentValue;\n\t\t$this->no_sptb->ViewCustomAttributes = \"\";\n\n\t\t// tgl_sptb\n\t\t$this->tgl_sptb->ViewValue = $this->tgl_sptb->CurrentValue;\n\t\t$this->tgl_sptb->ViewValue = ew_FormatDateTime($this->tgl_sptb->ViewValue, 7);\n\t\t$this->tgl_sptb->ViewCustomAttributes = \"\";\n\n\t\t\t// id\n\t\t\t$this->id->LinkCustomAttributes = \"\";\n\t\t\t$this->id->HrefValue = \"\";\n\t\t\t$this->id->TooltipValue = \"\";\n\n\t\t\t// detail_jenis_spp\n\t\t\t$this->detail_jenis_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->detail_jenis_spp->HrefValue = \"\";\n\t\t\t$this->detail_jenis_spp->TooltipValue = \"\";\n\n\t\t\t// no_spp\n\t\t\t$this->no_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->no_spp->HrefValue = \"\";\n\t\t\t$this->no_spp->TooltipValue = \"\";\n\n\t\t\t// tgl_spp\n\t\t\t$this->tgl_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->tgl_spp->HrefValue = \"\";\n\t\t\t$this->tgl_spp->TooltipValue = \"\";\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t\t$this->keterangan->HrefValue = \"\";\n\t\t\t$this->keterangan->TooltipValue = \"\";\n\n\t\t\t// no_spm\n\t\t\t$this->no_spm->LinkCustomAttributes = \"\";\n\t\t\t$this->no_spm->HrefValue = \"\";\n\t\t\t$this->no_spm->TooltipValue = \"\";\n\n\t\t\t// tgl_spm\n\t\t\t$this->tgl_spm->LinkCustomAttributes = \"\";\n\t\t\t$this->tgl_spm->HrefValue = \"\";\n\t\t\t$this->tgl_spm->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->AddUrl = $this->GetAddUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\t\t$this->ListUrl = $this->GetListUrl();\n\t\t$this->SetupOtherOptions();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// unid\n\t\t// u_id\n\t\t// acl_id\n\t\t// Title\n\t\t// LV\n\t\t// Type\n\t\t// ResetTime\n\t\t// ResetType\n\t\t// CompleteTask\n\t\t// Occupation\n\t\t// Target\n\t\t// Data\n\t\t// Reward_Gold\n\t\t// Reward_Diamonds\n\t\t// Reward_EXP\n\t\t// Reward_Goods\n\t\t// Info\n\t\t// DATETIME\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// unid\n\t\t$this->unid->ViewValue = $this->unid->CurrentValue;\n\t\t$this->unid->ViewCustomAttributes = \"\";\n\n\t\t// u_id\n\t\t$this->u_id->ViewValue = $this->u_id->CurrentValue;\n\t\t$this->u_id->ViewCustomAttributes = \"\";\n\n\t\t// acl_id\n\t\t$this->acl_id->ViewValue = $this->acl_id->CurrentValue;\n\t\t$this->acl_id->ViewCustomAttributes = \"\";\n\n\t\t// Title\n\t\t$this->Title->ViewValue = $this->Title->CurrentValue;\n\t\t$this->Title->ViewCustomAttributes = \"\";\n\n\t\t// LV\n\t\t$this->LV->ViewValue = $this->LV->CurrentValue;\n\t\t$this->LV->ViewCustomAttributes = \"\";\n\n\t\t// Type\n\t\t$this->Type->ViewValue = $this->Type->CurrentValue;\n\t\t$this->Type->ViewCustomAttributes = \"\";\n\n\t\t// ResetTime\n\t\t$this->ResetTime->ViewValue = $this->ResetTime->CurrentValue;\n\t\t$this->ResetTime->ViewCustomAttributes = \"\";\n\n\t\t// ResetType\n\t\t$this->ResetType->ViewValue = $this->ResetType->CurrentValue;\n\t\t$this->ResetType->ViewCustomAttributes = \"\";\n\n\t\t// CompleteTask\n\t\t$this->CompleteTask->ViewValue = $this->CompleteTask->CurrentValue;\n\t\t$this->CompleteTask->ViewCustomAttributes = \"\";\n\n\t\t// Occupation\n\t\t$this->Occupation->ViewValue = $this->Occupation->CurrentValue;\n\t\t$this->Occupation->ViewCustomAttributes = \"\";\n\n\t\t// Target\n\t\t$this->Target->ViewValue = $this->Target->CurrentValue;\n\t\t$this->Target->ViewCustomAttributes = \"\";\n\n\t\t// Data\n\t\t$this->Data->ViewValue = $this->Data->CurrentValue;\n\t\t$this->Data->ViewCustomAttributes = \"\";\n\n\t\t// Reward_Gold\n\t\t$this->Reward_Gold->ViewValue = $this->Reward_Gold->CurrentValue;\n\t\t$this->Reward_Gold->ViewCustomAttributes = \"\";\n\n\t\t// Reward_Diamonds\n\t\t$this->Reward_Diamonds->ViewValue = $this->Reward_Diamonds->CurrentValue;\n\t\t$this->Reward_Diamonds->ViewCustomAttributes = \"\";\n\n\t\t// Reward_EXP\n\t\t$this->Reward_EXP->ViewValue = $this->Reward_EXP->CurrentValue;\n\t\t$this->Reward_EXP->ViewCustomAttributes = \"\";\n\n\t\t// Reward_Goods\n\t\t$this->Reward_Goods->ViewValue = $this->Reward_Goods->CurrentValue;\n\t\t$this->Reward_Goods->ViewCustomAttributes = \"\";\n\n\t\t// Info\n\t\t$this->Info->ViewValue = $this->Info->CurrentValue;\n\t\t$this->Info->ViewCustomAttributes = \"\";\n\n\t\t// DATETIME\n\t\t$this->DATETIME->ViewValue = $this->DATETIME->CurrentValue;\n\t\t$this->DATETIME->ViewValue = ew_FormatDateTime($this->DATETIME->ViewValue, 0);\n\t\t$this->DATETIME->ViewCustomAttributes = \"\";\n\n\t\t\t// unid\n\t\t\t$this->unid->LinkCustomAttributes = \"\";\n\t\t\t$this->unid->HrefValue = \"\";\n\t\t\t$this->unid->TooltipValue = \"\";\n\n\t\t\t// u_id\n\t\t\t$this->u_id->LinkCustomAttributes = \"\";\n\t\t\t$this->u_id->HrefValue = \"\";\n\t\t\t$this->u_id->TooltipValue = \"\";\n\n\t\t\t// acl_id\n\t\t\t$this->acl_id->LinkCustomAttributes = \"\";\n\t\t\t$this->acl_id->HrefValue = \"\";\n\t\t\t$this->acl_id->TooltipValue = \"\";\n\n\t\t\t// Title\n\t\t\t$this->Title->LinkCustomAttributes = \"\";\n\t\t\t$this->Title->HrefValue = \"\";\n\t\t\t$this->Title->TooltipValue = \"\";\n\n\t\t\t// LV\n\t\t\t$this->LV->LinkCustomAttributes = \"\";\n\t\t\t$this->LV->HrefValue = \"\";\n\t\t\t$this->LV->TooltipValue = \"\";\n\n\t\t\t// Type\n\t\t\t$this->Type->LinkCustomAttributes = \"\";\n\t\t\t$this->Type->HrefValue = \"\";\n\t\t\t$this->Type->TooltipValue = \"\";\n\n\t\t\t// ResetTime\n\t\t\t$this->ResetTime->LinkCustomAttributes = \"\";\n\t\t\t$this->ResetTime->HrefValue = \"\";\n\t\t\t$this->ResetTime->TooltipValue = \"\";\n\n\t\t\t// ResetType\n\t\t\t$this->ResetType->LinkCustomAttributes = \"\";\n\t\t\t$this->ResetType->HrefValue = \"\";\n\t\t\t$this->ResetType->TooltipValue = \"\";\n\n\t\t\t// CompleteTask\n\t\t\t$this->CompleteTask->LinkCustomAttributes = \"\";\n\t\t\t$this->CompleteTask->HrefValue = \"\";\n\t\t\t$this->CompleteTask->TooltipValue = \"\";\n\n\t\t\t// Occupation\n\t\t\t$this->Occupation->LinkCustomAttributes = \"\";\n\t\t\t$this->Occupation->HrefValue = \"\";\n\t\t\t$this->Occupation->TooltipValue = \"\";\n\n\t\t\t// Target\n\t\t\t$this->Target->LinkCustomAttributes = \"\";\n\t\t\t$this->Target->HrefValue = \"\";\n\t\t\t$this->Target->TooltipValue = \"\";\n\n\t\t\t// Data\n\t\t\t$this->Data->LinkCustomAttributes = \"\";\n\t\t\t$this->Data->HrefValue = \"\";\n\t\t\t$this->Data->TooltipValue = \"\";\n\n\t\t\t// Reward_Gold\n\t\t\t$this->Reward_Gold->LinkCustomAttributes = \"\";\n\t\t\t$this->Reward_Gold->HrefValue = \"\";\n\t\t\t$this->Reward_Gold->TooltipValue = \"\";\n\n\t\t\t// Reward_Diamonds\n\t\t\t$this->Reward_Diamonds->LinkCustomAttributes = \"\";\n\t\t\t$this->Reward_Diamonds->HrefValue = \"\";\n\t\t\t$this->Reward_Diamonds->TooltipValue = \"\";\n\n\t\t\t// Reward_EXP\n\t\t\t$this->Reward_EXP->LinkCustomAttributes = \"\";\n\t\t\t$this->Reward_EXP->HrefValue = \"\";\n\t\t\t$this->Reward_EXP->TooltipValue = \"\";\n\n\t\t\t// Reward_Goods\n\t\t\t$this->Reward_Goods->LinkCustomAttributes = \"\";\n\t\t\t$this->Reward_Goods->HrefValue = \"\";\n\t\t\t$this->Reward_Goods->TooltipValue = \"\";\n\n\t\t\t// Info\n\t\t\t$this->Info->LinkCustomAttributes = \"\";\n\t\t\t$this->Info->HrefValue = \"\";\n\t\t\t$this->Info->TooltipValue = \"\";\n\n\t\t\t// DATETIME\n\t\t\t$this->DATETIME->LinkCustomAttributes = \"\";\n\t\t\t$this->DATETIME->HrefValue = \"\";\n\t\t\t$this->DATETIME->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// tgl\n\t\t// no_spp\n\t\t// jns_spp\n\t\t// kd_mata\n\t\t// urai\n\t\t// jmlh\n\t\t// jmlh1\n\t\t// jmlh2\n\t\t// jmlh3\n\t\t// jmlh4\n\t\t// nm_perus\n\t\t// alamat\n\t\t// npwp\n\t\t// pimpinan\n\t\t// bank\n\t\t// rek\n\t\t// nospm\n\t\t// tglspm\n\t\t// ppn\n\t\t// ps21\n\t\t// ps22\n\t\t// ps23\n\t\t// ps4\n\t\t// kodespm\n\t\t// nambud\n\t\t// nppk\n\t\t// nipppk\n\t\t// prog\n\t\t// prog1\n\t\t// bayar\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// tgl\n\t\t$this->tgl->ViewValue = $this->tgl->CurrentValue;\n\t\t$this->tgl->ViewValue = ew_FormatDateTime($this->tgl->ViewValue, 0);\n\t\t$this->tgl->ViewCustomAttributes = \"\";\n\n\t\t// no_spp\n\t\t$this->no_spp->ViewValue = $this->no_spp->CurrentValue;\n\t\t$this->no_spp->ViewCustomAttributes = \"\";\n\n\t\t// jns_spp\n\t\t$this->jns_spp->ViewValue = $this->jns_spp->CurrentValue;\n\t\t$this->jns_spp->ViewCustomAttributes = \"\";\n\n\t\t// kd_mata\n\t\t$this->kd_mata->ViewValue = $this->kd_mata->CurrentValue;\n\t\t$this->kd_mata->ViewCustomAttributes = \"\";\n\n\t\t// urai\n\t\t$this->urai->ViewValue = $this->urai->CurrentValue;\n\t\t$this->urai->ViewCustomAttributes = \"\";\n\n\t\t// jmlh\n\t\t$this->jmlh->ViewValue = $this->jmlh->CurrentValue;\n\t\t$this->jmlh->ViewCustomAttributes = \"\";\n\n\t\t// jmlh1\n\t\t$this->jmlh1->ViewValue = $this->jmlh1->CurrentValue;\n\t\t$this->jmlh1->ViewCustomAttributes = \"\";\n\n\t\t// jmlh2\n\t\t$this->jmlh2->ViewValue = $this->jmlh2->CurrentValue;\n\t\t$this->jmlh2->ViewCustomAttributes = \"\";\n\n\t\t// jmlh3\n\t\t$this->jmlh3->ViewValue = $this->jmlh3->CurrentValue;\n\t\t$this->jmlh3->ViewCustomAttributes = \"\";\n\n\t\t// jmlh4\n\t\t$this->jmlh4->ViewValue = $this->jmlh4->CurrentValue;\n\t\t$this->jmlh4->ViewCustomAttributes = \"\";\n\n\t\t// nm_perus\n\t\t$this->nm_perus->ViewValue = $this->nm_perus->CurrentValue;\n\t\t$this->nm_perus->ViewCustomAttributes = \"\";\n\n\t\t// alamat\n\t\t$this->alamat->ViewValue = $this->alamat->CurrentValue;\n\t\t$this->alamat->ViewCustomAttributes = \"\";\n\n\t\t// npwp\n\t\t$this->npwp->ViewValue = $this->npwp->CurrentValue;\n\t\t$this->npwp->ViewCustomAttributes = \"\";\n\n\t\t// pimpinan\n\t\t$this->pimpinan->ViewValue = $this->pimpinan->CurrentValue;\n\t\t$this->pimpinan->ViewCustomAttributes = \"\";\n\n\t\t// bank\n\t\t$this->bank->ViewValue = $this->bank->CurrentValue;\n\t\t$this->bank->ViewCustomAttributes = \"\";\n\n\t\t// rek\n\t\t$this->rek->ViewValue = $this->rek->CurrentValue;\n\t\t$this->rek->ViewCustomAttributes = \"\";\n\n\t\t// nospm\n\t\t$this->nospm->ViewValue = $this->nospm->CurrentValue;\n\t\t$this->nospm->ViewCustomAttributes = \"\";\n\n\t\t// tglspm\n\t\t$this->tglspm->ViewValue = $this->tglspm->CurrentValue;\n\t\t$this->tglspm->ViewValue = ew_FormatDateTime($this->tglspm->ViewValue, 0);\n\t\t$this->tglspm->ViewCustomAttributes = \"\";\n\n\t\t// ppn\n\t\t$this->ppn->ViewValue = $this->ppn->CurrentValue;\n\t\t$this->ppn->ViewCustomAttributes = \"\";\n\n\t\t// ps21\n\t\t$this->ps21->ViewValue = $this->ps21->CurrentValue;\n\t\t$this->ps21->ViewCustomAttributes = \"\";\n\n\t\t// ps22\n\t\t$this->ps22->ViewValue = $this->ps22->CurrentValue;\n\t\t$this->ps22->ViewCustomAttributes = \"\";\n\n\t\t// ps23\n\t\t$this->ps23->ViewValue = $this->ps23->CurrentValue;\n\t\t$this->ps23->ViewCustomAttributes = \"\";\n\n\t\t// ps4\n\t\t$this->ps4->ViewValue = $this->ps4->CurrentValue;\n\t\t$this->ps4->ViewCustomAttributes = \"\";\n\n\t\t// kodespm\n\t\t$this->kodespm->ViewValue = $this->kodespm->CurrentValue;\n\t\t$this->kodespm->ViewCustomAttributes = \"\";\n\n\t\t// nambud\n\t\t$this->nambud->ViewValue = $this->nambud->CurrentValue;\n\t\t$this->nambud->ViewCustomAttributes = \"\";\n\n\t\t// nppk\n\t\t$this->nppk->ViewValue = $this->nppk->CurrentValue;\n\t\t$this->nppk->ViewCustomAttributes = \"\";\n\n\t\t// nipppk\n\t\t$this->nipppk->ViewValue = $this->nipppk->CurrentValue;\n\t\t$this->nipppk->ViewCustomAttributes = \"\";\n\n\t\t// prog\n\t\t$this->prog->ViewValue = $this->prog->CurrentValue;\n\t\t$this->prog->ViewCustomAttributes = \"\";\n\n\t\t// prog1\n\t\t$this->prog1->ViewValue = $this->prog1->CurrentValue;\n\t\t$this->prog1->ViewCustomAttributes = \"\";\n\n\t\t// bayar\n\t\t$this->bayar->ViewValue = $this->bayar->CurrentValue;\n\t\t$this->bayar->ViewCustomAttributes = \"\";\n\n\t\t\t// tgl\n\t\t\t$this->tgl->LinkCustomAttributes = \"\";\n\t\t\t$this->tgl->HrefValue = \"\";\n\t\t\t$this->tgl->TooltipValue = \"\";\n\n\t\t\t// no_spp\n\t\t\t$this->no_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->no_spp->HrefValue = \"\";\n\t\t\t$this->no_spp->TooltipValue = \"\";\n\n\t\t\t// jns_spp\n\t\t\t$this->jns_spp->LinkCustomAttributes = \"\";\n\t\t\t$this->jns_spp->HrefValue = \"\";\n\t\t\t$this->jns_spp->TooltipValue = \"\";\n\n\t\t\t// kd_mata\n\t\t\t$this->kd_mata->LinkCustomAttributes = \"\";\n\t\t\t$this->kd_mata->HrefValue = \"\";\n\t\t\t$this->kd_mata->TooltipValue = \"\";\n\n\t\t\t// urai\n\t\t\t$this->urai->LinkCustomAttributes = \"\";\n\t\t\t$this->urai->HrefValue = \"\";\n\t\t\t$this->urai->TooltipValue = \"\";\n\n\t\t\t// jmlh\n\t\t\t$this->jmlh->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh->HrefValue = \"\";\n\t\t\t$this->jmlh->TooltipValue = \"\";\n\n\t\t\t// jmlh1\n\t\t\t$this->jmlh1->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh1->HrefValue = \"\";\n\t\t\t$this->jmlh1->TooltipValue = \"\";\n\n\t\t\t// jmlh2\n\t\t\t$this->jmlh2->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh2->HrefValue = \"\";\n\t\t\t$this->jmlh2->TooltipValue = \"\";\n\n\t\t\t// jmlh3\n\t\t\t$this->jmlh3->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh3->HrefValue = \"\";\n\t\t\t$this->jmlh3->TooltipValue = \"\";\n\n\t\t\t// jmlh4\n\t\t\t$this->jmlh4->LinkCustomAttributes = \"\";\n\t\t\t$this->jmlh4->HrefValue = \"\";\n\t\t\t$this->jmlh4->TooltipValue = \"\";\n\n\t\t\t// nm_perus\n\t\t\t$this->nm_perus->LinkCustomAttributes = \"\";\n\t\t\t$this->nm_perus->HrefValue = \"\";\n\t\t\t$this->nm_perus->TooltipValue = \"\";\n\n\t\t\t// alamat\n\t\t\t$this->alamat->LinkCustomAttributes = \"\";\n\t\t\t$this->alamat->HrefValue = \"\";\n\t\t\t$this->alamat->TooltipValue = \"\";\n\n\t\t\t// npwp\n\t\t\t$this->npwp->LinkCustomAttributes = \"\";\n\t\t\t$this->npwp->HrefValue = \"\";\n\t\t\t$this->npwp->TooltipValue = \"\";\n\n\t\t\t// pimpinan\n\t\t\t$this->pimpinan->LinkCustomAttributes = \"\";\n\t\t\t$this->pimpinan->HrefValue = \"\";\n\t\t\t$this->pimpinan->TooltipValue = \"\";\n\n\t\t\t// bank\n\t\t\t$this->bank->LinkCustomAttributes = \"\";\n\t\t\t$this->bank->HrefValue = \"\";\n\t\t\t$this->bank->TooltipValue = \"\";\n\n\t\t\t// rek\n\t\t\t$this->rek->LinkCustomAttributes = \"\";\n\t\t\t$this->rek->HrefValue = \"\";\n\t\t\t$this->rek->TooltipValue = \"\";\n\n\t\t\t// nospm\n\t\t\t$this->nospm->LinkCustomAttributes = \"\";\n\t\t\t$this->nospm->HrefValue = \"\";\n\t\t\t$this->nospm->TooltipValue = \"\";\n\n\t\t\t// tglspm\n\t\t\t$this->tglspm->LinkCustomAttributes = \"\";\n\t\t\t$this->tglspm->HrefValue = \"\";\n\t\t\t$this->tglspm->TooltipValue = \"\";\n\n\t\t\t// ppn\n\t\t\t$this->ppn->LinkCustomAttributes = \"\";\n\t\t\t$this->ppn->HrefValue = \"\";\n\t\t\t$this->ppn->TooltipValue = \"\";\n\n\t\t\t// ps21\n\t\t\t$this->ps21->LinkCustomAttributes = \"\";\n\t\t\t$this->ps21->HrefValue = \"\";\n\t\t\t$this->ps21->TooltipValue = \"\";\n\n\t\t\t// ps22\n\t\t\t$this->ps22->LinkCustomAttributes = \"\";\n\t\t\t$this->ps22->HrefValue = \"\";\n\t\t\t$this->ps22->TooltipValue = \"\";\n\n\t\t\t// ps23\n\t\t\t$this->ps23->LinkCustomAttributes = \"\";\n\t\t\t$this->ps23->HrefValue = \"\";\n\t\t\t$this->ps23->TooltipValue = \"\";\n\n\t\t\t// ps4\n\t\t\t$this->ps4->LinkCustomAttributes = \"\";\n\t\t\t$this->ps4->HrefValue = \"\";\n\t\t\t$this->ps4->TooltipValue = \"\";\n\n\t\t\t// kodespm\n\t\t\t$this->kodespm->LinkCustomAttributes = \"\";\n\t\t\t$this->kodespm->HrefValue = \"\";\n\t\t\t$this->kodespm->TooltipValue = \"\";\n\n\t\t\t// nambud\n\t\t\t$this->nambud->LinkCustomAttributes = \"\";\n\t\t\t$this->nambud->HrefValue = \"\";\n\t\t\t$this->nambud->TooltipValue = \"\";\n\n\t\t\t// nppk\n\t\t\t$this->nppk->LinkCustomAttributes = \"\";\n\t\t\t$this->nppk->HrefValue = \"\";\n\t\t\t$this->nppk->TooltipValue = \"\";\n\n\t\t\t// nipppk\n\t\t\t$this->nipppk->LinkCustomAttributes = \"\";\n\t\t\t$this->nipppk->HrefValue = \"\";\n\t\t\t$this->nipppk->TooltipValue = \"\";\n\n\t\t\t// prog\n\t\t\t$this->prog->LinkCustomAttributes = \"\";\n\t\t\t$this->prog->HrefValue = \"\";\n\t\t\t$this->prog->TooltipValue = \"\";\n\n\t\t\t// prog1\n\t\t\t$this->prog1->LinkCustomAttributes = \"\";\n\t\t\t$this->prog1->HrefValue = \"\";\n\t\t\t$this->prog1->TooltipValue = \"\";\n\n\t\t\t// bayar\n\t\t\t$this->bayar->LinkCustomAttributes = \"\";\n\t\t\t$this->bayar->HrefValue = \"\";\n\t\t\t$this->bayar->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// idservicio_medico_prestado\n\t\t// idcuenta\n\t\t// fecha_inicio\n\t\t// fecha_final\n\t\t// estado\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// idservicio_medico_prestado\n\t\t\t$this->idservicio_medico_prestado->ViewValue = $this->idservicio_medico_prestado->CurrentValue;\n\t\t\t$this->idservicio_medico_prestado->ViewCustomAttributes = \"\";\n\n\t\t\t// idcuenta\n\t\t\t$this->idcuenta->ViewValue = $this->idcuenta->CurrentValue;\n\t\t\t$this->idcuenta->ViewCustomAttributes = \"\";\n\n\t\t\t// fecha_inicio\n\t\t\t$this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;\n\t\t\t$this->fecha_inicio->ViewCustomAttributes = \"\";\n\n\t\t\t// fecha_final\n\t\t\t$this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;\n\t\t\t$this->fecha_final->ViewCustomAttributes = \"\";\n\n\t\t\t// estado\n\t\t\tif (strval($this->estado->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($this->estado->CurrentValue) {\n\t\t\t\t\tcase $this->estado->FldTagValue(1):\n\t\t\t\t\t\t$this->estado->ViewValue = $this->estado->FldTagCaption(1) <> \"\" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->estado->FldTagValue(2):\n\t\t\t\t\t\t$this->estado->ViewValue = $this->estado->FldTagCaption(2) <> \"\" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->estado->FldTagValue(3):\n\t\t\t\t\t\t$this->estado->ViewValue = $this->estado->FldTagCaption(3) <> \"\" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->estado->ViewValue = $this->estado->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->estado->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->estado->ViewCustomAttributes = \"\";\n\n\t\t\t// idservicio_medico_prestado\n\t\t\t$this->idservicio_medico_prestado->LinkCustomAttributes = \"\";\n\t\t\t$this->idservicio_medico_prestado->HrefValue = \"\";\n\t\t\t$this->idservicio_medico_prestado->TooltipValue = \"\";\n\n\t\t\t// idcuenta\n\t\t\t$this->idcuenta->LinkCustomAttributes = \"\";\n\t\t\t$this->idcuenta->HrefValue = \"\";\n\t\t\t$this->idcuenta->TooltipValue = \"\";\n\n\t\t\t// fecha_inicio\n\t\t\t$this->fecha_inicio->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_inicio->HrefValue = \"\";\n\t\t\t$this->fecha_inicio->TooltipValue = \"\";\n\n\t\t\t// fecha_final\n\t\t\t$this->fecha_final->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_final->HrefValue = \"\";\n\t\t\t$this->fecha_final->TooltipValue = \"\";\n\n\t\t\t// estado\n\t\t\t$this->estado->LinkCustomAttributes = \"\";\n\t\t\t$this->estado->HrefValue = \"\";\n\t\t\t$this->estado->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->AddUrl = $this->GetAddUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\t\t$this->ListUrl = $this->GetListUrl();\n\t\t$this->SetupOtherOptions();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// unid\n\t\t// u_id\n\t\t// acl_id\n\t\t// Name\n\t\t// Basics\n\t\t// HP\n\t\t// MP\n\t\t// AD\n\t\t// AP\n\t\t// Defense\n\t\t// Hit\n\t\t// Dodge\n\t\t// Crit\n\t\t// AbsorbHP\n\t\t// ADPTV\n\t\t// ADPTR\n\t\t// APPTR\n\t\t// APPTV\n\t\t// ImmuneDamage\n\t\t// Intro\n\t\t// ExclusiveSkills\n\t\t// TransferDemand\n\t\t// TransferLevel\n\t\t// FormerOccupation\n\t\t// Belong\n\t\t// AttackEffect\n\t\t// AttackTips\n\t\t// MagicResistance\n\t\t// IgnoreShield\n\t\t// DATETIME\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// unid\n\t\t$this->unid->ViewValue = $this->unid->CurrentValue;\n\t\t$this->unid->ViewCustomAttributes = \"\";\n\n\t\t// u_id\n\t\t$this->u_id->ViewValue = $this->u_id->CurrentValue;\n\t\t$this->u_id->ViewCustomAttributes = \"\";\n\n\t\t// acl_id\n\t\t$this->acl_id->ViewValue = $this->acl_id->CurrentValue;\n\t\t$this->acl_id->ViewCustomAttributes = \"\";\n\n\t\t// Name\n\t\t$this->Name->ViewValue = $this->Name->CurrentValue;\n\t\t$this->Name->ViewCustomAttributes = \"\";\n\n\t\t// Basics\n\t\t$this->Basics->ViewValue = $this->Basics->CurrentValue;\n\t\t$this->Basics->ViewCustomAttributes = \"\";\n\n\t\t// HP\n\t\t$this->HP->ViewValue = $this->HP->CurrentValue;\n\t\t$this->HP->ViewCustomAttributes = \"\";\n\n\t\t// MP\n\t\t$this->MP->ViewValue = $this->MP->CurrentValue;\n\t\t$this->MP->ViewCustomAttributes = \"\";\n\n\t\t// AD\n\t\t$this->AD->ViewValue = $this->AD->CurrentValue;\n\t\t$this->AD->ViewCustomAttributes = \"\";\n\n\t\t// AP\n\t\t$this->AP->ViewValue = $this->AP->CurrentValue;\n\t\t$this->AP->ViewCustomAttributes = \"\";\n\n\t\t// Defense\n\t\t$this->Defense->ViewValue = $this->Defense->CurrentValue;\n\t\t$this->Defense->ViewCustomAttributes = \"\";\n\n\t\t// Hit\n\t\t$this->Hit->ViewValue = $this->Hit->CurrentValue;\n\t\t$this->Hit->ViewCustomAttributes = \"\";\n\n\t\t// Dodge\n\t\t$this->Dodge->ViewValue = $this->Dodge->CurrentValue;\n\t\t$this->Dodge->ViewCustomAttributes = \"\";\n\n\t\t// Crit\n\t\t$this->Crit->ViewValue = $this->Crit->CurrentValue;\n\t\t$this->Crit->ViewCustomAttributes = \"\";\n\n\t\t// AbsorbHP\n\t\t$this->AbsorbHP->ViewValue = $this->AbsorbHP->CurrentValue;\n\t\t$this->AbsorbHP->ViewCustomAttributes = \"\";\n\n\t\t// ADPTV\n\t\t$this->ADPTV->ViewValue = $this->ADPTV->CurrentValue;\n\t\t$this->ADPTV->ViewCustomAttributes = \"\";\n\n\t\t// ADPTR\n\t\t$this->ADPTR->ViewValue = $this->ADPTR->CurrentValue;\n\t\t$this->ADPTR->ViewCustomAttributes = \"\";\n\n\t\t// APPTR\n\t\t$this->APPTR->ViewValue = $this->APPTR->CurrentValue;\n\t\t$this->APPTR->ViewCustomAttributes = \"\";\n\n\t\t// APPTV\n\t\t$this->APPTV->ViewValue = $this->APPTV->CurrentValue;\n\t\t$this->APPTV->ViewCustomAttributes = \"\";\n\n\t\t// ImmuneDamage\n\t\t$this->ImmuneDamage->ViewValue = $this->ImmuneDamage->CurrentValue;\n\t\t$this->ImmuneDamage->ViewCustomAttributes = \"\";\n\n\t\t// Intro\n\t\t$this->Intro->ViewValue = $this->Intro->CurrentValue;\n\t\t$this->Intro->ViewCustomAttributes = \"\";\n\n\t\t// ExclusiveSkills\n\t\t$this->ExclusiveSkills->ViewValue = $this->ExclusiveSkills->CurrentValue;\n\t\t$this->ExclusiveSkills->ViewCustomAttributes = \"\";\n\n\t\t// TransferDemand\n\t\t$this->TransferDemand->ViewValue = $this->TransferDemand->CurrentValue;\n\t\t$this->TransferDemand->ViewCustomAttributes = \"\";\n\n\t\t// TransferLevel\n\t\t$this->TransferLevel->ViewValue = $this->TransferLevel->CurrentValue;\n\t\t$this->TransferLevel->ViewCustomAttributes = \"\";\n\n\t\t// FormerOccupation\n\t\t$this->FormerOccupation->ViewValue = $this->FormerOccupation->CurrentValue;\n\t\t$this->FormerOccupation->ViewCustomAttributes = \"\";\n\n\t\t// Belong\n\t\t$this->Belong->ViewValue = $this->Belong->CurrentValue;\n\t\t$this->Belong->ViewCustomAttributes = \"\";\n\n\t\t// AttackEffect\n\t\t$this->AttackEffect->ViewValue = $this->AttackEffect->CurrentValue;\n\t\t$this->AttackEffect->ViewCustomAttributes = \"\";\n\n\t\t// AttackTips\n\t\t$this->AttackTips->ViewValue = $this->AttackTips->CurrentValue;\n\t\t$this->AttackTips->ViewCustomAttributes = \"\";\n\n\t\t// MagicResistance\n\t\t$this->MagicResistance->ViewValue = $this->MagicResistance->CurrentValue;\n\t\t$this->MagicResistance->ViewCustomAttributes = \"\";\n\n\t\t// IgnoreShield\n\t\t$this->IgnoreShield->ViewValue = $this->IgnoreShield->CurrentValue;\n\t\t$this->IgnoreShield->ViewCustomAttributes = \"\";\n\n\t\t// DATETIME\n\t\t$this->DATETIME->ViewValue = $this->DATETIME->CurrentValue;\n\t\t$this->DATETIME->ViewValue = ew_FormatDateTime($this->DATETIME->ViewValue, 0);\n\t\t$this->DATETIME->ViewCustomAttributes = \"\";\n\n\t\t\t// unid\n\t\t\t$this->unid->LinkCustomAttributes = \"\";\n\t\t\t$this->unid->HrefValue = \"\";\n\t\t\t$this->unid->TooltipValue = \"\";\n\n\t\t\t// u_id\n\t\t\t$this->u_id->LinkCustomAttributes = \"\";\n\t\t\t$this->u_id->HrefValue = \"\";\n\t\t\t$this->u_id->TooltipValue = \"\";\n\n\t\t\t// acl_id\n\t\t\t$this->acl_id->LinkCustomAttributes = \"\";\n\t\t\t$this->acl_id->HrefValue = \"\";\n\t\t\t$this->acl_id->TooltipValue = \"\";\n\n\t\t\t// Name\n\t\t\t$this->Name->LinkCustomAttributes = \"\";\n\t\t\t$this->Name->HrefValue = \"\";\n\t\t\t$this->Name->TooltipValue = \"\";\n\n\t\t\t// Basics\n\t\t\t$this->Basics->LinkCustomAttributes = \"\";\n\t\t\t$this->Basics->HrefValue = \"\";\n\t\t\t$this->Basics->TooltipValue = \"\";\n\n\t\t\t// HP\n\t\t\t$this->HP->LinkCustomAttributes = \"\";\n\t\t\t$this->HP->HrefValue = \"\";\n\t\t\t$this->HP->TooltipValue = \"\";\n\n\t\t\t// MP\n\t\t\t$this->MP->LinkCustomAttributes = \"\";\n\t\t\t$this->MP->HrefValue = \"\";\n\t\t\t$this->MP->TooltipValue = \"\";\n\n\t\t\t// AD\n\t\t\t$this->AD->LinkCustomAttributes = \"\";\n\t\t\t$this->AD->HrefValue = \"\";\n\t\t\t$this->AD->TooltipValue = \"\";\n\n\t\t\t// AP\n\t\t\t$this->AP->LinkCustomAttributes = \"\";\n\t\t\t$this->AP->HrefValue = \"\";\n\t\t\t$this->AP->TooltipValue = \"\";\n\n\t\t\t// Defense\n\t\t\t$this->Defense->LinkCustomAttributes = \"\";\n\t\t\t$this->Defense->HrefValue = \"\";\n\t\t\t$this->Defense->TooltipValue = \"\";\n\n\t\t\t// Hit\n\t\t\t$this->Hit->LinkCustomAttributes = \"\";\n\t\t\t$this->Hit->HrefValue = \"\";\n\t\t\t$this->Hit->TooltipValue = \"\";\n\n\t\t\t// Dodge\n\t\t\t$this->Dodge->LinkCustomAttributes = \"\";\n\t\t\t$this->Dodge->HrefValue = \"\";\n\t\t\t$this->Dodge->TooltipValue = \"\";\n\n\t\t\t// Crit\n\t\t\t$this->Crit->LinkCustomAttributes = \"\";\n\t\t\t$this->Crit->HrefValue = \"\";\n\t\t\t$this->Crit->TooltipValue = \"\";\n\n\t\t\t// AbsorbHP\n\t\t\t$this->AbsorbHP->LinkCustomAttributes = \"\";\n\t\t\t$this->AbsorbHP->HrefValue = \"\";\n\t\t\t$this->AbsorbHP->TooltipValue = \"\";\n\n\t\t\t// ADPTV\n\t\t\t$this->ADPTV->LinkCustomAttributes = \"\";\n\t\t\t$this->ADPTV->HrefValue = \"\";\n\t\t\t$this->ADPTV->TooltipValue = \"\";\n\n\t\t\t// ADPTR\n\t\t\t$this->ADPTR->LinkCustomAttributes = \"\";\n\t\t\t$this->ADPTR->HrefValue = \"\";\n\t\t\t$this->ADPTR->TooltipValue = \"\";\n\n\t\t\t// APPTR\n\t\t\t$this->APPTR->LinkCustomAttributes = \"\";\n\t\t\t$this->APPTR->HrefValue = \"\";\n\t\t\t$this->APPTR->TooltipValue = \"\";\n\n\t\t\t// APPTV\n\t\t\t$this->APPTV->LinkCustomAttributes = \"\";\n\t\t\t$this->APPTV->HrefValue = \"\";\n\t\t\t$this->APPTV->TooltipValue = \"\";\n\n\t\t\t// ImmuneDamage\n\t\t\t$this->ImmuneDamage->LinkCustomAttributes = \"\";\n\t\t\t$this->ImmuneDamage->HrefValue = \"\";\n\t\t\t$this->ImmuneDamage->TooltipValue = \"\";\n\n\t\t\t// Intro\n\t\t\t$this->Intro->LinkCustomAttributes = \"\";\n\t\t\t$this->Intro->HrefValue = \"\";\n\t\t\t$this->Intro->TooltipValue = \"\";\n\n\t\t\t// ExclusiveSkills\n\t\t\t$this->ExclusiveSkills->LinkCustomAttributes = \"\";\n\t\t\t$this->ExclusiveSkills->HrefValue = \"\";\n\t\t\t$this->ExclusiveSkills->TooltipValue = \"\";\n\n\t\t\t// TransferDemand\n\t\t\t$this->TransferDemand->LinkCustomAttributes = \"\";\n\t\t\t$this->TransferDemand->HrefValue = \"\";\n\t\t\t$this->TransferDemand->TooltipValue = \"\";\n\n\t\t\t// TransferLevel\n\t\t\t$this->TransferLevel->LinkCustomAttributes = \"\";\n\t\t\t$this->TransferLevel->HrefValue = \"\";\n\t\t\t$this->TransferLevel->TooltipValue = \"\";\n\n\t\t\t// FormerOccupation\n\t\t\t$this->FormerOccupation->LinkCustomAttributes = \"\";\n\t\t\t$this->FormerOccupation->HrefValue = \"\";\n\t\t\t$this->FormerOccupation->TooltipValue = \"\";\n\n\t\t\t// Belong\n\t\t\t$this->Belong->LinkCustomAttributes = \"\";\n\t\t\t$this->Belong->HrefValue = \"\";\n\t\t\t$this->Belong->TooltipValue = \"\";\n\n\t\t\t// AttackEffect\n\t\t\t$this->AttackEffect->LinkCustomAttributes = \"\";\n\t\t\t$this->AttackEffect->HrefValue = \"\";\n\t\t\t$this->AttackEffect->TooltipValue = \"\";\n\n\t\t\t// AttackTips\n\t\t\t$this->AttackTips->LinkCustomAttributes = \"\";\n\t\t\t$this->AttackTips->HrefValue = \"\";\n\t\t\t$this->AttackTips->TooltipValue = \"\";\n\n\t\t\t// MagicResistance\n\t\t\t$this->MagicResistance->LinkCustomAttributes = \"\";\n\t\t\t$this->MagicResistance->HrefValue = \"\";\n\t\t\t$this->MagicResistance->TooltipValue = \"\";\n\n\t\t\t// IgnoreShield\n\t\t\t$this->IgnoreShield->LinkCustomAttributes = \"\";\n\t\t\t$this->IgnoreShield->HrefValue = \"\";\n\t\t\t$this->IgnoreShield->TooltipValue = \"\";\n\n\t\t\t// DATETIME\n\t\t\t$this->DATETIME->LinkCustomAttributes = \"\";\n\t\t\t$this->DATETIME->HrefValue = \"\";\n\t\t\t$this->DATETIME->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "public function edit()\n {\n return view('escrow::edit');\n }", "public function getEditCellValue($row);", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\n\t\t$this->id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// nombre_contacto\n\t\t// name\n\t\t// lastname\n\t\t// email\n\t\t// address\n\t\t// phone\n\t\t// cell\n\t\t// is_active\n\n\t\t$this->is_active->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// created_at\n\t\t// id_sucursal\n\t\t// documentos\n\n\t\t$this->documentos->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DateModified\n\t\t$this->DateModified->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DateDeleted\n\t\t$this->DateDeleted->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// CreatedBy\n\t\t$this->CreatedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// ModifiedBy\n\t\t$this->ModifiedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DeletedBy\n\t\t$this->DeletedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// latitud\n\t\t$this->latitud->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// longitud\n\t\t$this->longitud->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipoinmueble\n\t\t// id_ciudad_inmueble\n\t\t// id_provincia_inmueble\n\t\t// imagen_inmueble01\n\n\t\t$this->imagen_inmueble01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble02\n\t\t// imagen_inmueble03\n\t\t// imagen_inmueble04\n\t\t// imagen_inmueble05\n\t\t// imagen_inmueble06\n\n\t\t$this->imagen_inmueble06->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble07\n\t\t$this->imagen_inmueble07->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble08\n\t\t$this->imagen_inmueble08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipovehiculo\n\t\t// id_ciudad_vehiculo\n\t\t// id_provincia_vehiculo\n\t\t// imagen_vehiculo01\n\n\t\t$this->imagen_vehiculo01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo02\n\t\t// imagen_vehiculo03\n\n\t\t$this->imagen_vehiculo03->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo04\n\t\t$this->imagen_vehiculo04->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo05\n\t\t// imagen_vehiculo06\n\t\t// imagen_vehiculo07\n\t\t// imagen_vehiculo08\n\n\t\t$this->imagen_vehiculo08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipomaquinaria\n\t\t// id_ciudad_maquinaria\n\t\t// id_provincia_maquinaria\n\t\t// imagen_maquinaria01\n\n\t\t$this->imagen_maquinaria01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_maquinaria02\n\t\t// imagen_maquinaria03\n\t\t// imagen_maquinaria04\n\n\t\t$this->imagen_maquinaria04->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_maquinaria05\n\t\t// imagen_maquinaria06\n\t\t// imagen_maquinaria07\n\t\t// imagen_maquinaria08\n\n\t\t$this->imagen_maquinaria08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipomercaderia\n\t\t// imagen_mercaderia01\n\t\t// documento_mercaderia\n\t\t// tipoespecial\n\t\t// imagen_tipoespecial01\n\t\t// email_contacto\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// nombre_contacto\n\t\t$this->nombre_contacto->ViewValue = $this->nombre_contacto->CurrentValue;\n\t\t$this->nombre_contacto->ViewCustomAttributes = \"\";\n\n\t\t// name\n\t\t$this->name->ViewValue = $this->name->CurrentValue;\n\t\t$this->name->ViewCustomAttributes = \"\";\n\n\t\t// lastname\n\t\t$this->lastname->ViewValue = $this->lastname->CurrentValue;\n\t\t$this->lastname->ViewCustomAttributes = \"\";\n\n\t\t// email\n\t\t$this->_email->ViewValue = $this->_email->CurrentValue;\n\t\t$this->_email->ViewCustomAttributes = \"\";\n\n\t\t// address\n\t\t$this->address->ViewValue = $this->address->CurrentValue;\n\t\t$this->address->ViewCustomAttributes = \"\";\n\n\t\t// phone\n\t\t$this->phone->ViewValue = $this->phone->CurrentValue;\n\t\t$this->phone->ViewCustomAttributes = \"\";\n\n\t\t// cell\n\t\t$this->cell->ViewValue = $this->cell->CurrentValue;\n\t\t$this->cell->ViewCustomAttributes = \"\";\n\n\t\t// created_at\n\t\t$this->created_at->ViewValue = $this->created_at->CurrentValue;\n\t\t$this->created_at->ViewValue = ew_FormatDateTime($this->created_at->ViewValue, 17);\n\t\t$this->created_at->ViewCustomAttributes = \"\";\n\n\t\t// id_sucursal\n\t\tif (strval($this->id_sucursal->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_sucursal->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sucursal`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_sucursal->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`id`='\".$_SESSION[\"sucursal\"].\"'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_sucursal, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_sucursal->ViewValue = $this->id_sucursal->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_sucursal->ViewValue = $this->id_sucursal->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_sucursal->ViewValue = NULL;\n\t\t}\n\t\t$this->id_sucursal->ViewCustomAttributes = \"\";\n\n\t\t// tipoinmueble\n\t\tif (strval($this->tipoinmueble->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipoinmueble->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipoinmueble->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='INMUEBLE'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipoinmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipoinmueble->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipoinmueble->ViewValue .= $this->tipoinmueble->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipoinmueble->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipoinmueble->ViewValue = $this->tipoinmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipoinmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->tipoinmueble->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_inmueble\n\t\tif (strval($this->id_ciudad_inmueble->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_inmueble->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_inmueble->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_inmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_inmueble->ViewValue = $this->id_ciudad_inmueble->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_inmueble->ViewValue = $this->id_ciudad_inmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_inmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_inmueble->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_inmueble\n\t\tif (strval($this->id_provincia_inmueble->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_inmueble->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_inmueble->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_inmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_inmueble->ViewValue = $this->id_provincia_inmueble->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_inmueble->ViewValue = $this->id_provincia_inmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_inmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_inmueble->ViewCustomAttributes = \"\";\n\n\t\t// tipovehiculo\n\t\tif (strval($this->tipovehiculo->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipovehiculo->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipovehiculo->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='VEHICULO'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipovehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipovehiculo->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipovehiculo->ViewValue .= $this->tipovehiculo->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipovehiculo->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipovehiculo->ViewValue = $this->tipovehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipovehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->tipovehiculo->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_vehiculo\n\t\tif (strval($this->id_ciudad_vehiculo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_vehiculo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_vehiculo->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_vehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_vehiculo->ViewValue = $this->id_ciudad_vehiculo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_vehiculo->ViewValue = $this->id_ciudad_vehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_vehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_vehiculo->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_vehiculo\n\t\tif (strval($this->id_provincia_vehiculo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_vehiculo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_vehiculo->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_vehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_vehiculo->ViewValue = $this->id_provincia_vehiculo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_vehiculo->ViewValue = $this->id_provincia_vehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_vehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_vehiculo->ViewCustomAttributes = \"\";\n\n\t\t// tipomaquinaria\n\t\tif (strval($this->tipomaquinaria->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipomaquinaria->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipomaquinaria->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='MAQUINARIA'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipomaquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipomaquinaria->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipomaquinaria->ViewValue .= $this->tipomaquinaria->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipomaquinaria->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipomaquinaria->ViewValue = $this->tipomaquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipomaquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->tipomaquinaria->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_maquinaria\n\t\tif (strval($this->id_ciudad_maquinaria->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_maquinaria->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_maquinaria->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_maquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_maquinaria->ViewValue = $this->id_ciudad_maquinaria->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_maquinaria->ViewValue = $this->id_ciudad_maquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_maquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_maquinaria->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_maquinaria\n\t\tif (strval($this->id_provincia_maquinaria->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_maquinaria->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_maquinaria->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_maquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_maquinaria->ViewValue = $this->id_provincia_maquinaria->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_maquinaria->ViewValue = $this->id_provincia_maquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_maquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_maquinaria->ViewCustomAttributes = \"\";\n\n\t\t// tipomercaderia\n\t\tif (strval($this->tipomercaderia->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipomercaderia->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`id_tipoinmueble`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `id_tipoinmueble`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipomercaderia->LookupFilters = array();\n\t\t$lookuptblfilter = \"`tipo`='MERCADERIA'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipomercaderia, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipomercaderia->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipomercaderia->ViewValue .= $this->tipomercaderia->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipomercaderia->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipomercaderia->ViewValue = $this->tipomercaderia->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipomercaderia->ViewValue = NULL;\n\t\t}\n\t\t$this->tipomercaderia->ViewCustomAttributes = \"\";\n\n\t\t// documento_mercaderia\n\t\t$this->documento_mercaderia->ViewValue = $this->documento_mercaderia->CurrentValue;\n\t\t$this->documento_mercaderia->ViewCustomAttributes = \"\";\n\n\t\t// tipoespecial\n\t\tif (strval($this->tipoespecial->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipoespecial->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`id_tipoinmueble`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `id_tipoinmueble`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipoespecial->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='ESPECIAL'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipoespecial, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipoespecial->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipoespecial->ViewValue .= $this->tipoespecial->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipoespecial->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipoespecial->ViewValue = $this->tipoespecial->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipoespecial->ViewValue = NULL;\n\t\t}\n\t\t$this->tipoespecial->ViewCustomAttributes = \"\";\n\n\t\t// email_contacto\n\t\tif (strval($this->email_contacto->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`login`\" . ew_SearchString(\"=\", $this->email_contacto->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `login`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `oficialcredito`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->email_contacto->LookupFilters = array(\"dx1\" => '`nombre`', \"dx2\" => '`apellido`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->email_contacto, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->email_contacto->ViewValue = $this->email_contacto->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->email_contacto->ViewValue = $this->email_contacto->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->email_contacto->ViewValue = NULL;\n\t\t}\n\t\t$this->email_contacto->ViewCustomAttributes = \"\";\n\n\t\t\t// nombre_contacto\n\t\t\t$this->nombre_contacto->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre_contacto->HrefValue = \"\";\n\t\t\t$this->nombre_contacto->TooltipValue = \"\";\n\n\t\t\t// name\n\t\t\t$this->name->LinkCustomAttributes = \"\";\n\t\t\t$this->name->HrefValue = \"\";\n\t\t\t$this->name->TooltipValue = \"\";\n\n\t\t\t// lastname\n\t\t\t$this->lastname->LinkCustomAttributes = \"\";\n\t\t\t$this->lastname->HrefValue = \"\";\n\t\t\t$this->lastname->TooltipValue = \"\";\n\n\t\t\t// email\n\t\t\t$this->_email->LinkCustomAttributes = \"\";\n\t\t\t$this->_email->HrefValue = \"\";\n\t\t\t$this->_email->TooltipValue = \"\";\n\n\t\t\t// address\n\t\t\t$this->address->LinkCustomAttributes = \"\";\n\t\t\t$this->address->HrefValue = \"\";\n\t\t\t$this->address->TooltipValue = \"\";\n\n\t\t\t// phone\n\t\t\t$this->phone->LinkCustomAttributes = \"\";\n\t\t\t$this->phone->HrefValue = \"\";\n\t\t\t$this->phone->TooltipValue = \"\";\n\n\t\t\t// cell\n\t\t\t$this->cell->LinkCustomAttributes = \"\";\n\t\t\t$this->cell->HrefValue = \"\";\n\t\t\t$this->cell->TooltipValue = \"\";\n\n\t\t\t// created_at\n\t\t\t$this->created_at->LinkCustomAttributes = \"\";\n\t\t\t$this->created_at->HrefValue = \"\";\n\t\t\t$this->created_at->TooltipValue = \"\";\n\n\t\t\t// id_sucursal\n\t\t\t$this->id_sucursal->LinkCustomAttributes = \"\";\n\t\t\t$this->id_sucursal->HrefValue = \"\";\n\t\t\t$this->id_sucursal->TooltipValue = \"\";\n\n\t\t\t// tipoinmueble\n\t\t\t$this->tipoinmueble->LinkCustomAttributes = \"\";\n\t\t\t$this->tipoinmueble->HrefValue = \"\";\n\t\t\t$this->tipoinmueble->TooltipValue = \"\";\n\n\t\t\t// tipovehiculo\n\t\t\t$this->tipovehiculo->LinkCustomAttributes = \"\";\n\t\t\t$this->tipovehiculo->HrefValue = \"\";\n\t\t\t$this->tipovehiculo->TooltipValue = \"\";\n\n\t\t\t// tipomaquinaria\n\t\t\t$this->tipomaquinaria->LinkCustomAttributes = \"\";\n\t\t\t$this->tipomaquinaria->HrefValue = \"\";\n\t\t\t$this->tipomaquinaria->TooltipValue = \"\";\n\n\t\t\t// tipomercaderia\n\t\t\t$this->tipomercaderia->LinkCustomAttributes = \"\";\n\t\t\t$this->tipomercaderia->HrefValue = \"\";\n\t\t\t$this->tipomercaderia->TooltipValue = \"\";\n\n\t\t\t// tipoespecial\n\t\t\t$this->tipoespecial->LinkCustomAttributes = \"\";\n\t\t\t$this->tipoespecial->HrefValue = \"\";\n\t\t\t$this->tipoespecial->TooltipValue = \"\";\n\n\t\t\t// email_contacto\n\t\t\t$this->email_contacto->LinkCustomAttributes = \"\";\n\t\t\t$this->email_contacto->HrefValue = \"\";\n\t\t\t$this->email_contacto->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// nombre_contacto\n\t\t\t$this->nombre_contacto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nombre_contacto->EditCustomAttributes = \"\";\n\t\t\t$this->nombre_contacto->EditValue = ew_HtmlEncode($this->nombre_contacto->AdvancedSearch->SearchValue);\n\t\t\t$this->nombre_contacto->PlaceHolder = ew_RemoveHtml($this->nombre_contacto->FldTitle());\n\n\t\t\t// name\n\t\t\t$this->name->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->name->EditCustomAttributes = \"\";\n\t\t\t$this->name->EditValue = ew_HtmlEncode($this->name->AdvancedSearch->SearchValue);\n\t\t\t$this->name->PlaceHolder = ew_RemoveHtml($this->name->FldTitle());\n\n\t\t\t// lastname\n\t\t\t$this->lastname->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->lastname->EditCustomAttributes = \"\";\n\t\t\t$this->lastname->EditValue = ew_HtmlEncode($this->lastname->AdvancedSearch->SearchValue);\n\t\t\t$this->lastname->PlaceHolder = ew_RemoveHtml($this->lastname->FldTitle());\n\n\t\t\t// email\n\t\t\t$this->_email->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->_email->EditCustomAttributes = \"\";\n\t\t\t$this->_email->EditValue = ew_HtmlEncode($this->_email->AdvancedSearch->SearchValue);\n\t\t\t$this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldTitle());\n\n\t\t\t// address\n\t\t\t$this->address->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->address->EditCustomAttributes = \"\";\n\t\t\t$this->address->EditValue = ew_HtmlEncode($this->address->AdvancedSearch->SearchValue);\n\t\t\t$this->address->PlaceHolder = ew_RemoveHtml($this->address->FldTitle());\n\n\t\t\t// phone\n\t\t\t$this->phone->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->phone->EditCustomAttributes = \"\";\n\t\t\t$this->phone->EditValue = ew_HtmlEncode($this->phone->AdvancedSearch->SearchValue);\n\t\t\t$this->phone->PlaceHolder = ew_RemoveHtml($this->phone->FldTitle());\n\n\t\t\t// cell\n\t\t\t$this->cell->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->cell->EditCustomAttributes = \"\";\n\t\t\t$this->cell->EditValue = ew_HtmlEncode($this->cell->AdvancedSearch->SearchValue);\n\t\t\t$this->cell->PlaceHolder = ew_RemoveHtml($this->cell->FldTitle());\n\n\t\t\t// created_at\n\t\t\t$this->created_at->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->created_at->EditCustomAttributes = \"\";\n\t\t\t$this->created_at->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->created_at->AdvancedSearch->SearchValue, 17), 17));\n\t\t\t$this->created_at->PlaceHolder = ew_RemoveHtml($this->created_at->FldTitle());\n\n\t\t\t// id_sucursal\n\t\t\t$this->id_sucursal->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_sucursal->EditCustomAttributes = \"\";\n\n\t\t\t// tipoinmueble\n\t\t\t$this->tipoinmueble->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipoinmueble->EditCustomAttributes = \"\";\n\n\t\t\t// tipovehiculo\n\t\t\t$this->tipovehiculo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipovehiculo->EditCustomAttributes = \"\";\n\n\t\t\t// tipomaquinaria\n\t\t\t$this->tipomaquinaria->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipomaquinaria->EditCustomAttributes = \"\";\n\n\t\t\t// tipomercaderia\n\t\t\t$this->tipomercaderia->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipomercaderia->EditCustomAttributes = \"\";\n\n\t\t\t// tipoespecial\n\t\t\t$this->tipoespecial->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipoespecial->EditCustomAttributes = \"\";\n\n\t\t\t// email_contacto\n\t\t\t$this->email_contacto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->email_contacto->EditCustomAttributes = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->SetupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->precio_item->FormValue == $this->precio_item->CurrentValue && is_numeric(ew_StrToFloat($this->precio_item->CurrentValue)))\n\t\t\t$this->precio_item->CurrentValue = ew_StrToFloat($this->precio_item->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->costo_item->FormValue == $this->costo_item->CurrentValue && is_numeric(ew_StrToFloat($this->costo_item->CurrentValue)))\n\t\t\t$this->costo_item->CurrentValue = ew_StrToFloat($this->costo_item->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->saldo_item->FormValue == $this->saldo_item->CurrentValue && is_numeric(ew_StrToFloat($this->saldo_item->CurrentValue)))\n\t\t\t$this->saldo_item->CurrentValue = ew_StrToFloat($this->saldo_item->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->precio_old_item->FormValue == $this->precio_old_item->CurrentValue && is_numeric(ew_StrToFloat($this->precio_old_item->CurrentValue)))\n\t\t\t$this->precio_old_item->CurrentValue = ew_StrToFloat($this->precio_old_item->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->costo_old_item->FormValue == $this->costo_old_item->CurrentValue && is_numeric(ew_StrToFloat($this->costo_old_item->CurrentValue)))\n\t\t\t$this->costo_old_item->CurrentValue = ew_StrToFloat($this->costo_old_item->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// Id_Item\n\t\t// codigo_item\n\t\t// nombre_item\n\t\t// und_item\n\t\t// precio_item\n\t\t// costo_item\n\t\t// tipo_item\n\t\t// marca_item\n\t\t// cod_marca_item\n\t\t// detalle_item\n\t\t// saldo_item\n\t\t// activo_item\n\t\t// maneja_serial_item\n\t\t// asignado_item\n\t\t// si_no_item\n\t\t// precio_old_item\n\t\t// costo_old_item\n\t\t// registra_item\n\t\t// fecha_registro_item\n\t\t// empresa_item\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// Id_Item\n\t\t$this->Id_Item->ViewValue = $this->Id_Item->CurrentValue;\n\t\t$this->Id_Item->ViewCustomAttributes = \"\";\n\n\t\t// codigo_item\n\t\t$this->codigo_item->ViewValue = $this->codigo_item->CurrentValue;\n\t\t$this->codigo_item->ViewCustomAttributes = \"\";\n\n\t\t// nombre_item\n\t\t$this->nombre_item->ViewValue = $this->nombre_item->CurrentValue;\n\t\t$this->nombre_item->ViewCustomAttributes = \"\";\n\n\t\t// und_item\n\t\t$this->und_item->ViewValue = $this->und_item->CurrentValue;\n\t\t$this->und_item->ViewCustomAttributes = \"\";\n\n\t\t// precio_item\n\t\t$this->precio_item->ViewValue = $this->precio_item->CurrentValue;\n\t\t$this->precio_item->ViewCustomAttributes = \"\";\n\n\t\t// costo_item\n\t\t$this->costo_item->ViewValue = $this->costo_item->CurrentValue;\n\t\t$this->costo_item->ViewCustomAttributes = \"\";\n\n\t\t// tipo_item\n\t\t$this->tipo_item->ViewValue = $this->tipo_item->CurrentValue;\n\t\t$this->tipo_item->ViewCustomAttributes = \"\";\n\n\t\t// marca_item\n\t\t$this->marca_item->ViewValue = $this->marca_item->CurrentValue;\n\t\t$this->marca_item->ViewCustomAttributes = \"\";\n\n\t\t// cod_marca_item\n\t\t$this->cod_marca_item->ViewValue = $this->cod_marca_item->CurrentValue;\n\t\t$this->cod_marca_item->ViewCustomAttributes = \"\";\n\n\t\t// detalle_item\n\t\t$this->detalle_item->ViewValue = $this->detalle_item->CurrentValue;\n\t\t$this->detalle_item->ViewCustomAttributes = \"\";\n\n\t\t// saldo_item\n\t\t$this->saldo_item->ViewValue = $this->saldo_item->CurrentValue;\n\t\t$this->saldo_item->ViewCustomAttributes = \"\";\n\n\t\t// activo_item\n\t\t$this->activo_item->ViewValue = $this->activo_item->CurrentValue;\n\t\t$this->activo_item->ViewCustomAttributes = \"\";\n\n\t\t// maneja_serial_item\n\t\t$this->maneja_serial_item->ViewValue = $this->maneja_serial_item->CurrentValue;\n\t\t$this->maneja_serial_item->ViewCustomAttributes = \"\";\n\n\t\t// asignado_item\n\t\t$this->asignado_item->ViewValue = $this->asignado_item->CurrentValue;\n\t\t$this->asignado_item->ViewCustomAttributes = \"\";\n\n\t\t// si_no_item\n\t\t$this->si_no_item->ViewValue = $this->si_no_item->CurrentValue;\n\t\t$this->si_no_item->ViewCustomAttributes = \"\";\n\n\t\t// precio_old_item\n\t\t$this->precio_old_item->ViewValue = $this->precio_old_item->CurrentValue;\n\t\t$this->precio_old_item->ViewCustomAttributes = \"\";\n\n\t\t// costo_old_item\n\t\t$this->costo_old_item->ViewValue = $this->costo_old_item->CurrentValue;\n\t\t$this->costo_old_item->ViewCustomAttributes = \"\";\n\n\t\t// registra_item\n\t\t$this->registra_item->ViewValue = $this->registra_item->CurrentValue;\n\t\t$this->registra_item->ViewCustomAttributes = \"\";\n\n\t\t// fecha_registro_item\n\t\t$this->fecha_registro_item->ViewValue = $this->fecha_registro_item->CurrentValue;\n\t\t$this->fecha_registro_item->ViewValue = ew_FormatDateTime($this->fecha_registro_item->ViewValue, 0);\n\t\t$this->fecha_registro_item->ViewCustomAttributes = \"\";\n\n\t\t// empresa_item\n\t\t$this->empresa_item->ViewValue = $this->empresa_item->CurrentValue;\n\t\t$this->empresa_item->ViewCustomAttributes = \"\";\n\n\t\t\t// Id_Item\n\t\t\t$this->Id_Item->LinkCustomAttributes = \"\";\n\t\t\t$this->Id_Item->HrefValue = \"\";\n\t\t\t$this->Id_Item->TooltipValue = \"\";\n\n\t\t\t// codigo_item\n\t\t\t$this->codigo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->codigo_item->HrefValue = \"\";\n\t\t\t$this->codigo_item->TooltipValue = \"\";\n\n\t\t\t// nombre_item\n\t\t\t$this->nombre_item->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre_item->HrefValue = \"\";\n\t\t\t$this->nombre_item->TooltipValue = \"\";\n\n\t\t\t// und_item\n\t\t\t$this->und_item->LinkCustomAttributes = \"\";\n\t\t\t$this->und_item->HrefValue = \"\";\n\t\t\t$this->und_item->TooltipValue = \"\";\n\n\t\t\t// precio_item\n\t\t\t$this->precio_item->LinkCustomAttributes = \"\";\n\t\t\t$this->precio_item->HrefValue = \"\";\n\t\t\t$this->precio_item->TooltipValue = \"\";\n\n\t\t\t// costo_item\n\t\t\t$this->costo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->costo_item->HrefValue = \"\";\n\t\t\t$this->costo_item->TooltipValue = \"\";\n\n\t\t\t// tipo_item\n\t\t\t$this->tipo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->tipo_item->HrefValue = \"\";\n\t\t\t$this->tipo_item->TooltipValue = \"\";\n\n\t\t\t// marca_item\n\t\t\t$this->marca_item->LinkCustomAttributes = \"\";\n\t\t\t$this->marca_item->HrefValue = \"\";\n\t\t\t$this->marca_item->TooltipValue = \"\";\n\n\t\t\t// cod_marca_item\n\t\t\t$this->cod_marca_item->LinkCustomAttributes = \"\";\n\t\t\t$this->cod_marca_item->HrefValue = \"\";\n\t\t\t$this->cod_marca_item->TooltipValue = \"\";\n\n\t\t\t// detalle_item\n\t\t\t$this->detalle_item->LinkCustomAttributes = \"\";\n\t\t\t$this->detalle_item->HrefValue = \"\";\n\t\t\t$this->detalle_item->TooltipValue = \"\";\n\n\t\t\t// saldo_item\n\t\t\t$this->saldo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->saldo_item->HrefValue = \"\";\n\t\t\t$this->saldo_item->TooltipValue = \"\";\n\n\t\t\t// activo_item\n\t\t\t$this->activo_item->LinkCustomAttributes = \"\";\n\t\t\t$this->activo_item->HrefValue = \"\";\n\t\t\t$this->activo_item->TooltipValue = \"\";\n\n\t\t\t// maneja_serial_item\n\t\t\t$this->maneja_serial_item->LinkCustomAttributes = \"\";\n\t\t\t$this->maneja_serial_item->HrefValue = \"\";\n\t\t\t$this->maneja_serial_item->TooltipValue = \"\";\n\n\t\t\t// asignado_item\n\t\t\t$this->asignado_item->LinkCustomAttributes = \"\";\n\t\t\t$this->asignado_item->HrefValue = \"\";\n\t\t\t$this->asignado_item->TooltipValue = \"\";\n\n\t\t\t// si_no_item\n\t\t\t$this->si_no_item->LinkCustomAttributes = \"\";\n\t\t\t$this->si_no_item->HrefValue = \"\";\n\t\t\t$this->si_no_item->TooltipValue = \"\";\n\n\t\t\t// precio_old_item\n\t\t\t$this->precio_old_item->LinkCustomAttributes = \"\";\n\t\t\t$this->precio_old_item->HrefValue = \"\";\n\t\t\t$this->precio_old_item->TooltipValue = \"\";\n\n\t\t\t// costo_old_item\n\t\t\t$this->costo_old_item->LinkCustomAttributes = \"\";\n\t\t\t$this->costo_old_item->HrefValue = \"\";\n\t\t\t$this->costo_old_item->TooltipValue = \"\";\n\n\t\t\t// registra_item\n\t\t\t$this->registra_item->LinkCustomAttributes = \"\";\n\t\t\t$this->registra_item->HrefValue = \"\";\n\t\t\t$this->registra_item->TooltipValue = \"\";\n\n\t\t\t// fecha_registro_item\n\t\t\t$this->fecha_registro_item->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_registro_item->HrefValue = \"\";\n\t\t\t$this->fecha_registro_item->TooltipValue = \"\";\n\n\t\t\t// empresa_item\n\t\t\t$this->empresa_item->LinkCustomAttributes = \"\";\n\t\t\t$this->empresa_item->HrefValue = \"\";\n\t\t\t$this->empresa_item->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "public function edit(Table $table, Row $row)\n {\n $cols = $table->cols;\n $items = $row->items;\n $i = 1;\n return view('rows.create_and_edit', compact('table', 'row', 'cols' ,'items' ,'i'));\n }", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// spec_id\n\t\t// model_id\n\t\t// title\n\t\t// description\n\t\t// s_order\n\t\t// status\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// spec_id\n\t\t\t$this->spec_id->ViewValue = $this->spec_id->CurrentValue;\n\t\t\t$this->spec_id->ViewCustomAttributes = \"\";\n\n\t\t\t// model_id\n\t\t\tif (strval($this->model_id->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`model_id`\" . ew_SearchString(\"=\", $this->model_id->CurrentValue, EW_DATATYPE_NUMBER);\n\t\t\t$sSqlWrk = \"SELECT `model_id`, `model_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `model`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `model_name` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->model_id->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->model_id->ViewValue = $this->model_id->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->model_id->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->model_id->ViewCustomAttributes = \"\";\n\n\t\t\t// title\n\t\t\t$this->title->ViewValue = $this->title->CurrentValue;\n\t\t\t$this->title->ViewCustomAttributes = \"\";\n\n\t\t\t// description\n\t\t\t$this->description->ViewValue = $this->description->CurrentValue;\n\t\t\t$this->description->ViewCustomAttributes = \"\";\n\n\t\t\t// s_order\n\t\t\t$this->s_order->ViewValue = $this->s_order->CurrentValue;\n\t\t\t$this->s_order->ViewCustomAttributes = \"\";\n\n\t\t\t// status\n\t\t\tif (strval($this->status->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($this->status->CurrentValue) {\n\t\t\t\t\tcase $this->status->FldTagValue(1):\n\t\t\t\t\t\t$this->status->ViewValue = $this->status->FldTagCaption(1) <> \"\" ? $this->status->FldTagCaption(1) : $this->status->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->status->FldTagValue(2):\n\t\t\t\t\t\t$this->status->ViewValue = $this->status->FldTagCaption(2) <> \"\" ? $this->status->FldTagCaption(2) : $this->status->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->status->ViewValue = $this->status->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->status->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->status->ViewCustomAttributes = \"\";\n\n\t\t\t// spec_id\n\t\t\t$this->spec_id->LinkCustomAttributes = \"\";\n\t\t\t$this->spec_id->HrefValue = \"\";\n\t\t\t$this->spec_id->TooltipValue = \"\";\n\n\t\t\t// model_id\n\t\t\t$this->model_id->LinkCustomAttributes = \"\";\n\t\t\t$this->model_id->HrefValue = \"\";\n\t\t\t$this->model_id->TooltipValue = \"\";\n\n\t\t\t// title\n\t\t\t$this->title->LinkCustomAttributes = \"\";\n\t\t\t$this->title->HrefValue = \"\";\n\t\t\t$this->title->TooltipValue = \"\";\n\n\t\t\t// description\n\t\t\t$this->description->LinkCustomAttributes = \"\";\n\t\t\t$this->description->HrefValue = \"\";\n\t\t\t$this->description->TooltipValue = \"\";\n\n\t\t\t// s_order\n\t\t\t$this->s_order->LinkCustomAttributes = \"\";\n\t\t\t$this->s_order->HrefValue = \"\";\n\t\t\t$this->s_order->TooltipValue = \"\";\n\n\t\t\t// status\n\t\t\t$this->status->LinkCustomAttributes = \"\";\n\t\t\t$this->status->HrefValue = \"\";\n\t\t\t$this->status->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\n\n\t\t\t// spec_id\n\t\t\t$this->spec_id->EditCustomAttributes = \"\";\n\t\t\t$this->spec_id->EditValue = $this->spec_id->CurrentValue;\n\t\t\t$this->spec_id->ViewCustomAttributes = \"\";\n\n\t\t\t// model_id\n\t\t\t$this->model_id->EditCustomAttributes = \"\";\n\t\t\tif ($this->model_id->getSessionValue() <> \"\") {\n\t\t\t\t$this->model_id->CurrentValue = $this->model_id->getSessionValue();\n\t\t\tif (strval($this->model_id->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`model_id`\" . ew_SearchString(\"=\", $this->model_id->CurrentValue, EW_DATATYPE_NUMBER);\n\t\t\t$sSqlWrk = \"SELECT `model_id`, `model_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `model`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `model_name` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->model_id->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->model_id->ViewValue = $this->model_id->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->model_id->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->model_id->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `model_id`, `model_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `model`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `model_name` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->model_id->EditValue = $arwrk;\n\t\t\t}\n\n\t\t\t// title\n\t\t\t$this->title->EditCustomAttributes = \"\";\n\t\t\t$this->title->EditValue = ew_HtmlEncode($this->title->CurrentValue);\n\n\t\t\t// description\n\t\t\t$this->description->EditCustomAttributes = \"\";\n\t\t\t$this->description->EditValue = ew_HtmlEncode($this->description->CurrentValue);\n\n\t\t\t// s_order\n\t\t\t$this->s_order->EditCustomAttributes = \"\";\n\t\t\t$this->s_order->EditValue = ew_HtmlEncode($this->s_order->CurrentValue);\n\n\t\t\t// status\n\t\t\t$this->status->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array($this->status->FldTagValue(1), $this->status->FldTagCaption(1) <> \"\" ? $this->status->FldTagCaption(1) : $this->status->FldTagValue(1));\n\t\t\t$arwrk[] = array($this->status->FldTagValue(2), $this->status->FldTagCaption(2) <> \"\" ? $this->status->FldTagCaption(2) : $this->status->FldTagValue(2));\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$this->status->EditValue = $arwrk;\n\n\t\t\t// Edit refer script\n\t\t\t// spec_id\n\n\t\t\t$this->spec_id->HrefValue = \"\";\n\n\t\t\t// model_id\n\t\t\t$this->model_id->HrefValue = \"\";\n\n\t\t\t// title\n\t\t\t$this->title->HrefValue = \"\";\n\n\t\t\t// description\n\t\t\t$this->description->HrefValue = \"\";\n\n\t\t\t// s_order\n\t\t\t$this->s_order->HrefValue = \"\";\n\n\t\t\t// status\n\t\t\t$this->status->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// fbid\n\t\t// name\n\t\t// email\n\t\t// password\n\t\t// validated_mobile\n\t\t// role_id\n\t\t// image\n\t\t// newsletter\n\t\t// points\n\t\t// last_modified\n\t\t// p2\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// id\n\t\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t\t// fbid\n\t\t\t$this->fbid->ViewValue = $this->fbid->CurrentValue;\n\t\t\t$this->fbid->ViewCustomAttributes = \"\";\n\n\t\t\t// name\n\t\t\t$this->name->ViewValue = $this->name->CurrentValue;\n\t\t\t$this->name->ViewCustomAttributes = \"\";\n\n\t\t\t// email\n\t\t\t$this->_email->ViewValue = $this->_email->CurrentValue;\n\t\t\t$this->_email->ViewCustomAttributes = \"\";\n\n\t\t\t// password\n\t\t\t$this->password->ViewValue = $this->password->CurrentValue;\n\t\t\t$this->password->ViewCustomAttributes = \"\";\n\n\t\t\t// validated_mobile\n\t\t\t$this->validated_mobile->ViewValue = $this->validated_mobile->CurrentValue;\n\t\t\t$this->validated_mobile->ViewCustomAttributes = \"\";\n\n\t\t\t// role_id\n\t\t\tif (strval($this->role_id->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($this->role_id->CurrentValue) {\n\t\t\t\t\tcase $this->role_id->FldTagValue(1):\n\t\t\t\t\t\t$this->role_id->ViewValue = $this->role_id->FldTagCaption(1) <> \"\" ? $this->role_id->FldTagCaption(1) : $this->role_id->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->role_id->FldTagValue(2):\n\t\t\t\t\t\t$this->role_id->ViewValue = $this->role_id->FldTagCaption(2) <> \"\" ? $this->role_id->FldTagCaption(2) : $this->role_id->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->role_id->ViewValue = $this->role_id->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->role_id->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->role_id->ViewCustomAttributes = \"\";\n\n\t\t\t// image\n\t\t\t$this->image->ViewValue = $this->image->CurrentValue;\n\t\t\t$this->image->ViewCustomAttributes = \"\";\n\n\t\t\t// newsletter\n\t\t\t$this->newsletter->ViewValue = $this->newsletter->CurrentValue;\n\t\t\t$this->newsletter->ViewCustomAttributes = \"\";\n\n\t\t\t// points\n\t\t\t$this->points->ViewValue = $this->points->CurrentValue;\n\t\t\t$this->points->ViewCustomAttributes = \"\";\n\n\t\t\t// last_modified\n\t\t\t$this->last_modified->ViewValue = $this->last_modified->CurrentValue;\n\t\t\t$this->last_modified->ViewValue = ew_FormatDateTime($this->last_modified->ViewValue, 7);\n\t\t\t$this->last_modified->ViewCustomAttributes = \"\";\n\n\t\t\t// p2\n\t\t\t$this->p2->ViewValue = $this->p2->CurrentValue;\n\t\t\t$this->p2->ViewCustomAttributes = \"\";\n\n\t\t\t// id\n\t\t\t$this->id->LinkCustomAttributes = \"\";\n\t\t\t$this->id->HrefValue = \"\";\n\t\t\t$this->id->TooltipValue = \"\";\n\n\t\t\t// fbid\n\t\t\t$this->fbid->LinkCustomAttributes = \"\";\n\t\t\t$this->fbid->HrefValue = \"\";\n\t\t\t$this->fbid->TooltipValue = \"\";\n\n\t\t\t// name\n\t\t\t$this->name->LinkCustomAttributes = \"\";\n\t\t\t$this->name->HrefValue = \"\";\n\t\t\t$this->name->TooltipValue = \"\";\n\n\t\t\t// email\n\t\t\t$this->_email->LinkCustomAttributes = \"\";\n\t\t\t$this->_email->HrefValue = \"\";\n\t\t\t$this->_email->TooltipValue = \"\";\n\n\t\t\t// password\n\t\t\t$this->password->LinkCustomAttributes = \"\";\n\t\t\t$this->password->HrefValue = \"\";\n\t\t\t$this->password->TooltipValue = \"\";\n\n\t\t\t// validated_mobile\n\t\t\t$this->validated_mobile->LinkCustomAttributes = \"\";\n\t\t\t$this->validated_mobile->HrefValue = \"\";\n\t\t\t$this->validated_mobile->TooltipValue = \"\";\n\n\t\t\t// role_id\n\t\t\t$this->role_id->LinkCustomAttributes = \"\";\n\t\t\t$this->role_id->HrefValue = \"\";\n\t\t\t$this->role_id->TooltipValue = \"\";\n\n\t\t\t// image\n\t\t\t$this->image->LinkCustomAttributes = \"\";\n\t\t\t$this->image->HrefValue = \"\";\n\t\t\t$this->image->TooltipValue = \"\";\n\n\t\t\t// newsletter\n\t\t\t$this->newsletter->LinkCustomAttributes = \"\";\n\t\t\t$this->newsletter->HrefValue = \"\";\n\t\t\t$this->newsletter->TooltipValue = \"\";\n\n\t\t\t// points\n\t\t\t$this->points->LinkCustomAttributes = \"\";\n\t\t\t$this->points->HrefValue = \"\";\n\t\t\t$this->points->TooltipValue = \"\";\n\n\t\t\t// last_modified\n\t\t\t$this->last_modified->LinkCustomAttributes = \"\";\n\t\t\t$this->last_modified->HrefValue = \"\";\n\t\t\t$this->last_modified->TooltipValue = \"\";\n\n\t\t\t// p2\n\t\t\t$this->p2->LinkCustomAttributes = \"\";\n\t\t\t$this->p2->HrefValue = \"\";\n\t\t\t$this->p2->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\n\n\t\t\t// id\n\t\t\t$this->id->EditCustomAttributes = \"\";\n\t\t\t$this->id->EditValue = $this->id->CurrentValue;\n\t\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t\t// fbid\n\t\t\t$this->fbid->EditCustomAttributes = \"\";\n\t\t\t$this->fbid->EditValue = ew_HtmlEncode($this->fbid->CurrentValue);\n\n\t\t\t// name\n\t\t\t$this->name->EditCustomAttributes = \"\";\n\t\t\t$this->name->EditValue = ew_HtmlEncode($this->name->CurrentValue);\n\n\t\t\t// email\n\t\t\t$this->_email->EditCustomAttributes = \"\";\n\t\t\t$this->_email->EditValue = ew_HtmlEncode($this->_email->CurrentValue);\n\n\t\t\t// password\n\t\t\t$this->password->EditCustomAttributes = \"\";\n\t\t\t$this->password->EditValue = ew_HtmlEncode($this->password->CurrentValue);\n\n\t\t\t// validated_mobile\n\t\t\t$this->validated_mobile->EditCustomAttributes = \"\";\n\t\t\t$this->validated_mobile->EditValue = ew_HtmlEncode($this->validated_mobile->CurrentValue);\n\n\t\t\t// role_id\n\t\t\t$this->role_id->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array($this->role_id->FldTagValue(1), $this->role_id->FldTagCaption(1) <> \"\" ? $this->role_id->FldTagCaption(1) : $this->role_id->FldTagValue(1));\n\t\t\t$arwrk[] = array($this->role_id->FldTagValue(2), $this->role_id->FldTagCaption(2) <> \"\" ? $this->role_id->FldTagCaption(2) : $this->role_id->FldTagValue(2));\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$this->role_id->EditValue = $arwrk;\n\n\t\t\t// image\n\t\t\t$this->image->EditCustomAttributes = \"\";\n\t\t\t$this->image->EditValue = ew_HtmlEncode($this->image->CurrentValue);\n\n\t\t\t// newsletter\n\t\t\t$this->newsletter->EditCustomAttributes = \"\";\n\t\t\t$this->newsletter->EditValue = ew_HtmlEncode($this->newsletter->CurrentValue);\n\n\t\t\t// points\n\t\t\t$this->points->EditCustomAttributes = \"\";\n\t\t\t$this->points->EditValue = ew_HtmlEncode($this->points->CurrentValue);\n\n\t\t\t// last_modified\n\t\t\t$this->last_modified->EditCustomAttributes = \"\";\n\t\t\t$this->last_modified->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->last_modified->CurrentValue, 7));\n\n\t\t\t// p2\n\t\t\t$this->p2->EditCustomAttributes = \"\";\n\t\t\t$this->p2->EditValue = ew_HtmlEncode($this->p2->CurrentValue);\n\n\t\t\t// Edit refer script\n\t\t\t// id\n\n\t\t\t$this->id->HrefValue = \"\";\n\n\t\t\t// fbid\n\t\t\t$this->fbid->HrefValue = \"\";\n\n\t\t\t// name\n\t\t\t$this->name->HrefValue = \"\";\n\n\t\t\t// email\n\t\t\t$this->_email->HrefValue = \"\";\n\n\t\t\t// password\n\t\t\t$this->password->HrefValue = \"\";\n\n\t\t\t// validated_mobile\n\t\t\t$this->validated_mobile->HrefValue = \"\";\n\n\t\t\t// role_id\n\t\t\t$this->role_id->HrefValue = \"\";\n\n\t\t\t// image\n\t\t\t$this->image->HrefValue = \"\";\n\n\t\t\t// newsletter\n\t\t\t$this->newsletter->HrefValue = \"\";\n\n\t\t\t// points\n\t\t\t$this->points->HrefValue = \"\";\n\n\t\t\t// last_modified\n\t\t\t$this->last_modified->HrefValue = \"\";\n\n\t\t\t// p2\n\t\t\t$this->p2->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "public function edit()\n\t{\n\t\t\n\t\t$sql = SqlQuery::getInstance();\n\t\t\n\t\t$tbl = new AbTable(\"SELECT u.first_name, u.last_name, u.zip, c.* FROM IBO_camp c JOIN user u ON u.id = c.user_id\",array('user_id'));\n\t\t\n\t\treturn $tbl->getHtml();\n\t\t\n\t\t\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Id\r\n\t\t// Nama\r\n\t\t// Alamat\r\n\t\t// Jumlah\r\n\t\t// Provinsi\r\n\t\t// Area\r\n\t\t// CP\r\n\t\t// NoContact\r\n\t\t// Tanggal\r\n\t\t// Jam\r\n\t\t// Vechicle\r\n\t\t// Type\r\n\t\t// Site\r\n\t\t// Status\r\n\t\t// UserID\r\n\t\t// TglInput\r\n\t\t// visit\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// Id\r\n\t\t\t$this->Id->ViewValue = $this->Id->CurrentValue;\r\n\t\t\t$this->Id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Nama\r\n\t\t\t$this->Nama->ViewValue = $this->Nama->CurrentValue;\r\n\t\t\t$this->Nama->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Jumlah\r\n\t\t\t$this->Jumlah->ViewValue = $this->Jumlah->CurrentValue;\r\n\t\t\t$this->Jumlah->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Provinsi\r\n\t\t\tif (strval($this->Provinsi->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->Provinsi->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `NamaProv` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provinsi`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Provinsi, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Provinsi->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Provinsi->ViewValue = $this->Provinsi->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Provinsi->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Provinsi->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Area\r\n\t\t\tif (strval($this->Area->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->Area->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `Kota` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `kota`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Area, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Area->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Area->ViewValue = $this->Area->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Area->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Area->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CP\r\n\t\t\t$this->CP->ViewValue = $this->CP->CurrentValue;\r\n\t\t\t$this->CP->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// NoContact\r\n\t\t\t$this->NoContact->ViewValue = $this->NoContact->CurrentValue;\r\n\t\t\t$this->NoContact->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Tanggal\r\n\t\t\t$this->Tanggal->ViewValue = $this->Tanggal->CurrentValue;\r\n\t\t\t$this->Tanggal->ViewValue = ew_FormatDateTime($this->Tanggal->ViewValue, 7);\r\n\t\t\t$this->Tanggal->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Jam\r\n\t\t\t$this->Jam->ViewValue = $this->Jam->CurrentValue;\r\n\t\t\t$this->Jam->ViewValue = ew_FormatDateTime($this->Jam->ViewValue, 4);\r\n\t\t\t$this->Jam->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Vechicle\r\n\t\t\tif (strval($this->Vechicle->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Vechicle->CurrentValue) {\r\n\t\t\t\t\tcase $this->Vechicle->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Vechicle->ViewValue = $this->Vechicle->FldTagCaption(1) <> \"\" ? $this->Vechicle->FldTagCaption(1) : $this->Vechicle->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Vechicle->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Vechicle->ViewValue = $this->Vechicle->FldTagCaption(2) <> \"\" ? $this->Vechicle->FldTagCaption(2) : $this->Vechicle->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Vechicle->ViewValue = $this->Vechicle->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Vechicle->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Vechicle->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Type\r\n\t\t\tif (strval($this->Type->CurrentValue) <> \"\") {\r\n\t\t\t\t$sFilterWrk = \"`Id`\" . ew_SearchString(\"=\", $this->Type->CurrentValue, EW_DATATYPE_NUMBER);\r\n\t\t\t$sSqlWrk = \"SELECT `Id`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `typepengunjung`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Type, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t\t$this->Type->ViewValue = $rswrk->fields('DispFld');\r\n\t\t\t\t\t$rswrk->Close();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->Type->ViewValue = $this->Type->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Type->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Site\r\n\t\t\tif (strval($this->Site->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Site->CurrentValue) {\r\n\t\t\t\t\tcase $this->Site->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Site->ViewValue = $this->Site->FldTagCaption(1) <> \"\" ? $this->Site->FldTagCaption(1) : $this->Site->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Site->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Site->ViewValue = $this->Site->FldTagCaption(2) <> \"\" ? $this->Site->FldTagCaption(2) : $this->Site->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Site->ViewValue = $this->Site->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Site->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Site->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Status\r\n\t\t\tif (strval($this->Status->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->Status->CurrentValue) {\r\n\t\t\t\t\tcase $this->Status->FldTagValue(1):\r\n\t\t\t\t\t\t$this->Status->ViewValue = $this->Status->FldTagCaption(1) <> \"\" ? $this->Status->FldTagCaption(1) : $this->Status->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->Status->FldTagValue(2):\r\n\t\t\t\t\t\t$this->Status->ViewValue = $this->Status->FldTagCaption(2) <> \"\" ? $this->Status->FldTagCaption(2) : $this->Status->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->Status->ViewValue = $this->Status->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->Status->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->Status->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// UserID\r\n\t\t\t$this->_UserID->ViewValue = $this->_UserID->CurrentValue;\r\n\t\t\t$this->_UserID->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// TglInput\r\n\t\t\t$this->TglInput->ViewValue = $this->TglInput->CurrentValue;\r\n\t\t\t$this->TglInput->ViewValue = ew_FormatDateTime($this->TglInput->ViewValue, 7);\r\n\t\t\t$this->TglInput->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// visit\r\n\t\t\tif (strval($this->visit->CurrentValue) <> \"\") {\r\n\t\t\t\tswitch ($this->visit->CurrentValue) {\r\n\t\t\t\t\tcase $this->visit->FldTagValue(1):\r\n\t\t\t\t\t\t$this->visit->ViewValue = $this->visit->FldTagCaption(1) <> \"\" ? $this->visit->FldTagCaption(1) : $this->visit->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase $this->visit->FldTagValue(2):\r\n\t\t\t\t\t\t$this->visit->ViewValue = $this->visit->FldTagCaption(2) <> \"\" ? $this->visit->FldTagCaption(2) : $this->visit->CurrentValue;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$this->visit->ViewValue = $this->visit->CurrentValue;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->visit->ViewValue = NULL;\r\n\t\t\t}\r\n\t\t\t$this->visit->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Nama\r\n\t\t\t$this->Nama->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nama->HrefValue = \"\";\r\n\t\t\t$this->Nama->TooltipValue = \"\";\r\n\r\n\t\t\t// Provinsi\r\n\t\t\t$this->Provinsi->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Provinsi->HrefValue = \"\";\r\n\t\t\t$this->Provinsi->TooltipValue = \"\";\r\n\r\n\t\t\t// Area\r\n\t\t\t$this->Area->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Area->HrefValue = \"\";\r\n\t\t\t$this->Area->TooltipValue = \"\";\r\n\r\n\t\t\t// CP\r\n\t\t\t$this->CP->LinkCustomAttributes = \"\";\r\n\t\t\t$this->CP->HrefValue = \"\";\r\n\t\t\t$this->CP->TooltipValue = \"\";\r\n\r\n\t\t\t// Tanggal\r\n\t\t\t$this->Tanggal->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Tanggal->HrefValue = \"\";\r\n\t\t\t$this->Tanggal->TooltipValue = \"\";\r\n\r\n\t\t\t// Vechicle\r\n\t\t\t$this->Vechicle->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Vechicle->HrefValue = \"\";\r\n\t\t\t$this->Vechicle->TooltipValue = \"\";\r\n\r\n\t\t\t// Type\r\n\t\t\t$this->Type->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Type->HrefValue = \"\";\r\n\t\t\t$this->Type->TooltipValue = \"\";\r\n\r\n\t\t\t// Site\r\n\t\t\t$this->Site->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Site->HrefValue = \"\";\r\n\t\t\t$this->Site->TooltipValue = \"\";\r\n\r\n\t\t\t// Status\r\n\t\t\t$this->Status->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Status->HrefValue = \"\";\r\n\t\t\t$this->Status->TooltipValue = \"\";\r\n\r\n\t\t\t// visit\r\n\t\t\t$this->visit->LinkCustomAttributes = \"\";\r\n\t\t\t$this->visit->HrefValue = \"\";\r\n\t\t\t$this->visit->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\r\n\r\n\t\t\t// Nama\r\n\t\t\t$this->Nama->EditCustomAttributes = \"\";\r\n\t\t\t$this->Nama->EditValue = ew_HtmlEncode($this->Nama->AdvancedSearch->SearchValue);\r\n\t\t\t$this->Nama->PlaceHolder = ew_RemoveHtml($this->Nama->FldCaption());\r\n\r\n\t\t\t// Provinsi\r\n\t\t\t$this->Provinsi->EditCustomAttributes = \"\";\r\n\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `NamaProv` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `provinsi`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Provinsi, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\r\n\t\t\t$this->Provinsi->EditValue = $arwrk;\r\n\r\n\t\t\t// Area\r\n\t\t\t$this->Area->EditCustomAttributes = \"\";\r\n\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `id`, `Kota` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, `Prov` AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `kota`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Area, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\r\n\t\t\t$this->Area->EditValue = $arwrk;\r\n\r\n\t\t\t// CP\r\n\t\t\t$this->CP->EditCustomAttributes = \"\";\r\n\t\t\t$this->CP->EditValue = ew_HtmlEncode($this->CP->AdvancedSearch->SearchValue);\r\n\t\t\t$this->CP->PlaceHolder = ew_RemoveHtml($this->CP->FldCaption());\r\n\r\n\t\t\t// Tanggal\r\n\t\t\t$this->Tanggal->EditCustomAttributes = \"\";\r\n\t\t\t$this->Tanggal->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->Tanggal->AdvancedSearch->SearchValue, 7), 7));\r\n\t\t\t$this->Tanggal->PlaceHolder = ew_RemoveHtml($this->Tanggal->FldCaption());\r\n\t\t\t$this->Tanggal->EditCustomAttributes = \"\";\r\n\t\t\t$this->Tanggal->EditValue2 = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->Tanggal->AdvancedSearch->SearchValue2, 7), 7));\r\n\t\t\t$this->Tanggal->PlaceHolder = ew_RemoveHtml($this->Tanggal->FldCaption());\r\n\r\n\t\t\t// Vechicle\r\n\t\t\t$this->Vechicle->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Vechicle->FldTagValue(1), $this->Vechicle->FldTagCaption(1) <> \"\" ? $this->Vechicle->FldTagCaption(1) : $this->Vechicle->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Vechicle->FldTagValue(2), $this->Vechicle->FldTagCaption(2) <> \"\" ? $this->Vechicle->FldTagCaption(2) : $this->Vechicle->FldTagValue(2));\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\r\n\t\t\t$this->Vechicle->EditValue = $arwrk;\r\n\r\n\t\t\t// Type\r\n\t\t\t$this->Type->EditCustomAttributes = \"\";\r\n\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sSqlWrk = \"SELECT `Id`, `Description` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `typepengunjung`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Type, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\r\n\t\t\t$this->Type->EditValue = $arwrk;\r\n\r\n\t\t\t// Site\r\n\t\t\t$this->Site->EditCustomAttributes = \"\";\r\n\t\t\tif (!$Security->IsAdmin() && $Security->IsLoggedIn() && !$this->UserIDAllow(\"search\")) { // Non system admin\r\n\t\t\t$sFilterWrk = \"\";\r\n\t\t\t$sFilterWrk = $GLOBALS[\"user\"]->AddUserIDFilter(\"\");\r\n\t\t\t$sSqlWrk = \"SELECT `site`, `site` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `user`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\tif ($sFilterWrk <> \"\") {\r\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t}\r\n\r\n\t\t\t// Call Lookup selecting\r\n\t\t\t$this->Lookup_Selecting($this->Site, $sWhereWrk);\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\r\n\t\t\t$this->Site->EditValue = $arwrk;\r\n\t\t\t} else {\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Site->FldTagValue(1), $this->Site->FldTagCaption(1) <> \"\" ? $this->Site->FldTagCaption(1) : $this->Site->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Site->FldTagValue(2), $this->Site->FldTagCaption(2) <> \"\" ? $this->Site->FldTagCaption(2) : $this->Site->FldTagValue(2));\r\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\r\n\t\t\t$this->Site->EditValue = $arwrk;\r\n\t\t\t}\r\n\r\n\t\t\t// Status\r\n\t\t\t$this->Status->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->Status->FldTagValue(1), $this->Status->FldTagCaption(1) <> \"\" ? $this->Status->FldTagCaption(1) : $this->Status->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->Status->FldTagValue(2), $this->Status->FldTagCaption(2) <> \"\" ? $this->Status->FldTagCaption(2) : $this->Status->FldTagValue(2));\r\n\t\t\t$this->Status->EditValue = $arwrk;\r\n\r\n\t\t\t// visit\r\n\t\t\t$this->visit->EditCustomAttributes = \"\";\r\n\t\t\t$arwrk = array();\r\n\t\t\t$arwrk[] = array($this->visit->FldTagValue(1), $this->visit->FldTagCaption(1) <> \"\" ? $this->visit->FldTagCaption(1) : $this->visit->FldTagValue(1));\r\n\t\t\t$arwrk[] = array($this->visit->FldTagValue(2), $this->visit->FldTagCaption(2) <> \"\" ? $this->visit->FldTagCaption(2) : $this->visit->FldTagValue(2));\r\n\t\t\t$this->visit->EditValue = $arwrk;\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language;\r\n\t\tglobal $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->ViewUrl = $this->GetViewUrl();\r\n\t\t$this->EditUrl = $this->GetEditUrl();\r\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\r\n\t\t$this->CopyUrl = $this->GetCopyUrl();\r\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\r\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// idfb_posts\r\n\t\t// id\r\n\t\t// created_time\r\n\t\t// actions\r\n\t\t// icon\r\n\t\t// is_published\r\n\t\t// message\r\n\t\t// link\r\n\t\t// object_id\r\n\t\t// picture\r\n\t\t// privacy\r\n\t\t// promotion_status\r\n\t\t// timeline_visibility\r\n\t\t// type\r\n\t\t// updated_time\r\n\t\t// caption\r\n\t\t// description\r\n\t\t// name\r\n\t\t// source\r\n\t\t// from\r\n\t\t// to\r\n\t\t// comments\r\n\t\t// id_grupo\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// idfb_posts\r\n\t\t\t$this->idfb_posts->ViewValue = $this->idfb_posts->CurrentValue;\r\n\t\t\t$this->idfb_posts->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$this->id->ViewValue = $this->id->CurrentValue;\r\n\t\t\t$this->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// created_time\r\n\t\t\t$this->created_time->ViewValue = $this->created_time->CurrentValue;\r\n\t\t\t$this->created_time->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// actions\r\n\t\t\t$this->actions->ViewValue = $this->actions->CurrentValue;\r\n\t\t\t$this->actions->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// icon\r\n\t\t\t$this->icon->ViewValue = $this->icon->CurrentValue;\r\n\t\t\t$this->icon->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// is_published\r\n\t\t\t$this->is_published->ViewValue = $this->is_published->CurrentValue;\r\n\t\t\t$this->is_published->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// message\r\n\t\t\t$this->message->ViewValue = $this->message->CurrentValue;\r\n\t\t\t$this->message->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// link\r\n\t\t\t$this->link->ViewValue = $this->link->CurrentValue;\r\n\t\t\t$this->link->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// object_id\r\n\t\t\t$this->object_id->ViewValue = $this->object_id->CurrentValue;\r\n\t\t\t$this->object_id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// picture\r\n\t\t\t$this->picture->ViewValue = $this->picture->CurrentValue;\r\n\t\t\t$this->picture->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// privacy\r\n\t\t\t$this->privacy->ViewValue = $this->privacy->CurrentValue;\r\n\t\t\t$this->privacy->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// promotion_status\r\n\t\t\t$this->promotion_status->ViewValue = $this->promotion_status->CurrentValue;\r\n\t\t\t$this->promotion_status->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// timeline_visibility\r\n\t\t\t$this->timeline_visibility->ViewValue = $this->timeline_visibility->CurrentValue;\r\n\t\t\t$this->timeline_visibility->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$this->type->ViewValue = $this->type->CurrentValue;\r\n\t\t\t$this->type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// updated_time\r\n\t\t\t$this->updated_time->ViewValue = $this->updated_time->CurrentValue;\r\n\t\t\t$this->updated_time->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// caption\r\n\t\t\t$this->caption->ViewValue = $this->caption->CurrentValue;\r\n\t\t\t$this->caption->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// description\r\n\t\t\t$this->description->ViewValue = $this->description->CurrentValue;\r\n\t\t\t$this->description->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$this->name->ViewValue = $this->name->CurrentValue;\r\n\t\t\t$this->name->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// source\r\n\t\t\t$this->source->ViewValue = $this->source->CurrentValue;\r\n\t\t\t$this->source->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// from\r\n\t\t\t$this->from->ViewValue = $this->from->CurrentValue;\r\n\t\t\t$this->from->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// to\r\n\t\t\t$this->to->ViewValue = $this->to->CurrentValue;\r\n\t\t\t$this->to->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id_grupo\r\n\t\t\t$this->id_grupo->ViewValue = $this->id_grupo->CurrentValue;\r\n\t\t\t$this->id_grupo->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// created_time\r\n\t\t\t$this->created_time->LinkCustomAttributes = \"\";\r\n\t\t\t$this->created_time->HrefValue = \"\";\r\n\t\t\t$this->created_time->TooltipValue = \"\";\r\n\r\n\t\t\t// message\r\n\t\t\t$this->message->LinkCustomAttributes = \"\";\r\n\t\t\t$this->message->HrefValue = \"\";\r\n\t\t\t$this->message->TooltipValue = \"\";\r\n\r\n\t\t\t// link\r\n\t\t\t$this->link->LinkCustomAttributes = \"\";\r\n\t\t\t$this->link->HrefValue = \"\";\r\n\t\t\t$this->link->TooltipValue = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$this->type->LinkCustomAttributes = \"\";\r\n\t\t\t$this->type->HrefValue = \"\";\r\n\t\t\t$this->type->TooltipValue = \"\";\r\n\r\n\t\t\t// caption\r\n\t\t\t$this->caption->LinkCustomAttributes = \"\";\r\n\t\t\t$this->caption->HrefValue = \"\";\r\n\t\t\t$this->caption->TooltipValue = \"\";\r\n\r\n\t\t\t// description\r\n\t\t\t$this->description->LinkCustomAttributes = \"\";\r\n\t\t\t$this->description->HrefValue = \"\";\r\n\t\t\t$this->description->TooltipValue = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$this->name->LinkCustomAttributes = \"\";\r\n\t\t\t$this->name->HrefValue = \"\";\r\n\t\t\t$this->name->TooltipValue = \"\";\r\n\r\n\t\t\t// source\r\n\t\t\t$this->source->LinkCustomAttributes = \"\";\r\n\t\t\t$this->source->HrefValue = \"\";\r\n\t\t\t$this->source->TooltipValue = \"\";\r\n\r\n\t\t\t// from\r\n\t\t\t$this->from->LinkCustomAttributes = \"\";\r\n\t\t\t$this->from->HrefValue = \"\";\r\n\t\t\t$this->from->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->late->FormValue == $this->late->CurrentValue && is_numeric(ew_StrToFloat($this->late->CurrentValue)))\n\t\t\t$this->late->CurrentValue = ew_StrToFloat($this->late->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->break->FormValue == $this->break->CurrentValue && is_numeric(ew_StrToFloat($this->break->CurrentValue)))\n\t\t\t$this->break->CurrentValue = ew_StrToFloat($this->break->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->break_ot->FormValue == $this->break_ot->CurrentValue && is_numeric(ew_StrToFloat($this->break_ot->CurrentValue)))\n\t\t\t$this->break_ot->CurrentValue = ew_StrToFloat($this->break_ot->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->early->FormValue == $this->early->CurrentValue && is_numeric(ew_StrToFloat($this->early->CurrentValue)))\n\t\t\t$this->early->CurrentValue = ew_StrToFloat($this->early->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->durasi->FormValue == $this->durasi->CurrentValue && is_numeric(ew_StrToFloat($this->durasi->CurrentValue)))\n\t\t\t$this->durasi->CurrentValue = ew_StrToFloat($this->durasi->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->jk_count_as->FormValue == $this->jk_count_as->CurrentValue && is_numeric(ew_StrToFloat($this->jk_count_as->CurrentValue)))\n\t\t\t$this->jk_count_as->CurrentValue = ew_StrToFloat($this->jk_count_as->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// pegawai_id\n\t\t// tgl_shift\n\t\t// khusus_lembur\n\t\t// khusus_extra\n\t\t// temp_id_auto\n\t\t// jdw_kerja_m_id\n\t\t// jk_id\n\t\t// jns_dok\n\t\t// izin_jenis_id\n\t\t// cuti_n_id\n\t\t// libur_umum\n\t\t// libur_rutin\n\t\t// jk_ot\n\t\t// scan_in\n\t\t// att_id_in\n\t\t// late_permission\n\t\t// late_minute\n\t\t// late\n\t\t// break_out\n\t\t// att_id_break1\n\t\t// break_in\n\t\t// att_id_break2\n\t\t// break_minute\n\t\t// break\n\t\t// break_ot_minute\n\t\t// break_ot\n\t\t// early_permission\n\t\t// early_minute\n\t\t// early\n\t\t// scan_out\n\t\t// att_id_out\n\t\t// durasi_minute\n\t\t// durasi\n\t\t// durasi_eot_minute\n\t\t// jk_count_as\n\t\t// status_jk\n\t\t// keterangan\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// pegawai_id\n\t\t$this->pegawai_id->ViewValue = $this->pegawai_id->CurrentValue;\n\t\t$this->pegawai_id->ViewCustomAttributes = \"\";\n\n\t\t// tgl_shift\n\t\t$this->tgl_shift->ViewValue = $this->tgl_shift->CurrentValue;\n\t\t$this->tgl_shift->ViewValue = ew_FormatDateTime($this->tgl_shift->ViewValue, 0);\n\t\t$this->tgl_shift->ViewCustomAttributes = \"\";\n\n\t\t// khusus_lembur\n\t\t$this->khusus_lembur->ViewValue = $this->khusus_lembur->CurrentValue;\n\t\t$this->khusus_lembur->ViewCustomAttributes = \"\";\n\n\t\t// khusus_extra\n\t\t$this->khusus_extra->ViewValue = $this->khusus_extra->CurrentValue;\n\t\t$this->khusus_extra->ViewCustomAttributes = \"\";\n\n\t\t// temp_id_auto\n\t\t$this->temp_id_auto->ViewValue = $this->temp_id_auto->CurrentValue;\n\t\t$this->temp_id_auto->ViewCustomAttributes = \"\";\n\n\t\t// jdw_kerja_m_id\n\t\t$this->jdw_kerja_m_id->ViewValue = $this->jdw_kerja_m_id->CurrentValue;\n\t\t$this->jdw_kerja_m_id->ViewCustomAttributes = \"\";\n\n\t\t// jk_id\n\t\t$this->jk_id->ViewValue = $this->jk_id->CurrentValue;\n\t\t$this->jk_id->ViewCustomAttributes = \"\";\n\n\t\t// jns_dok\n\t\t$this->jns_dok->ViewValue = $this->jns_dok->CurrentValue;\n\t\t$this->jns_dok->ViewCustomAttributes = \"\";\n\n\t\t// izin_jenis_id\n\t\t$this->izin_jenis_id->ViewValue = $this->izin_jenis_id->CurrentValue;\n\t\t$this->izin_jenis_id->ViewCustomAttributes = \"\";\n\n\t\t// cuti_n_id\n\t\t$this->cuti_n_id->ViewValue = $this->cuti_n_id->CurrentValue;\n\t\t$this->cuti_n_id->ViewCustomAttributes = \"\";\n\n\t\t// libur_umum\n\t\t$this->libur_umum->ViewValue = $this->libur_umum->CurrentValue;\n\t\t$this->libur_umum->ViewCustomAttributes = \"\";\n\n\t\t// libur_rutin\n\t\t$this->libur_rutin->ViewValue = $this->libur_rutin->CurrentValue;\n\t\t$this->libur_rutin->ViewCustomAttributes = \"\";\n\n\t\t// jk_ot\n\t\t$this->jk_ot->ViewValue = $this->jk_ot->CurrentValue;\n\t\t$this->jk_ot->ViewCustomAttributes = \"\";\n\n\t\t// scan_in\n\t\t$this->scan_in->ViewValue = $this->scan_in->CurrentValue;\n\t\t$this->scan_in->ViewValue = ew_FormatDateTime($this->scan_in->ViewValue, 0);\n\t\t$this->scan_in->ViewCustomAttributes = \"\";\n\n\t\t// att_id_in\n\t\t$this->att_id_in->ViewValue = $this->att_id_in->CurrentValue;\n\t\t$this->att_id_in->ViewCustomAttributes = \"\";\n\n\t\t// late_permission\n\t\t$this->late_permission->ViewValue = $this->late_permission->CurrentValue;\n\t\t$this->late_permission->ViewCustomAttributes = \"\";\n\n\t\t// late_minute\n\t\t$this->late_minute->ViewValue = $this->late_minute->CurrentValue;\n\t\t$this->late_minute->ViewCustomAttributes = \"\";\n\n\t\t// late\n\t\t$this->late->ViewValue = $this->late->CurrentValue;\n\t\t$this->late->ViewCustomAttributes = \"\";\n\n\t\t// break_out\n\t\t$this->break_out->ViewValue = $this->break_out->CurrentValue;\n\t\t$this->break_out->ViewValue = ew_FormatDateTime($this->break_out->ViewValue, 0);\n\t\t$this->break_out->ViewCustomAttributes = \"\";\n\n\t\t// att_id_break1\n\t\t$this->att_id_break1->ViewValue = $this->att_id_break1->CurrentValue;\n\t\t$this->att_id_break1->ViewCustomAttributes = \"\";\n\n\t\t// break_in\n\t\t$this->break_in->ViewValue = $this->break_in->CurrentValue;\n\t\t$this->break_in->ViewValue = ew_FormatDateTime($this->break_in->ViewValue, 0);\n\t\t$this->break_in->ViewCustomAttributes = \"\";\n\n\t\t// att_id_break2\n\t\t$this->att_id_break2->ViewValue = $this->att_id_break2->CurrentValue;\n\t\t$this->att_id_break2->ViewCustomAttributes = \"\";\n\n\t\t// break_minute\n\t\t$this->break_minute->ViewValue = $this->break_minute->CurrentValue;\n\t\t$this->break_minute->ViewCustomAttributes = \"\";\n\n\t\t// break\n\t\t$this->break->ViewValue = $this->break->CurrentValue;\n\t\t$this->break->ViewCustomAttributes = \"\";\n\n\t\t// break_ot_minute\n\t\t$this->break_ot_minute->ViewValue = $this->break_ot_minute->CurrentValue;\n\t\t$this->break_ot_minute->ViewCustomAttributes = \"\";\n\n\t\t// break_ot\n\t\t$this->break_ot->ViewValue = $this->break_ot->CurrentValue;\n\t\t$this->break_ot->ViewCustomAttributes = \"\";\n\n\t\t// early_permission\n\t\t$this->early_permission->ViewValue = $this->early_permission->CurrentValue;\n\t\t$this->early_permission->ViewCustomAttributes = \"\";\n\n\t\t// early_minute\n\t\t$this->early_minute->ViewValue = $this->early_minute->CurrentValue;\n\t\t$this->early_minute->ViewCustomAttributes = \"\";\n\n\t\t// early\n\t\t$this->early->ViewValue = $this->early->CurrentValue;\n\t\t$this->early->ViewCustomAttributes = \"\";\n\n\t\t// scan_out\n\t\t$this->scan_out->ViewValue = $this->scan_out->CurrentValue;\n\t\t$this->scan_out->ViewValue = ew_FormatDateTime($this->scan_out->ViewValue, 0);\n\t\t$this->scan_out->ViewCustomAttributes = \"\";\n\n\t\t// att_id_out\n\t\t$this->att_id_out->ViewValue = $this->att_id_out->CurrentValue;\n\t\t$this->att_id_out->ViewCustomAttributes = \"\";\n\n\t\t// durasi_minute\n\t\t$this->durasi_minute->ViewValue = $this->durasi_minute->CurrentValue;\n\t\t$this->durasi_minute->ViewCustomAttributes = \"\";\n\n\t\t// durasi\n\t\t$this->durasi->ViewValue = $this->durasi->CurrentValue;\n\t\t$this->durasi->ViewCustomAttributes = \"\";\n\n\t\t// durasi_eot_minute\n\t\t$this->durasi_eot_minute->ViewValue = $this->durasi_eot_minute->CurrentValue;\n\t\t$this->durasi_eot_minute->ViewCustomAttributes = \"\";\n\n\t\t// jk_count_as\n\t\t$this->jk_count_as->ViewValue = $this->jk_count_as->CurrentValue;\n\t\t$this->jk_count_as->ViewCustomAttributes = \"\";\n\n\t\t// status_jk\n\t\t$this->status_jk->ViewValue = $this->status_jk->CurrentValue;\n\t\t$this->status_jk->ViewCustomAttributes = \"\";\n\n\t\t\t// pegawai_id\n\t\t\t$this->pegawai_id->LinkCustomAttributes = \"\";\n\t\t\t$this->pegawai_id->HrefValue = \"\";\n\t\t\t$this->pegawai_id->TooltipValue = \"\";\n\n\t\t\t// tgl_shift\n\t\t\t$this->tgl_shift->LinkCustomAttributes = \"\";\n\t\t\t$this->tgl_shift->HrefValue = \"\";\n\t\t\t$this->tgl_shift->TooltipValue = \"\";\n\n\t\t\t// khusus_lembur\n\t\t\t$this->khusus_lembur->LinkCustomAttributes = \"\";\n\t\t\t$this->khusus_lembur->HrefValue = \"\";\n\t\t\t$this->khusus_lembur->TooltipValue = \"\";\n\n\t\t\t// khusus_extra\n\t\t\t$this->khusus_extra->LinkCustomAttributes = \"\";\n\t\t\t$this->khusus_extra->HrefValue = \"\";\n\t\t\t$this->khusus_extra->TooltipValue = \"\";\n\n\t\t\t// temp_id_auto\n\t\t\t$this->temp_id_auto->LinkCustomAttributes = \"\";\n\t\t\t$this->temp_id_auto->HrefValue = \"\";\n\t\t\t$this->temp_id_auto->TooltipValue = \"\";\n\n\t\t\t// jdw_kerja_m_id\n\t\t\t$this->jdw_kerja_m_id->LinkCustomAttributes = \"\";\n\t\t\t$this->jdw_kerja_m_id->HrefValue = \"\";\n\t\t\t$this->jdw_kerja_m_id->TooltipValue = \"\";\n\n\t\t\t// jk_id\n\t\t\t$this->jk_id->LinkCustomAttributes = \"\";\n\t\t\t$this->jk_id->HrefValue = \"\";\n\t\t\t$this->jk_id->TooltipValue = \"\";\n\n\t\t\t// jns_dok\n\t\t\t$this->jns_dok->LinkCustomAttributes = \"\";\n\t\t\t$this->jns_dok->HrefValue = \"\";\n\t\t\t$this->jns_dok->TooltipValue = \"\";\n\n\t\t\t// izin_jenis_id\n\t\t\t$this->izin_jenis_id->LinkCustomAttributes = \"\";\n\t\t\t$this->izin_jenis_id->HrefValue = \"\";\n\t\t\t$this->izin_jenis_id->TooltipValue = \"\";\n\n\t\t\t// cuti_n_id\n\t\t\t$this->cuti_n_id->LinkCustomAttributes = \"\";\n\t\t\t$this->cuti_n_id->HrefValue = \"\";\n\t\t\t$this->cuti_n_id->TooltipValue = \"\";\n\n\t\t\t// libur_umum\n\t\t\t$this->libur_umum->LinkCustomAttributes = \"\";\n\t\t\t$this->libur_umum->HrefValue = \"\";\n\t\t\t$this->libur_umum->TooltipValue = \"\";\n\n\t\t\t// libur_rutin\n\t\t\t$this->libur_rutin->LinkCustomAttributes = \"\";\n\t\t\t$this->libur_rutin->HrefValue = \"\";\n\t\t\t$this->libur_rutin->TooltipValue = \"\";\n\n\t\t\t// jk_ot\n\t\t\t$this->jk_ot->LinkCustomAttributes = \"\";\n\t\t\t$this->jk_ot->HrefValue = \"\";\n\t\t\t$this->jk_ot->TooltipValue = \"\";\n\n\t\t\t// scan_in\n\t\t\t$this->scan_in->LinkCustomAttributes = \"\";\n\t\t\t$this->scan_in->HrefValue = \"\";\n\t\t\t$this->scan_in->TooltipValue = \"\";\n\n\t\t\t// att_id_in\n\t\t\t$this->att_id_in->LinkCustomAttributes = \"\";\n\t\t\t$this->att_id_in->HrefValue = \"\";\n\t\t\t$this->att_id_in->TooltipValue = \"\";\n\n\t\t\t// late_permission\n\t\t\t$this->late_permission->LinkCustomAttributes = \"\";\n\t\t\t$this->late_permission->HrefValue = \"\";\n\t\t\t$this->late_permission->TooltipValue = \"\";\n\n\t\t\t// late_minute\n\t\t\t$this->late_minute->LinkCustomAttributes = \"\";\n\t\t\t$this->late_minute->HrefValue = \"\";\n\t\t\t$this->late_minute->TooltipValue = \"\";\n\n\t\t\t// late\n\t\t\t$this->late->LinkCustomAttributes = \"\";\n\t\t\t$this->late->HrefValue = \"\";\n\t\t\t$this->late->TooltipValue = \"\";\n\n\t\t\t// break_out\n\t\t\t$this->break_out->LinkCustomAttributes = \"\";\n\t\t\t$this->break_out->HrefValue = \"\";\n\t\t\t$this->break_out->TooltipValue = \"\";\n\n\t\t\t// att_id_break1\n\t\t\t$this->att_id_break1->LinkCustomAttributes = \"\";\n\t\t\t$this->att_id_break1->HrefValue = \"\";\n\t\t\t$this->att_id_break1->TooltipValue = \"\";\n\n\t\t\t// break_in\n\t\t\t$this->break_in->LinkCustomAttributes = \"\";\n\t\t\t$this->break_in->HrefValue = \"\";\n\t\t\t$this->break_in->TooltipValue = \"\";\n\n\t\t\t// att_id_break2\n\t\t\t$this->att_id_break2->LinkCustomAttributes = \"\";\n\t\t\t$this->att_id_break2->HrefValue = \"\";\n\t\t\t$this->att_id_break2->TooltipValue = \"\";\n\n\t\t\t// break_minute\n\t\t\t$this->break_minute->LinkCustomAttributes = \"\";\n\t\t\t$this->break_minute->HrefValue = \"\";\n\t\t\t$this->break_minute->TooltipValue = \"\";\n\n\t\t\t// break\n\t\t\t$this->break->LinkCustomAttributes = \"\";\n\t\t\t$this->break->HrefValue = \"\";\n\t\t\t$this->break->TooltipValue = \"\";\n\n\t\t\t// break_ot_minute\n\t\t\t$this->break_ot_minute->LinkCustomAttributes = \"\";\n\t\t\t$this->break_ot_minute->HrefValue = \"\";\n\t\t\t$this->break_ot_minute->TooltipValue = \"\";\n\n\t\t\t// break_ot\n\t\t\t$this->break_ot->LinkCustomAttributes = \"\";\n\t\t\t$this->break_ot->HrefValue = \"\";\n\t\t\t$this->break_ot->TooltipValue = \"\";\n\n\t\t\t// early_permission\n\t\t\t$this->early_permission->LinkCustomAttributes = \"\";\n\t\t\t$this->early_permission->HrefValue = \"\";\n\t\t\t$this->early_permission->TooltipValue = \"\";\n\n\t\t\t// early_minute\n\t\t\t$this->early_minute->LinkCustomAttributes = \"\";\n\t\t\t$this->early_minute->HrefValue = \"\";\n\t\t\t$this->early_minute->TooltipValue = \"\";\n\n\t\t\t// early\n\t\t\t$this->early->LinkCustomAttributes = \"\";\n\t\t\t$this->early->HrefValue = \"\";\n\t\t\t$this->early->TooltipValue = \"\";\n\n\t\t\t// scan_out\n\t\t\t$this->scan_out->LinkCustomAttributes = \"\";\n\t\t\t$this->scan_out->HrefValue = \"\";\n\t\t\t$this->scan_out->TooltipValue = \"\";\n\n\t\t\t// att_id_out\n\t\t\t$this->att_id_out->LinkCustomAttributes = \"\";\n\t\t\t$this->att_id_out->HrefValue = \"\";\n\t\t\t$this->att_id_out->TooltipValue = \"\";\n\n\t\t\t// durasi_minute\n\t\t\t$this->durasi_minute->LinkCustomAttributes = \"\";\n\t\t\t$this->durasi_minute->HrefValue = \"\";\n\t\t\t$this->durasi_minute->TooltipValue = \"\";\n\n\t\t\t// durasi\n\t\t\t$this->durasi->LinkCustomAttributes = \"\";\n\t\t\t$this->durasi->HrefValue = \"\";\n\t\t\t$this->durasi->TooltipValue = \"\";\n\n\t\t\t// durasi_eot_minute\n\t\t\t$this->durasi_eot_minute->LinkCustomAttributes = \"\";\n\t\t\t$this->durasi_eot_minute->HrefValue = \"\";\n\t\t\t$this->durasi_eot_minute->TooltipValue = \"\";\n\n\t\t\t// jk_count_as\n\t\t\t$this->jk_count_as->LinkCustomAttributes = \"\";\n\t\t\t$this->jk_count_as->HrefValue = \"\";\n\t\t\t$this->jk_count_as->TooltipValue = \"\";\n\n\t\t\t// status_jk\n\t\t\t$this->status_jk->LinkCustomAttributes = \"\";\n\t\t\t$this->status_jk->HrefValue = \"\";\n\t\t\t$this->status_jk->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}" ]
[ "0.7744282", "0.76404923", "0.7535198", "0.740563", "0.72201085", "0.69143075", "0.69141454", "0.6909055", "0.6802455", "0.6787738", "0.6735765", "0.6705344", "0.6703954", "0.6693788", "0.66781545", "0.6651749", "0.6622414", "0.6595472", "0.65935457", "0.658131", "0.65428925", "0.65411323", "0.65336746", "0.65174985", "0.65171474", "0.6505016", "0.6478511", "0.6469597", "0.6446511", "0.6442718" ]
0.7675142
1
Write Audit Trail (edit page)
function WriteAuditTrailOnEdit(&$rsold, &$rsnew) { global $Language; if (!$this->AuditTrailOnEdit) return; $table = 't_gaji_detail'; // Get key value $key = ""; if ($key <> "") $key .= $GLOBALS["EW_COMPOSITE_KEY_SEPARATOR"]; $key .= $rsold['gjd_id']; // Write Audit Trail $dt = ew_StdCurrentDateTime(); $id = ew_ScriptName(); $usr = CurrentUserName(); foreach (array_keys($rsnew) as $fldname) { if (array_key_exists($fldname, $this->fields) && array_key_exists($fldname, $rsold) && $this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields if ($this->fields[$fldname]->FldDataType == EW_DATATYPE_DATE) { // DateTime field $modified = (ew_FormatDateTime($rsold[$fldname], 0) <> ew_FormatDateTime($rsnew[$fldname], 0)); } else { $modified = !ew_CompareValue($rsold[$fldname], $rsnew[$fldname]); } if ($modified) { if ($this->fields[$fldname]->FldHtmlTag == "PASSWORD") { // Password Field $oldvalue = $Language->Phrase("PasswordMask"); $newvalue = $Language->Phrase("PasswordMask"); } elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) { // Memo field if (EW_AUDIT_TRAIL_TO_DATABASE) { $oldvalue = $rsold[$fldname]; $newvalue = $rsnew[$fldname]; } else { $oldvalue = "[MEMO]"; $newvalue = "[MEMO]"; } } elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) { // XML field $oldvalue = "[XML]"; $newvalue = "[XML]"; } else { $oldvalue = $rsold[$fldname]; $newvalue = $rsnew[$fldname]; } ew_WriteAuditTrail("log", $dt, $id, $usr, "U", $table, $fldname, $key, $oldvalue, $newvalue); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WriteAuditTrailOnEdit(&$rsold, &$rsnew) {\r\n\t\tglobal $Language;\r\n\t\tif (!$this->AuditTrailOnEdit) return;\r\n\t\t$table = 'pase_establecimiento';\r\n\r\n\t\t// Get key value\r\n\t\t$key = \"\";\r\n\t\tif ($key <> \"\") $key .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\r\n\t\t$key .= $rsold['Id_Pase'];\r\n\r\n\t\t// Write Audit Trail\r\n\t\t$dt = ew_StdCurrentDateTime();\r\n\t\t$id = ew_ScriptName();\r\n\t\t$usr = CurrentUserID();\r\n\t\tforeach (array_keys($rsnew) as $fldname) {\r\n\t\t\tif ($this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields\r\n\t\t\t\tif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_DATE) { // DateTime field\r\n\t\t\t\t\t$modified = (ew_FormatDateTime($rsold[$fldname], 0) <> ew_FormatDateTime($rsnew[$fldname], 0));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$modified = !ew_CompareValue($rsold[$fldname], $rsnew[$fldname]);\r\n\t\t\t\t}\r\n\t\t\t\tif ($modified) {\r\n\t\t\t\t\tif ($this->fields[$fldname]->FldHtmlTag == \"PASSWORD\") { // Password Field\r\n\t\t\t\t\t\t$oldvalue = $Language->Phrase(\"PasswordMask\");\r\n\t\t\t\t\t\t$newvalue = $Language->Phrase(\"PasswordMask\");\r\n\t\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) { // Memo field\r\n\t\t\t\t\t\tif (EW_AUDIT_TRAIL_TO_DATABASE) {\r\n\t\t\t\t\t\t\t$oldvalue = $rsold[$fldname];\r\n\t\t\t\t\t\t\t$newvalue = $rsnew[$fldname];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$oldvalue = \"[MEMO]\";\r\n\t\t\t\t\t\t\t$newvalue = \"[MEMO]\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) { // XML field\r\n\t\t\t\t\t\t$oldvalue = \"[XML]\";\r\n\t\t\t\t\t\t$newvalue = \"[XML]\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$oldvalue = $rsold[$fldname];\r\n\t\t\t\t\t\t$newvalue = $rsnew[$fldname];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tew_WriteAuditTrail(\"log\", $dt, $id, $usr, \"U\", $table, $fldname, $key, $oldvalue, $newvalue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function WriteAuditTrailOnEdit(&$rsold, &$rsnew) {\n\t\tif (!$this->AuditTrailOnEdit) return;\n\t\t$table = 'user';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t$key .= $rsold['id'];\n\n\t\t// Write Audit Trail\n\t\t$dt = ew_StdCurrentDateTime();\n\t\t$id = ew_ScriptName();\n\t $usr = CurrentUserName();\n\t\tforeach (array_keys($rsnew) as $fldname) {\n\t\t\tif ($this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields\n\t\t\t\tif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_DATE) { // DateTime field\n\t\t\t\t\t$modified = (ew_FormatDateTime($rsold[$fldname], 0) <> ew_FormatDateTime($rsnew[$fldname], 0));\n\t\t\t\t} else {\n\t\t\t\t\t$modified = !ew_CompareValue($rsold[$fldname], $rsnew[$fldname]);\n\t\t\t\t}\n\t\t\t\tif ($modified) {\n\t\t\t\t\tif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) { // Memo field\n\t\t\t\t\t\tif (EW_AUDIT_TRAIL_TO_DATABASE) {\n\t\t\t\t\t\t\t$oldvalue = $rsold[$fldname];\n\t\t\t\t\t\t\t$newvalue = $rsnew[$fldname];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$oldvalue = \"[MEMO]\";\n\t\t\t\t\t\t\t$newvalue = \"[MEMO]\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) { // XML field\n\t\t\t\t\t\t$oldvalue = \"[XML]\";\n\t\t\t\t\t\t$newvalue = \"[XML]\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$oldvalue = $rsold[$fldname];\n\t\t\t\t\t\t$newvalue = $rsnew[$fldname];\n\t\t\t\t\t}\n\t\t\t\t\tew_WriteAuditTrail(\"log\", $dt, $id, $usr, \"U\", $table, $fldname, $key, $oldvalue, $newvalue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function WriteAuditTrailOnEdit(&$rsold, &$rsnew) {\r\n\t\tglobal $Language;\r\n\t\tif (!$this->AuditTrailOnEdit) return;\r\n\t\t$table = 'servidor_escolar';\r\n\r\n\t\t// Get key value\r\n\t\t$key = \"\";\r\n\t\tif ($key <> \"\") $key .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\r\n\t\t$key .= $rsold['Cue'];\r\n\r\n\t\t// Write Audit Trail\r\n\t\t$dt = ew_StdCurrentDateTime();\r\n\t\t$id = ew_ScriptName();\r\n\t\t$usr = CurrentUserID();\r\n\t\tforeach (array_keys($rsnew) as $fldname) {\r\n\t\t\tif ($this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields\r\n\t\t\t\tif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_DATE) { // DateTime field\r\n\t\t\t\t\t$modified = (ew_FormatDateTime($rsold[$fldname], 0) <> ew_FormatDateTime($rsnew[$fldname], 0));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$modified = !ew_CompareValue($rsold[$fldname], $rsnew[$fldname]);\r\n\t\t\t\t}\r\n\t\t\t\tif ($modified) {\r\n\t\t\t\t\tif ($this->fields[$fldname]->FldHtmlTag == \"PASSWORD\") { // Password Field\r\n\t\t\t\t\t\t$oldvalue = $Language->Phrase(\"PasswordMask\");\r\n\t\t\t\t\t\t$newvalue = $Language->Phrase(\"PasswordMask\");\r\n\t\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) { // Memo field\r\n\t\t\t\t\t\tif (EW_AUDIT_TRAIL_TO_DATABASE) {\r\n\t\t\t\t\t\t\t$oldvalue = $rsold[$fldname];\r\n\t\t\t\t\t\t\t$newvalue = $rsnew[$fldname];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$oldvalue = \"[MEMO]\";\r\n\t\t\t\t\t\t\t$newvalue = \"[MEMO]\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) { // XML field\r\n\t\t\t\t\t\t$oldvalue = \"[XML]\";\r\n\t\t\t\t\t\t$newvalue = \"[XML]\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$oldvalue = $rsold[$fldname];\r\n\t\t\t\t\t\t$newvalue = $rsnew[$fldname];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tew_WriteAuditTrail(\"log\", $dt, $id, $usr, \"U\", $table, $fldname, $key, $oldvalue, $newvalue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function update_audit_trail()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::update($this->id, 'siis', $parameter_array);\n }", "function insert_audit_trail()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::insert('siis', $parameter_array);\n }", "function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $Language;\n\t\tif (!$this->AuditTrailOnAdd) return;\n\t\t$table = 't_gaji_detail';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t$key .= $rs['gjd_id'];\n\n\t\t// Write Audit Trail\n\t\t$dt = ew_StdCurrentDateTime();\n\t\t$id = ew_ScriptName();\n\t\t$usr = CurrentUserName();\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif (array_key_exists($fldname, $this->fields) && $this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields\n\t\t\t\tif ($this->fields[$fldname]->FldHtmlTag == \"PASSWORD\") {\n\t\t\t\t\t$newvalue = $Language->Phrase(\"PasswordMask\"); // Password Field\n\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) {\n\t\t\t\t\tif (EW_AUDIT_TRAIL_TO_DATABASE)\n\t\t\t\t\t\t$newvalue = $rs[$fldname];\n\t\t\t\t\telse\n\t\t\t\t\t\t$newvalue = \"[MEMO]\"; // Memo Field\n\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) {\n\t\t\t\t\t$newvalue = \"[XML]\"; // XML Field\n\t\t\t\t} else {\n\t\t\t\t\t$newvalue = $rs[$fldname];\n\t\t\t\t}\n\t\t\t\tew_WriteAuditTrail(\"log\", $dt, $id, $usr, \"A\", $table, $fldname, $key, \"\", $newvalue);\n\t\t\t}\n\t\t}\n\t}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'mst_vendor';\n\n\t\t// Write Audit Trail\n\t\t$filePfx = \"log\";\n\t\t$curDate = date(\"Y/m/d\");\n\t\t$curTime = date(\"H:i:s\");\n\t\t$id = ew_ScriptName();\n\t $curUser = CurrentUserName();\n\t\t$action = $typ;\n\t\tew_WriteAuditTrail($filePfx, $curDate, $curTime, $id, $curUser, $action, $table, \"\", \"\", \"\", \"\");\n\t}", "public function actionTrail()\n {\n $searchModel = new AuditTrailSearch;\n $dataProvider = $searchModel->search(Yii::$app->request->get());\n\n return $this->render('trail', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "function WriteAuditTrailOnDelete(&$rs) {\n\t\tglobal $tbl_profile;\n\t\t$table = 'tbl_profile';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\")\n\t\t\t$key .= UP_COMPOSITE_KEY_SEPARATOR;\n\t\t$key .= $rs['facultyprofile_ID'];\n\n\t\t// Write Audit Trail\n\t\t$dt = up_StdCurrentDateTime();\n\t\t$id = up_ScriptName();\n\t $curUser = CurrentUserID();\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif (array_key_exists($fldname, $tbl_profile->fields) && $tbl_profile->fields[$fldname]->FldDataType <> UP_DATATYPE_BLOB) { // Ignore BLOB fields\n\t\t\t\tif ($tbl_profile->fields[$fldname]->FldDataType == UP_DATATYPE_MEMO) {\n\t\t\t\t\tif (UP_AUDIT_TRAIL_TO_DATABASE)\n\t\t\t\t\t\t$oldvalue = $rs[$fldname];\n\t\t\t\t\telse\n\t\t\t\t\t\t$oldvalue = \"[MEMO]\"; // Memo field\n\t\t\t\t} elseif ($tbl_profile->fields[$fldname]->FldDataType == UP_DATATYPE_XML) {\n\t\t\t\t\t$oldvalue = \"[XML]\"; // XML field\n\t\t\t\t} else {\n\t\t\t\t\t$oldvalue = $rs[$fldname];\n\t\t\t\t}\n\t\t\t\tup_WriteAuditTrail(\"log\", $dt, $id, $curUser, \"D\", $table, $fldname, $key, $oldvalue, \"\");\n\t\t\t}\n\t\t}\n\t}", "function WriteAuditTrailDummy($typ) {\r\n\t\t$table = 'tutores';\r\n\t\t$usr = CurrentUserID();\r\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\r\n\t}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 't_gaji_detail';\n\t\t$usr = CurrentUserName();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "function WriteAuditTrailDummy($typ) {\r\n\t\t$table = 'pase_establecimiento';\r\n\t\t$usr = CurrentUserID();\r\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\r\n\t}", "function WriteAuditTrailOnDelete(&$rs) {\n\t\tglobal $Language;\n\t\tif (!$this->AuditTrailOnDelete) return;\n\t\t$table = 't_gaji_detail';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\")\n\t\t\t$key .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t$key .= $rs['gjd_id'];\n\n\t\t// Write Audit Trail\n\t\t$dt = ew_StdCurrentDateTime();\n\t\t$id = ew_ScriptName();\n\t\t$curUser = CurrentUserName();\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif (array_key_exists($fldname, $this->fields) && $this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields\n\t\t\t\tif ($this->fields[$fldname]->FldHtmlTag == \"PASSWORD\") {\n\t\t\t\t\t$oldvalue = $Language->Phrase(\"PasswordMask\"); // Password Field\n\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) {\n\t\t\t\t\tif (EW_AUDIT_TRAIL_TO_DATABASE)\n\t\t\t\t\t\t$oldvalue = $rs[$fldname];\n\t\t\t\t\telse\n\t\t\t\t\t\t$oldvalue = \"[MEMO]\"; // Memo field\n\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) {\n\t\t\t\t\t$oldvalue = \"[XML]\"; // XML field\n\t\t\t\t} else {\n\t\t\t\t\t$oldvalue = $rs[$fldname];\n\t\t\t\t}\n\t\t\t\tew_WriteAuditTrail(\"log\", $dt, $id, $curUser, \"D\", $table, $fldname, $key, $oldvalue, \"\");\n\t\t\t}\n\t\t}\n\t}", "function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $mst_vendor;\n\t\t$table = 'mst_vendor';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$key .= $rs['kode'];\n\n\t\t// Write Audit Trail\n\t\t$filePfx = \"log\";\n\t\t$curDate = date(\"Y/m/d\");\n\t\t$curTime = date(\"H:i:s\");\n\t\t$id = ew_ScriptName();\n\t $curUser = CurrentUserName();\n\t\t$action = \"A\";\n\t\t$oldvalue = \"\";\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif ($mst_vendor->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore Blob Field\n\t\t\t\t$newvalue = ($mst_vendor->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) ? \"<MEMO>\" : $rs[$fldname]; // Memo Field\n\t\t\t\tew_WriteAuditTrail($filePfx, $curDate, $curTime, $id, $curUser, $action, $table, $fldname, $key, $oldvalue, $newvalue);\n\t\t\t}\n\t\t}\n\t}", "function EventLog($page,$action,$orignal_value,$new_value)\n{\n\t\t$email = $_SESSION['user_email'];\n\t\t$ipaddress = getUserIP();\n\t\t\n\t\t$data = sprintf(\"%s,%s,%s,%s,%s\" . PHP_EOL, $ipaddress,date(\"F j Y g:i a\"), $email, $page, $action);\n\t\t\n\t\t//file_put_contents($_SERVER['DOCUMENT_ROOT'] .'/log.txt', $data, FILE_APPEND);\t\t\n\t\tfile_put_contents('log.txt', $data, FILE_APPEND);\t\t\t\n\t\t\n\t\t\n}", "function WriteAuditTrailDummy($typ) {\r\n\t\t$table = 'servidor_escolar';\r\n\t\t$usr = CurrentUserID();\r\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\r\n\t}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'user';\n\t $usr = CurrentUserName();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "public function editLog($logId,$page) {\n\n $data['page'] = $page;\n\n if (!$this->session->userType) {\n redirect('/');\n }\n\n // GET ALL LAB NAMES WITH ID\n $data['labs'] = $this->labs_model->get_all_labs();\n // GET ALL COURSES\n $data['courses'] = $this->labs_model->get_all_courses();\n // GET ALL PURPOSES\n $data['purposes'] = $this->labs_model->get_all_purposes();\n\n \n $data['log'] = $this->logs_model->get_log($logId);\n $data['log']['checkIn'] = date_format(date_create($data['log']['checkIn']), \"Y-m-d\\TH:i\");\n if (isset($data['log']['checkOut'])) {\n $data['log']['checkOut'] = date_format(date_create($data['log']['checkOut']), \"Y-m-d\\TH:i\"); \n }\n \n $this->load->view('templates/header');\n $this->load->view('templates/navigation');\n $this->load->view('logs/edit_log', $data);\n $this->load->view('templates/footer');\n }", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'tbl_profile';\n\t $usr = CurrentUserID();\n\t\tup_WriteAuditTrail(\"log\", up_StdCurrentDateTime(), up_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "public function audit($itemid, $itemname, $action)\n\t{\n\t\t#$userid = get_userid();\n\t\t#$username = $_SESSION[\"cms_admin_username\"];\n\t\taudit($itemid, $itemname, $action);\n\t}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'scholarship_package';\n\t $usr = CurrentUserID();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "function audit_log()\n\t{\n\t\tif($this->session->userdata('logged_in')==\"\")\n\t\t\theader(\"Location: \".$this->config->base_url().\"Login\");\n\t\t\t$this->cache_update();\n\t\t\t$this->check_privilege(14);\n\t\t//mandatory\n\t\t$this->load->driver('cache',array('adapter' => 'file'));\n\t\t$u_type = array('var'=>$this->cache->get('Active_status'.$this->session->userdata('loginid'))['user_type_id_fk']);\n\t\t$this->load->model('profile_model');\n\t\t$noti = array('meeting'=>$this->profile_model->meeting_notification());\n\t\t$u_type['notification'] = $noti;\n\t\t$u_type['noti1']=$this->profile_model->custom_notification();\n\t\t$this->load->view('dashboard/navbar',$u_type);\n\t\t$da = $this->profile_model->get_profile_info($this->session->userdata('uid'));\n\t\t$this->load->view('dashboard/sidebar',$da);\n\t// ends here\n\t\t$this->load->model('Sup_Admin');\n\t\t$this->load->model('Crud_model');\n\t\t$data['audit']=$this->Sup_Admin->get_user_details();\n\t\t$data['login_as']=array();\n\t\tforeach ($data['audit'] as $key) \n\t\t{\n\t\t\tarray_push($data['login_as'],$this->Sup_Admin->get_log_id($key['login_id_fk']));\n\t\t}\n\t\t$this->load->view('audit_view',$data);\n\t\t$this->db->trans_off();\n\t \t$this->db->trans_strict(FALSE);\n\t\t$this->db->trans_start();\n\t\t$this->Crud_model->audit_upload($this->session->userdata('loginid'),\n\t\t\t\t\t\t\t current_url(),\n\t\t\t\t\t\t\t 'Audit Log Page Visited',\n\t\t\t\t\t\t\t 'Custom message here');\n\t\t$this->db->trans_complete();\n\t\t$this->load->view('dashboard/footer');\n\n\t}", "private function audit($operation, $details) {\r\n $columns = array(\r\n \"#timestamp\" => \"STR_TO_DATE('\" . date('d/m/Y H:i:s') . \"','%d/%m/%Y %H:%i:%s')\",\r\n \"username\" => $_SESSION['_ebb_username'],\r\n \"operation\" => $operation,\r\n \"details\" => $details\r\n );\r\n\r\n $this->database->insert(\"tb_audit\", $columns);\r\n }", "function insert_audit_trail($params=array()) {\n\t\tif (empty($params)) return false;\n\t\t$required_params = array('asset', 'asset_id', 'action_taken');\n\t\tforeach ($required_params as $param) {\n\t\t\tif (!isset($params[$param])) return false;\n\t\t}\n\t\t$model = &NModel::factory($this->name);\n\t\t// apply fields in the model\n\t\t$fields = $model->fields();\n\t\tforeach ($fields as $field) {\n\t\t\t$model->$field = isset($params[$field])?$params[$field]:null;\n\t\t}\n\t\t$model->user_id = $this->website_user_id;\n\t\t$model->ip = NServer::env('REMOTE_ADDR');\n\t\tif (in_array('cms_created', $fields)) {\n\t\t\t$model->cms_created = $model->now();\n\t\t}\n\t\tif (in_array('cms_modified', $fields)) {\n\t\t\t$model->cms_modified = $model->now();\n\t\t}\n\t\t// set the user id if it's applicable and available\n\t\tif (in_array('cms_modified_by_user', $fields)) {\n\t\t\t$model->cms_modified_by_user = $this->website_user_id;\n\t\t}\n\t\t$model->insert();\n\t}", "protected function audit_record($action = false,$area = false,$id = false,$data = false){\n\t\treturn;\n\t}", "public function log_activity() {\n \n \n $CI =& get_instance();\n $CI->load->library('audit_trail');\n // Start off with the session stuff we know\n $data = array();\n $data['user_id'] = $CI->session->userdata('user_id');\n \n // Next up, we want to know what page we're on, use the router class\n $data['section'] = $CI->router->class;\n $data['action'] = $CI->router->method;\n \n // Lastly, we need to know when this is happening\n $data['when'] = date('Y-m-d G:i:s');\n \n // We don't need it, but we'll log the URI just in case\n $data['uri'] = uri_string();\n $path = realpath(APPPATH);\n // And write it to the database\n if($CI->router->method!='checkPortal' && $CI->router->method!='getAttendanceUpdates' && $CI->router->method!='getAverageDailyAttendance'):\n $CI->audit_trail->lfile($path.'/modules/logs/'.$CI->session->userdata('user_id').'.txt');\n $CI->audit_trail->lwrite($CI->session->userdata('name').' access '.$CI->router->method.' through '. uri_string().'.' , 'TRACE');\n endif;\n }", "public static function auditAccess() {\n\t\t\t$memberid = getLoggedOnMemberID();\n\t\t\t$auditid = $_SESSION['SESS_LOGIN_AUDIT'];\n\n\t\t\t$sql = \"UPDATE {$_SESSION['DB_PREFIX']}members SET \n\t\t\t\t\tlastaccessdate = NOW(), \n\t\t\t\t\tmetamodifieddate = NOW(), \n\t\t\t\t\tmetamodifieduserid = $memberid\n\t\t\t\t\tWHERE member_id = $memberid\";\n\t\t\t$result = mysql_query($sql);\n\t\t\t\n\t\t\t$sql = \"UPDATE {$_SESSION['DB_PREFIX']}loginaudit SET \n\t\t\t\t\ttimeoff = NOW(), \n\t\t\t\t\tmetamodifieddate = NOW(), \n\t\t\t\t\tmetamodifieduserid = $memberid\n\t\t\t\t\tWHERE id = $auditid\";\n\t\t\t$result = mysql_query($sql);\n\t\t}", "public function profileActivityLogAction()\r\n {\r\n $em = $this->getDoctrine()->getEntityManager();\r\n\r\n $tbUserActivities = $em->getRepository('YilinkerCoreBundle:UserActivityHistory');\r\n $user = $this->getUser();\r\n $timeline = $tbUserActivities->getTimelinedActivities($user->getId());\r\n\r\n $data = compact('timeline');\r\n\r\n return $this->render('YilinkerFrontendBundle:Profile:profile_activity_log.html.twig', $data);\r\n }", "function audit($username,$action,$object_name){\n\trequire_once('../conf/config.php');\n\t//Connect to mysql server\n\t$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);\n\tif(!$link){\n\t\tdie('Failed to connect to server: ' . mysql_error());\n\t}\n\t//Select database\n\t$db = mysql_select_db(DB_DATABASE);\n\tif(!$db){\n\t\tdie(\"Unable to select database\");\n\t}\n\t$query = \"INSERT into audit_log( username,date_field,time_field,action,object_name)\n\tvalues ('$username',curdate(),curtime(),'$action','$object_name')\";\n\t//echo \"<pre>$insert</pre>\\n\";\n\t$result=mysql_query($query) or die(\"<b>A fatal MySQL error occured</b>.\\n<br />Query: \" . $query . \n\t\t\"<br />\\nError: (\" . mysql_errno() . \") \" . mysql_error());\n}", "function log_event($action) {\n\t$now = new DateTime();\t\n\tfile_put_contents(WP_PLUGIN_DIR.\"/StandardsReader/cron_log.txt\", \"|\" . $now->format('Y-m-d H:i:s') . \" \". $action . \"\\r\\n\", FILE_APPEND | LOCK_EX);\n}" ]
[ "0.65512574", "0.63216615", "0.6300166", "0.62651145", "0.62341446", "0.6217015", "0.6171161", "0.61588687", "0.6150249", "0.6140557", "0.60996354", "0.6071218", "0.60576624", "0.60096145", "0.599582", "0.5971851", "0.5841329", "0.5832444", "0.58175707", "0.5706911", "0.56959933", "0.56883466", "0.5645531", "0.56181544", "0.5609299", "0.5597476", "0.5505339", "0.54825824", "0.54478943", "0.5425447" ]
0.66816205
0
Write Audit Trail (delete page)
function WriteAuditTrailOnDelete(&$rs) { global $Language; if (!$this->AuditTrailOnDelete) return; $table = 't_gaji_detail'; // Get key value $key = ""; if ($key <> "") $key .= $GLOBALS["EW_COMPOSITE_KEY_SEPARATOR"]; $key .= $rs['gjd_id']; // Write Audit Trail $dt = ew_StdCurrentDateTime(); $id = ew_ScriptName(); $curUser = CurrentUserName(); foreach (array_keys($rs) as $fldname) { if (array_key_exists($fldname, $this->fields) && $this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields if ($this->fields[$fldname]->FldHtmlTag == "PASSWORD") { $oldvalue = $Language->Phrase("PasswordMask"); // Password Field } elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) { if (EW_AUDIT_TRAIL_TO_DATABASE) $oldvalue = $rs[$fldname]; else $oldvalue = "[MEMO]"; // Memo field } elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) { $oldvalue = "[XML]"; // XML field } else { $oldvalue = $rs[$fldname]; } ew_WriteAuditTrail("log", $dt, $id, $curUser, "D", $table, $fldname, $key, $oldvalue, ""); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WriteAuditTrailOnDelete(&$rs) {\n\t\tglobal $tbl_profile;\n\t\t$table = 'tbl_profile';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\")\n\t\t\t$key .= UP_COMPOSITE_KEY_SEPARATOR;\n\t\t$key .= $rs['facultyprofile_ID'];\n\n\t\t// Write Audit Trail\n\t\t$dt = up_StdCurrentDateTime();\n\t\t$id = up_ScriptName();\n\t $curUser = CurrentUserID();\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif (array_key_exists($fldname, $tbl_profile->fields) && $tbl_profile->fields[$fldname]->FldDataType <> UP_DATATYPE_BLOB) { // Ignore BLOB fields\n\t\t\t\tif ($tbl_profile->fields[$fldname]->FldDataType == UP_DATATYPE_MEMO) {\n\t\t\t\t\tif (UP_AUDIT_TRAIL_TO_DATABASE)\n\t\t\t\t\t\t$oldvalue = $rs[$fldname];\n\t\t\t\t\telse\n\t\t\t\t\t\t$oldvalue = \"[MEMO]\"; // Memo field\n\t\t\t\t} elseif ($tbl_profile->fields[$fldname]->FldDataType == UP_DATATYPE_XML) {\n\t\t\t\t\t$oldvalue = \"[XML]\"; // XML field\n\t\t\t\t} else {\n\t\t\t\t\t$oldvalue = $rs[$fldname];\n\t\t\t\t}\n\t\t\t\tup_WriteAuditTrail(\"log\", $dt, $id, $curUser, \"D\", $table, $fldname, $key, $oldvalue, \"\");\n\t\t\t}\n\t\t}\n\t}", "function delete_audit_trail($log_id)\n {\n $parameter_array = array();\n \n array_push($parameter_array, array(\n 'and',\n 'id',\n '=',\n $log_id\n ));\n \n parent::delete('i', $parameter_array);\n }", "function delete()\n{\n\t$model = $this->getModel('logs');\n\t$read = $model->delete();\n\t$this->view_logs();\n}", "public function destroy($id)\n {\n $log = new audit();\n $log->AuditTabla=\"requerimientos\";\n $log->AuditType=\"Eliminado\";\n $log->AuditRegistro=$Requerimiento->ID_Req;\n $log->AuditUser=Auth::user()->email;\n $log->Auditlog=$request->all();\n $log->save();\n }", "function WriteAuditTrailDummy($typ) {\r\n\t\t$table = 'tutores';\r\n\t\t$usr = CurrentUserID();\r\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\r\n\t}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'mst_vendor';\n\n\t\t// Write Audit Trail\n\t\t$filePfx = \"log\";\n\t\t$curDate = date(\"Y/m/d\");\n\t\t$curTime = date(\"H:i:s\");\n\t\t$id = ew_ScriptName();\n\t $curUser = CurrentUserName();\n\t\t$action = $typ;\n\t\tew_WriteAuditTrail($filePfx, $curDate, $curTime, $id, $curUser, $action, $table, \"\", \"\", \"\", \"\");\n\t}", "function WriteAuditTrailDummy($typ) {\r\n\t\t$table = 'pase_establecimiento';\r\n\t\t$usr = CurrentUserID();\r\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\r\n\t}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 't_gaji_detail';\n\t\t$usr = CurrentUserName();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "function WriteAuditTrailDummy($typ) {\r\n\t\t$table = 'servidor_escolar';\r\n\t\t$usr = CurrentUserID();\r\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\r\n\t}", "public function delete($type)\n {\n $filename = self::getFile($type);\n @unlink($filename);\n // re-create log file\n $translator = Msd_Language::getInstance()->getTranslator();\n $this->write($type, $translator->_('L_LOG_CREATED'));\n }", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'tbl_profile';\n\t $usr = CurrentUserID();\n\t\tup_WriteAuditTrail(\"log\", up_StdCurrentDateTime(), up_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "public function onAfterDelete()\n {\n parent::onAfterDelete();\n $this->createAudit($this->owner->toMap());\n }", "function cpatient_detail_delete() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"patient_detail\"] = new cpatient_detail();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'delete', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'patient_detail', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "function AfterDelete($where, &$deleted_values, &$message, &$pageObject)\n{\n\n\t\t$delete_jobfile_sql = \"DELETE FROM jobfile WHERE \".$where;\n//unlink($_SESSION[\"output_dir\"].\"\\\\test_alex\\\\\");\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'user';\n\t $usr = CurrentUserName();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "function wLogErase($path,$param) {\n \n $fp = unlink($path.\"/\".$param.\".log\");\n //fclose ($fp);\n \n}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'scholarship_package';\n\t $usr = CurrentUserID();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "function clean_act_log () {\n\t\tfile_put_contents(DIRLOG.\"act.log\",\"\");\n\t}", "public function processDelete(): void \n {\n if ($this->delete()) { // The tag is deleted in the database storage.\n auth()->user()->logActivity($this, 'Tags', 'Has deleted an issue tag with the name ' . $this->name);\n flash(\"The ticket tag with the name <strong>{$this->name}</strong> has been deleted in the application.\")->info()->important();\n }\n }", "function edithistory_delete_post($pid)\n{\n\tglobal $db, $mybb;\n\t$db->delete_query(\"edithistory\", \"pid='{$pid}'\");\n}", "function deleteExpiredLog() {\n\n\t\t$refObj = new REF();\n\t\t//get evt_del from refObj, use alm_del for now\n\t\t$event_del = $refObj->ref['evt_del'];\n\t\tif($event_del == 0){\n\t\t\t$event_del = $refObj->default['evt_del'];\n\t\t\tif($event_del == 0)\n\t\t\t\t$event_del = 180;\n\t\t}\n\n\t\t//convert value into seconds\n\t\t$event_del_in_sec = $event_del * 86400;\n\t\t\n\t\t$current_timestamp = time();\n\t\t\n\t\t$expired_timestamp = $current_timestamp - $event_del_in_sec;\n\t\t\n\t\t$expired_date = date('Y-m-d', $expired_timestamp);\n\n\t\t$eventObj = new EVENTLOG(\"\",\"\",\"\",\"\");\n\t\t$eventObj->deleteExpiredLog($expired_date);\n\n\t\treturn;\n\t}", "function delete_audit($id){\n $status = $this->db->delete('audit',array('id'=>$id));\n\t\t$db_error = $this->db->error();\n\t\tif (!empty($db_error['code'])){\n\t\t\techo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n\t\t\texit;\n\t\t}\n\t\treturn $status;\n }", "public static function handlePageDeletion(ilWikiPage $a_page_obj, $a_user_id)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t// copy last entry to have deletion timestamp\n\t\t$sql = \"SELECT * \".\t\t\t\t\t\t\n\t\t\t\" FROM wiki_stat_page\".\n\t\t\t\" WHERE wiki_id = \".$ilDB->quote($a_page_obj->getWikiId(), \"integer\").\n\t\t\t\" AND page_id = \".$ilDB->quote($a_page_obj->getId(), \"integer\");\n\t\t\t\" ORDER BY ts DESC\";\n\t\t$ilDB->setLimit(1);\n\t\t$set = $ilDB->query($sql);\n\t\t\n\t\t// #15748\n\t\tif($ilDB->numRows($set))\n\t\t{\n\t\t\t$data = $ilDB->fetchAssoc($set);\n\n\t\t\t// see self::handlePageUpdated()\n\t\t\t$values = array(\n\t\t\t\t\"int_links\" => array(\"integer\", $data[\"int_links\"]),\n\t\t\t\t\"ext_links\" => array(\"integer\", $data[\"ext_links\"]),\n\t\t\t\t\"footnotes\" => array(\"integer\", $data[\"footnotes\"]),\n\t\t\t\t\"num_words\" => array(\"integer\", $data[\"num_words\"]),\n\t\t\t\t\"num_chars\" => array(\"integer\", $data[\"num_chars\"]),\n\t\t\t\t\"num_ratings\" => array(\"integer\", $data[\"num_ratings\"]),\n\t\t\t\t\"avg_rating\" => array(\"integer\", $data[\"avg_rating\"]),\n\t\t\t);\n\t\t\tself::writeStatPage($a_page_obj->getWikiId(), $a_page_obj->getId(), $values);\t\t\t\n\t\t}\n\t\t\n\t\t// mark all page entries as deleted\n\t\t$ilDB->manipulate(\"UPDATE wiki_stat_page\".\n\t\t\t\" SET deleted = \".$ilDB->quote(1, \"integer\").\n\t\t\t\" WHERE page_id = \".$ilDB->quote($a_page_obj->getId(), \"integer\").\n\t\t\t\" AND wiki_id = \".$ilDB->quote($a_page_obj->getWikiId(), \"integer\"));\t\t\n\t\t\n\t\t// wiki: del_pages+1, num_pages (count), avg_rating\n\t\t$rating = self::getAverageRating($a_page_obj->getWikiId());\t\t\n\t\tself::writeStat($a_page_obj->getWikiId(), \n\t\t\tarray(\n\t\t\t\t\"del_pages\" => array(\"increment\", 1),\n\t\t\t\t\"num_pages\" => array(\"integer\", self::countPages($a_page_obj->getWikiId())),\n\t\t\t\t\"avg_rating\" => array(\"integer\", $rating[\"avg\"]*100)\n\t\t\t));\n\t}", "function wiki_delete_page($page_id)\n{\n if (php_function_allowed('set_time_limit')) {\n @set_time_limit(0);\n }\n\n // Get page details\n $pages = $GLOBALS['SITE_DB']->query_select('wiki_pages', array('*'), array('id' => $page_id), '', 1);\n if (!array_key_exists(0, $pages)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE', 'wiki_page'));\n }\n $page = $pages[0];\n $_description = $page['description'];\n $_title = $page['title'];\n\n // Delete posts\n $start = 0;\n do {\n $posts = $GLOBALS['SITE_DB']->query_select('wiki_posts', array('id'), array('page_id' => $page_id), '', 500, $start);\n foreach ($posts as $post) {\n wiki_delete_post($post['id']);\n }\n //$start += 500; No, we just deleted, so offsets would have changed\n } while (array_key_exists(0, $posts));\n\n // Log revision\n $log_id = log_it('WIKI_DELETE_PAGE', strval($page_id), $_title);\n if (addon_installed('actionlog')) {\n require_code('revisions_engine_database');\n $revision_engine = new RevisionEngineDatabase();\n $revision_engine->add_revision(\n 'wiki_page',\n strval($page_id),\n strval($page_id),\n get_translated_text($_title),\n get_translated_text($_description),\n $page['submitter'],\n $page['add_date'],\n $log_id\n );\n }\n\n // Delete and update caching...\n\n delete_lang($_description);\n delete_lang($_title);\n $GLOBALS['SITE_DB']->query_delete('wiki_pages', array('id' => $page_id), '', 1);\n $GLOBALS['SITE_DB']->query_delete('wiki_children', array('parent_id' => $page_id));\n $GLOBALS['SITE_DB']->query_delete('wiki_children', array('child_id' => $page_id));\n\n if (addon_installed('catalogues')) {\n update_catalogue_content_ref('wiki_page', strval($page_id), '');\n }\n\n if ((addon_installed('commandr')) && (!running_script('install')) && (!get_mass_import_mode())) {\n require_code('resource_fs');\n expunge_resource_fs_moniker('wiki_page', strval($page_id));\n }\n\n require_code('sitemap_xml');\n notify_sitemap_node_delete('_SEARCH:wiki:browse:' . strval($page_id));\n}", "function edithistory_delete()\n{\n\tglobal $db, $mybb, $user;\n\t$db->update_query(\"edithistory\", array('uid' => 0), \"uid='{$user['uid']}'\");\n}", "public function delete()\n {\n\n\n $myDataAccess = aDataAccess::getInstance();\n $myDataAccess->connectToDB();\n // I just made it cascade null when deleted ;)\n\n\n \t$recordsAffected = $myDataAccess->deletePage($this->m_Pageid);\n\n \treturn \"$recordsAffected row(s) affected!\";\n }", "protected static function logDeletion($status, $path)\n {\n if ($status) {\n MyLog::info(\"[Delete Old] File Deleted\", [$path], 'main');\n } else {\n MyLog::error(\"[Delete Old] Can`t Delete File:\", [$path], 'main');\n }\n }", "function delete_all()\n{\n\t$model = $this->getModel('logs');\n\t$read = $model->delete_all();\n\t$this->view_logs();\n}", "public static function purgeLog(){\n\t\t$fichier = fopen('log/log.txt', 'w');\n}", "function clear_logs_entry(string $logs_filepath, int $index): void {\n $file = null;\n switch ($index) {\n case ALL_ENTRIES:\n $file = fopen($logs_filepath, \"w\");\n flock($file, LOCK_EX);\n break;\n case LATEST_ENTRY:\n $lines = file($logs_filepath);\n unset($lines[count($lines) - 1]);\n $file = fopen($logs_filepath, \"w\");\n flock($file, LOCK_EX);\n foreach ($lines as $line) {\n fwrite($file, $line);\n }\n break;\n default:\n $lines = file($logs_filepath);\n unset($lines[$index - 1]);\n $lines = array_values($lines);\n $file = fopen($logs_filepath, \"w\");\n flock($file, LOCK_EX);\n foreach ($lines as $line) {\n fwrite($file, $line);\n }\n break;\n }\n flock($file, LOCK_UN);\n fclose($file);\n }" ]
[ "0.62720513", "0.5986256", "0.5867979", "0.5821402", "0.57780766", "0.57658535", "0.5730903", "0.5688219", "0.5639611", "0.55539846", "0.5406664", "0.5387227", "0.5372039", "0.5370422", "0.5329571", "0.53178877", "0.53115416", "0.5309778", "0.53015274", "0.5290822", "0.525617", "0.52422196", "0.5204908", "0.5197672", "0.51879275", "0.51666373", "0.5137495", "0.5122437", "0.5122212", "0.5120475" ]
0.6097203
1
Called when worker is going to update configuration.
public function onConfigUpdated() { if ($this->client) { $this->client->config = $this->config; $this->client->onConfigUpdated(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _updateConfiguration();", "public function configChanged(Varien_Event_Observer $observer)\n {\n $userId = Mage::getStoreConfig('wallee_payment/general/api_user_id');\n $applicationKey = Mage::getStoreConfig('wallee_payment/general/api_user_secret');\n if ($userId && $applicationKey) {\n try {\n Mage::dispatchEvent('wallee_payment_config_synchronize');\n } catch (Exception $e) {\n Mage::throwException(Mage::helper('wallee_payment')->__('Synchronizing with wallee failed:') . ' ' . $e->getMessage());\n }\n }\n }", "abstract public function postConfigure();", "public function process()\n {\n $configurationDataSet = [\n 'database' => [\n 'server' => $this->getValue('db_server'),\n 'database' => $this->getValue('db_database'),\n 'username' => $this->getValue('db_username'),\n 'password' => $this->getValue('db_password'),\n 'prefix' => ''\n ]\n ];\n\n Modules_Pleskdockerusermanager_Configfile::setServiceConfigurationData($configurationDataSet);\n }", "public function getConfigChanged();", "protected function postConfigure()\n {\n }", "public function setConfiguration() {\n\n // Make sure all new services are available.\n drupal_flush_all_caches();\n $this->updateConfig();\n // Make sure configuration changes are available.\n drupal_flush_all_caches();\n $this->updateAuthors();\n $this->output()->writeln('Your configuration is complete.');\n }", "protected function create_worker_config() {\n return $this->config;\n }", "public function handleInitConfig(Varien_Event_Observer $observer)\n {\n /*\n * Record the current api key to detect changes\n */\n $this->currentApiKey = Mage::helper('lapostaconnect')->config('api_key');\n }", "function postUpdate()\n\t{\n\t\t$this->write();\n\n\t\tif ($this->subaction === 'schedule_conf') {\n\t\t\texec(\"sh /script/fix-cron-backup\");\n\n\t\t}\n\t}", "public function onConfigUpdated() {\n\t\tparent::onConfigUpdated();\n\t\tif (\n\t\t\t\t($order = ini_get('request_order'))\n\t\t\t\t|| ($order = ini_get('variables_order'))\n\t\t) {\n\t\t\t$this->variablesOrder = $order;\n\t\t}\n\t\telse {\n\t\t\t$this->variablesOrder = null;\n\t\t}\n\n\t}", "public function run()\n\t{\n\t\tZend_Registry::set('config', new Zend_Config($this->getOptions()));\n\t\tparent::run();\n\t}", "public function process() {\n\t\tif ( ! WD_Utils::check_permission() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->verify_nonce( 'disable_error_display' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! is_writable( WD_Utils::retrieve_wp_config_path() ) ) {\n\t\t\twp_send_json( array(\n\t\t\t\t'status' => 0,\n\t\t\t\t'error' => __( \"Your wp-config.php isn't writable\", wp_defender()->domain )\n\t\t\t) );\n\t\t}\n\n\t\tif ( ( $res = $this->write_wp_config() ) === true ) {\n\t\t\t$this->after_processed();\n\t\t\twp_send_json( array(\n\t\t\t\t'status' => 1,\n\t\t\t\t'message' => __( \"All PHP errors are hidden.\", wp_defender()->domain )\n\t\t\t) );\n\t\t} else {\n\t\t\t$this->output_error( 'cant_writable', $res->get_error_message() );\n\t\t}\n\t}", "public function processConfiguration() {}", "public function processConfiguration()\n\t{\n\t\t// Check if the value sent on form submit matches one of either $_POST or $_GET keys \n\t\tif (Tools::isSubmit('submit_emailmystock_form'))\n\t\t{\n\t\t\t$enable_emails = Tools::getValue('enable_emails');\n\t\t\t// Update configuration value to database\n\t\t\tConfiguration::updateValue('MYMOD_EMAILS', $enable_emails);\n\t\t\t// Allows the Smarty object to display a confirmation message when the configuration is saved (see top of getContent.tpl)\n\t\t\t$this->context->smarty->assign('confirmation', 'ok');\n\t\t}\n\t}", "public function after_update() {}", "public function setupConfig()\n {\n registry::getInstance()->set('config', $this->parseConfig());\n }", "protected function onConfigChange($name, $value)\n {\n }", "protected function afterConfigurationSet()\n {\n }", "public function afterConfig()\n {\n foreach ($this->_lifecyclers[BeanLifecycle::AfterConfig] as $lifecycleListener) {\n $lifecycleListener->afterConfig();\n }\n }", "protected function afterUpdating()\n {\n }", "public function updateConfig()\n {\n $this->aframe_assets_url = $this->composer->getConfig()->get('aframe-url') ?? '/aframe';\n \n $composer_json = $this->getVendorDir() . DIRECTORY_SEPARATOR . 'mkungla' . DIRECTORY_SEPARATOR . 'aframe-php' . DIRECTORY_SEPARATOR . 'composer.json';\n \n if (file_exists($composer_json)) {\n $config = json_decode(file_get_contents($composer_json));\n $config->config->{'aframe-dir'} = $this->getPublicRoot();\n $config->config->{'aframe-url'} = $this->aframe_assets_url;\n $config->version = self::AFRAME_PHP_VERSION;\n file_put_contents($composer_json, json_encode($config, JSON_PRETTY_PRINT));\n }\n }", "function processConfiguration() ;", "function crpTalk_admin_updateconfig()\n{\n\t// Security check\n\tif (!SecurityUtil :: checkPermission('crpTalk::', '::', ACCESS_ADMIN))\n\t{\n\t\treturn LogUtil :: registerPermissionError();\n\t}\n\n\t$talk= new crpTalk();\n\treturn $talk->updateConfig();\n}", "protected function updateConfig() {\n $config_factory = \\Drupal::configFactory();\n $settings = $config_factory->getEditable('message_subscribe.settings');\n $settings->set('use_queue', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('mailsystem.settings');\n $settings->set('defaults', [\n 'sender' => 'swiftmailer',\n 'formatter' => 'swiftmailer',\n ]);\n $settings->set('modules', [\n 'swiftmailer' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n 'message_notify' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n ]);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('swiftmailer.message');\n $settings->set('format', 'text/html');\n $settings->set('respect_format', FALSE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('flag.flag.subscribe_node');\n $settings->set('status', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('user.role.authenticated');\n $permissions = $settings->get('permissions');\n foreach ([\n 'flag subscribe_node',\n 'unflag subscribe_node',\n ] as $perm) {\n if (!in_array($perm, $permissions)) {\n $permissions[] = $perm;\n }\n }\n $settings->set('permissions', $permissions);\n $settings->save(TRUE);\n\n }", "protected function configHandle()\n {\n $packageConfigPath = __DIR__.'/config/config.php';\n $appConfigPath = config_path('task-management.php');\n\n $this->mergeConfigFrom($packageConfigPath, 'task-management');\n\n $this->publishes([\n $packageConfigPath => $appConfigPath,\n ], 'config');\n }", "public function triggerConfigChangeCallback(): int\n {\n $this->_setAttr('persistentSettings', '2');\n return 0;\n }", "public function refreshConfig()\n {\n $this->_data = $this->_reader->read();\n $this->merge($this->_dbReader->get());\n }", "public function loadConfig()\n {\n $this->setGlobalStoreOfShopNumber($this->getShopNumber());\n $this->loadArray($this->toArray());\n $this->setExportTmpAndLogSettings();\n }", "abstract public function configure();" ]
[ "0.70563656", "0.6443865", "0.62816197", "0.60414636", "0.6032272", "0.59078276", "0.59054154", "0.58986545", "0.5884469", "0.5831596", "0.57830846", "0.5749157", "0.5746288", "0.57460046", "0.57368976", "0.5702942", "0.5701427", "0.57012683", "0.569929", "0.5674837", "0.56681657", "0.56617403", "0.56379235", "0.5628245", "0.5604157", "0.5599606", "0.5588848", "0.5584425", "0.5531847", "0.55112875" ]
0.7420578
0
Return clone of default db select
public function getDefaultDbSelect() { $options = $this->getOptions(); if(null == $this->defaultDbSelect) { $this->defaultDbSelect = new Db\Sql\Select($options->getTableName()); } $dbSelect = clone $this->defaultDbSelect; return $dbSelect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSelect()\n {\n return $this->getConnection()->select();\n }", "public function select()\n {\n return $this->_db->factory('select', $this);\n }", "function remake()\n {\n $result = parent::select($this->table, '*', null);\n parent::closeConection();\n \n return $result;\n }", "public function select();", "public function select();", "public function select();", "abstract public function prepareSelect();", "public function select()\n {\n return new QueryProxy('select', $this);\n }", "public function __clone()\n {\n $this->select = clone $this->select;\n }", "public function getSelect();", "public function getSelect();", "protected function getBaseSelect()\n {\n return \"SELECT * FROM \" . $this->getTableName();\n }", "public static function select(): DBSelect\n {\n $select = new DBSelect(\n static::$schema,\n self::fields(),\n get_called_class()\n );\n\n return $select;\n }", "public function select()\n\t{\n\t\t$this->_query['select'] = func_get_args();\n\n\t\treturn $this;\n\t}", "function select_default($db,$table) { \n\n\t$conn = new mysqli('localhost','id6847947_tadas','322559',$db);\n\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\n\t$selection= \"SELECT * FROM \" . $table . \" ORDER BY id ASC\";\n\treturn $result = $conn->query($selection);\n}", "public function sql_select_db() {}", "public function sql_select_db() {}", "protected static function select()\n {\n }", "protected abstract function getSelectStatement();", "protected abstract function getSelectStatement();", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "protected function select(): Select\n {\n return $this->select;\n }", "public function createSelectSql(): \\Hx\\Db\\Sql\\SelectInterface;", "protected function getSelect() {\n $oSql = new SqlSelect();\n $oSql->setEntity($this->Persistence->getTableName());\n $oSql->addColumn(implode(',', $this->getColumns()));\n $oSql->setCriteria($this->Criteria); \n return $oSql->getInstruction();\n }", "protected static function buildSelectionQuery() \n {\n return Query::select()->\n from(self::getTableName());\n }", "function select($fields = NULL)\n {\n // Create a fresh slate\n $this->object->_init();\n if (!$fields or $fields == '*') {\n $fields = $this->get_table_name() . '.*';\n }\n $this->object->_select_clause = \"SELECT {$fields}\";\n return $this->object;\n }", "protected function runSelectWithMeta()\n {\n return $this->connection->selectWithMeta(\n $this->toSql(),\n $this->getBindings(),\n ! $this->useWritePdo\n );\n }", "abstract public function getSelectedDatabase();", "protected function RetSelect() {\n\n $return = \"SELECT\";\n\n if ($this->\n distinct) {\n\n $return .= \" DISTINCT\";\n }\n\n $columnsArr = [];\n\n foreach ($this->\n columns as $key => $value) {\n\n if (is_string($value)) {\n\n $columnsArr[] = $value;\n } else if (isset($value['subquery']) &&\n $value['subquery'] instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $value['subquery']->\n IsSelect()) {\n\n $columnsArr[] = \"(\" . $value['subquery']->\n Generate() . \")\" . (isset($value['label']) &&\n is_string($value['label']) ? \" AS \\\"{$value['label']}\\\"\" : \"\");\n } else if (isset($value['value'])) {\n\n $columnsArr[] = \"'{$value['value']}'\" . (isset($value['label']) &&\n is_string($value['label']) ? \" AS \\\"{$value['label']}\\\"\" : \"\");\n } else {\n\n $columnsArr[] = \"{$value['column']}\" . (isset($value['label']) &&\n is_string($value['label']) ? \" AS \\\"{$value['label']}\\\"\" : \"\");\n }\n }\n\n if (count($columnsArr)) {\n\n $return .= \" \" . implode($columnsArr, \", \");\n } else {\n\n $return .= \" *\";\n }\n\n\n $tablesStr = \"\";\n\n foreach ($this->\n tables as $key => $value) {\n\n if (is_string($value)) {\n\n $tablesStr .= \", $value\";\n } else {\n\n if (!(isset($value['table']) &&\n $value['table'] != \"\") &&\n isset($value['subquery']) &&\n $value['subquery'] instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $value['subquery']->\n IsSelect()) {\n\n $value['table'] = \"(\" . rtrim($value['subquery']->\n Generate(), ';') . \")\";\n\n if (!isset($value['alias'])) {\n\n throw new \\Exception(\"Error: Alias required in case of subquery to be used in from clause.\");\n }\n } else {\n\n $value['table'] = \"{$value['table']}\";\n }\n\n if (isset($value['alias'])) {\n\n $value['alias'] = \"`{$value['alias']}`\";\n }\n\n if (!isset($value['table']) ||\n $value['table'] == \"\") {\n\n throw new \\Exception(\"Error: Tables not properly provided in QueryHelper.\");\n }\n\n if (!isset($value['jointype'])) {\n\n $tablesStr .= \", \" . $value['table'];\n\n if (isset($value['alias'])) {\n\n $tablesStr .= \" AS \" . $value['alias'];\n }\n } else {\n\n switch ($value['jointype']) {\n case 'j':\n\n $tablesStr .= \" JOIN \" . $value['table'];\n break;\n\n case 'ij':\n\n $tablesStr .= \" INNER JOIN \" . $value['table'];\n break;\n\n case 'cj':\n\n $tablesStr .= \" CROSS JOIN \" . $value['table'];\n break;\n\n case 'sj':\n\n $tablesStr .= \" STRAIGHT_JOIN \" . $value['table'];\n break;\n\n case 'lj':\n\n $tablesStr .= \" LEFT JOIN \" . $value['table'];\n break;\n\n case 'rj':\n\n $tablesStr .= \" RIGHT JOIN \" . $value['table'];\n break;\n\n case 'nj':\n\n $tablesStr .= \" NATURAL JOIN \" . $value['table'];\n break;\n\n case 'nlj':\n\n $tablesStr .= \" NATURAL LEFT JOIN \" . $value['table'];\n break;\n\n case 'nrj':\n\n $tablesStr .= \" NATURAL RIGHT JOIN \" . $value['table'];\n break;\n\n case 'loj':\n\n $tablesStr .= \" LEFT OUTER JOIN \" . $value['table'];\n break;\n\n case 'roj':\n\n $tablesStr .= \" RIGHT OUTER JOIN \" . $value['table'];\n break;\n\n case 'nloj':\n\n $tablesStr .= \" NATURAL LEFT OUTER JOIN \" . $value['table'];\n break;\n\n case 'nroj':\n\n $tablesStr .= \" NATURAL RIGHT OUTER JOIN \" . $value['table'];\n break;\n\n default:\n break;\n }\n\n if (isset($value['alias'])) {\n\n $tablesStr .= \" AS \" . $value['alias'];\n }\n\n if (isset($value['joinconditions']) &&\n count($value['joinconditions'])) {\n\n $tablesStr .= $this->\n WhereClause($value['joinconditions'], 1);\n }\n }\n }\n }\n\n $return .= \" FROM \" . ltrim($tablesStr, \", \");\n\n\n if (count($this->\n where)) {\n\n $return .= $this->\n WhereClause($this->\n where);\n }\n\n\n $groupsArr = [];\n\n foreach ($this->\n group as $key => $value) {\n\n if (is_string($value)) {\n\n $groupsArr[] = \"{$value}\";\n } else if (isset($value['subquery']) &&\n $value['subquery'] instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $value['subquery']->\n IsSelect()) {\n\n $groupsArr[] = \"(\" . rtrim($value['subquery']->\n Generate(), ';') . \")\";\n } else if (isset($value['value'])) {\n\n $value['value'] = $this->\n connection->\n GetConn()->\n real_escape_string($value['value']);\n $groupsArr[] = \"'{$value['value']}'\";\n } else {\n\n $groupsArr[] = \"{$value['column']}\";\n }\n }\n\n if (count($groupsArr)) {\n\n $return .= \" GROUP BY \" . implode($groupsArr, \", \");\n }\n\n\n if (count($this->\n having)) {\n\n $return .= $this->\n WhereClause($this->\n having, 2);\n }\n\n\n $ordersArr = [];\n\n foreach ($this->\n order as $key => $value) {\n\n if (is_string($value)) {\n\n $ordersArr[] = $value;\n } else if (isset($value['subquery']) &&\n $value['subquery'] instanceof \\FluitoPHP\\Database\\DBQueryHelper &&\n $value['subquery']->\n IsSelect()) {\n\n $ordersArr[] = \"(\" . rtrim($value['subquery']->\n Generate(), ';') . \")\" . (isset($value['type']) &&\n $value['type'] == 'd' ? \" DESC\" : \"\");\n } else if (isset($value['value'])) {\n\n $ordersArr[] = \"'{$value['value']}'\" . (isset($value['type']) &&\n $value['type'] == 'd' ? \" DESC\" : \"\");\n } else {\n\n $ordersArr[] = \"{$value['column']}\" . (isset($value['type']) &&\n $value['type'] == 'd' ? \" DESC\" : \"\");\n }\n }\n\n if (count($ordersArr)) {\n\n $return .= \" ORDER BY \" . implode($ordersArr, \", \");\n }\n\n if ($this->\n perpage > 0) {\n\n if ($this->\n page < 1) {\n\n $this->\n page = 1;\n }\n\n $startcount = $this->\n perpage * ($this->\n page - 1);\n\n $return .= \" LIMIT {$startcount}, {$this->\n perpage}\";\n }\n\n return $return . \";\";\n }", "public function select($what = \"*\"){\n\t\t\tif(is_string($what)){\n\t\t\t\t$this->select = \"SELECT \" . $what . \" FROM \" . $this->table;\n\t\t\t}else{\n\t\t\t\t$this->select = false;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}" ]
[ "0.68683076", "0.68513006", "0.6631717", "0.6427664", "0.6427664", "0.6427664", "0.6408085", "0.6397182", "0.63716316", "0.63566846", "0.63566846", "0.63529974", "0.6339171", "0.62972003", "0.6227628", "0.61845183", "0.6184429", "0.618231", "0.61734104", "0.61734104", "0.61733854", "0.61307895", "0.61281896", "0.6124519", "0.6091226", "0.60865605", "0.5995208", "0.5988071", "0.59596246", "0.59323627" ]
0.789186
0
Call this method at begining to profile the queries
function setProfiling(){ $this->query("SET profiling=1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function beforeStartProfile(Item $profile)\n {\n echo $profile->getSQLStatement();\n }", "public function run()\n {\n DB::disableQueryLog();\n parent::run();\n }", "public function init_save_queries()\n {\n }", "public static function enableQueryLog()\n {\n }", "public function __construct()\n {\n DB::enableQueryLog();\n }", "public function __construct(){\n DB::enableQueryLog();\n }", "public function beginDbProfile($token, $category='database'){\n\t\t$log = array(\"Begin SQL Profiling $token\", 8, $category, microtime(true));\n\t\t$this->_logs[] = $log;\n\t\t$this->_profiles[$token] = $log;\n $query_index = Doo::db()->getQueryCount();\n $this->_profiles[$token]['sqlstart'] = ($query_index<0)?0:$query_index;\n\t\t$this->_profiles[$token]['startmem'] = $this->memory_used();\n\t}", "protected function _begin() {\n $this->dataSource = $this->getDataSource();\n }", "function initProfiler()\r\n{\r\n global $TIME_START;\r\n $TIME_START=microtime(1);\r\n global $DB_ITEMS_LOADED;\r\n $DB_ITEMS_LOADED=0;\r\n\r\n global $g_count_db_statements;\r\n $g_count_db_statements = 0;\r\n}", "public function begin () {\n $this->connection->begin();\n $this->update_current_user_activity();\n }", "public function enableQueryLog()\n {\n $this->loggingQueries = true;\n }", "function query() {\n $this->add_additional_fields();\n }", "private function startCountingSelectQueries(): void\n {\n if ($this->showQueries !== self::SHOW_QUERIES_RESET) {\n throw new LogicException('showQueries wasnt reset, you did something wrong');\n }\n $this->showQueries = $_REQUEST['showqueries'] ?? null;\n // force showqueries on to count the number of SELECT statements via output-buffering\n // if this approach turns out to be too brittle later on, switch to what debugbar\n // does and use tractorcow/proxy-db which should be installed as a dev-dependency\n // https://github.com/lekoala/silverstripe-debugbar/blob/master/code/Collector/DatabaseCollector.php#L79\n $_REQUEST['showqueries'] = 1;\n ob_start();\n echo '__START_ITERATE__';\n }", "public function query()\n {\n }", "public function query()\n {\n }", "private function profilerInit(): void\n {\n\n Profiler::init();\n Profiler::xhprofStart();\n\n }", "private function initQuery()\n {\n // reset\n $this->result = false;\n \n $this->errorCode = 0;\n $this->errorMessage = '';\n }", "public function gatherSQLQueryData()\n {\n $queryTotals = array();\n\n $queryTotals['count'] = 0;\n $queryTotals['time'] = 0;\n\n $queries = array();\n\n if(isset($this->connection)) {\n $queryLog = $this->connection->getQueryLog();\n\n $queryTotals['count'] += count($queryLog);\n\n foreach($queryLog as $query) {\n if(isset($query['bindings']) && ! empty($query['bindings'])) {\n $query['sql'] = PdoDebugger::show($query['query'], $query['bindings']);\n } else {\n $query['sql'] = $query['query'];\n }\n\n $query = $this->attemptToExplainQuery($query);\n\n $queryTotals['time'] += $query['time'];\n\n $query['time'] = $this->getReadableTime($query['time']);\n\n //\n $queries[] = $query;\n }\n }\n\n $queryTotals['time'] = $this->getReadableTime($queryTotals['time']);\n\n $this->output['queries'] = $queries;\n $this->output['queryTotals'] = $queryTotals;\n }", "private function initQuery()\n {\n $this->_lastSql = null;\n $this->_limit = null;\n $this->_offset = null;\n $this->_order = array();\n $this->_group = array();\n $this->_table = null;\n $this->_stmt = null;\n\n $this->fromStates = array();\n $this->selectFields = array();\n $this->whereStates = array();\n $this->havingStates = array();\n $this->values = array();\n $this->joinStates = array();\n }", "public function logQueries()\n {\n // DbLoJack Helper\n $helper = app('db_lojack');\n\n // Log database queries for the request\n foreach ($helper->connections() as $connection) {\n $queries = DB::connection($connection)->getQueryLog();\n $helper->logQueries($queries, $connection );\n }\n }", "public function loadProfileInformation() {\n\t\t\t$procedure = \"get\" . $this->mode_ . \"Information\"; \n\t\t\t$this->profileInformation_ = $this->dbHandler_->call($procedure, \"%d\", array($this->id_));\n\t\t}", "public function profilerStart()\n {\n if (extension_loaded('xhprof')) {\n include_once($this->xhprofLibPath . 'utils/xhprof_lib.php');\n include_once($this->xhprofLibPath . 'utils/xhprof_runs.php');\n xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);\n }\n }", "public static function query()\n {\n }", "function query_info()\r\n\t\t{\r\n\t\t\techo \"<u>Your Previous Query Consisted of:</u><br>\";\r\n\t\t\techo \"SQL = '\".$this->last_query[\"sql\"].\"'<br>\";\r\n\t\t\t$temp = ($this->last_query[\"end_time\"] - $this->last_query[\"start_time\"]);\r\n\t\t\t$temp *= 1000;\r\n\t\t\t$temp = number_format($temp, 3);\r\n\t\t\techo \"Time Elapsed: \".$temp.\"(ms)<br>\";\r\n\t\t\techo \"Number of Records: \".$this->numrows.\"<br>\";\r\n\t\t\techo \"Number of Rows Affected: \".$this->affected_rows;\r\n\t\t}", "public function onRun()\n {\n $user = Auth::getUser();\n $examList = Exam::paginate(10);\n\n if ($examList) {\n $this->page['exams'] = $examList;\n $this->page['scores'] = FinalScore::where('user_id', $user->id)\n ->orderBy('created_at', 'desc')\n ->get();\n }\n }", "function begin() {\n\t\t\tself::$db->begin();\n\t\t\t$this->begin_executed = true;\n\t\t}", "public function get_query_log()\n {\n }", "public function query_start($query)\n {\n if (($this->mode > 0) and (!$this->sql_query_running)) {\n $this->sql_query_running = true;\n $this->sql_query_start = microtime(true);\n $this->sql_query_string = $query;\n }\n }", "public function enableQueryLog()\n\t{\n\t\t$this->neoeloquent->enableQueryLog();\n\t}", "public static function flushQueryLog()\n {\n }" ]
[ "0.6405013", "0.6209104", "0.6200284", "0.61350137", "0.6050763", "0.5996968", "0.59515333", "0.5947289", "0.59402645", "0.58585715", "0.58519244", "0.58342224", "0.5830912", "0.5826485", "0.5826485", "0.5812516", "0.5811265", "0.5797647", "0.57883763", "0.5770269", "0.576214", "0.5724886", "0.57214266", "0.57074046", "0.57036257", "0.57024384", "0.5693514", "0.5691144", "0.567627", "0.5646265" ]
0.6785249
0
This method will set the all important information keys array, where the serialize functionality works with, as well as the ArrayAccess functionality.
private function setInfoKeys() { if (!empty(self::$s_aInfoKeys)) { return; } self::$s_aInfoKeys = array( 'ID', 'ProfileID', 'Nickname', 'Level', 'TempLevel', 'IP', 'JoinTime', 'LogInTime', ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setSerializableOptionsArray()\n {\n $this->serializableOptions = [\n 'root' => $this->base()->lowercase()->singular(),\n 'collection_root' => $this->base()->lowercase()->plural(),\n 'include_root' => TRUE,\n 'additional_methods' => [],\n 'include_subclasses' => [],\n ];\n }", "public function setKeysFromInserted()\n\t{\n\t\t$keys = $this->database->getNewKeys();\n\n\t\t$this->data = Arr::mergeDeep($this->data, $keys);\n\n\t\t$this->key = $keys[$this->primaryKey] ?? null;\n\t}", "public function serialize() {\n\t\t$aInformation = array();\n\t\tforeach (self::$s_aInfoKeys as $sKey) {\n\t\t\t$aInformation[$sKey] = $this[$sKey];\n\t\t}\n\n\t\treturn serialize($aInformation);\n\t}", "function prepare_array() {\n\n\t\t$obj['name'] = $this->name->value;\n\t\t$obj['url'] = $this->url->value;\n\t\t$obj['image'] = $this->image->value;\n\t\t$obj['description'] = $this->description->value;\n\t\t/*\n\t\tforeach($this as $key => $value) {\n\n\t\t\t$obj[$key] = $value;\n\n\t\t}\n\t*/\n\t\treturn $obj;\n\t}", "protected function _setupMapperArray()\n\t{\n\t\t$this->mapperArray = array();\n\t\t\n\t\t$this->mapperArray['property_id'] = 'properties_id';\n\t\t$this->mapperArray['sort_order'] = 'sort_order';\n\t\t\n\t\t$this->mapperArray['name'] = 'properties_name';\n\t\t$this->mapperArray['admin_name'] = 'properties_admin_name';\n\t}", "public function setDictionary()\n {\n self::$dictionary = array();\n }", "function resetKeys() {\n $this->keys = array_keys($this->records);\n }", "public function toAssociativeArray() {\n // TODO\n }", "public function toAssociativeArray() {\n // TODO\n }", "public function store()\n {\n $this->storeKeys();\n }", "public function __construct() {\n $this->_map = [];\n $this->_keys = [];\n }", "protected function setKeyMapping(): array\n {\n return ['node-meta' => 'node_meta'];\n }", "private function set_keys() {\n\t\t$this->skeleton->load('customers_id', !empty($_SESSION['customer_id'])?$_SESSION['customer_id']:NULL);\n\t\t$this->skeleton->load('customers_extra_logins_id', !empty($_SESSION['customer_extra_login_id'])?$_SESSION['customer_extra_login_id']:NULL);\n\n\t\t// this will set the ID as the session value, if one is found, otherwise if there is an existing cart for this user, pull it out\n\t\tif (empty($this->id()) && $header = self::fetch('cart_header_by_key', [':cart_key' => $this->get_cart_key()])) {\n\t\t\t$this->id($header['cart_id']);\n\t\t}\n\n\t\t//var_dump([$this->skeleton->get('customers_id'), $_SESSION['customer_id']]);\n\t}", "public function actionSetKeys()\n {\n $this->setKeys($this->generateKeysPaths);\n }", "public function encryptableFields()\n {\n return array(\"key\");\n }", "public function __construct() {\n\t\t$this->keysDB = array();\n\t}", "public function createKeyArray(){\n\t$keyArray = array();\n\tif (isset($this->id)) $keyArray[\"id\"] = $this->id;\n\tif (isset($this->codice_categoria)) $keyArray[\"codice_categoria\"] = $this->codice_categoria;\n\tif (isset($this->codice)) $keyArray[\"codice\"] = $this->codice;\n\tif (isset($this->descrizione)) $keyArray[\"descrizione\"] = $this->descrizione;\n\treturn $keyArray;\n}", "function setExtraVarKeys($extra_keys)\n\t{\n\t\tif(!is_array($extra_keys) || count($extra_keys) < 1)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tforeach($extra_keys as $val)\n\t\t{\n\t\t\t$obj = new ExtraItem($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value, $val->eid);\n\t\t\t$this->keys[$val->idx] = $obj;\n\t\t}\n\t}", "protected function getNonVersionArrayKeys()\n {\n return array('description', 'alternative');\n }", "protected function setup_transients() {\n\n\t\t$this->transients = array(\n\t\t\t'notices' => array(\n\t\t\t\t'update' => '_wp_sh_plugin_browser_available_updates',\n\t\t\t\t'notice' => '_wp_sh_plugin_browser_notices',\n\t\t\t),\n\t\t);\n\n\t}", "public function set(){\n\t\t\t//Get incoming data\t\t\n\t\t\t$data = $this->data;\n\t\t\t\n\t\t\t//what action are we taking?\n\t\t\t$action = $this->action;\n\t\t\t\n\t\t\t//What data set are we taking action on. \n\t\t\t$action_set = $action. '_set';\n\t\t\t\n\t\t\t//load keys from that data set. \n\t\t\t$keys = $this->$action_set;\n\t\t\t//dump( __LINE__, __METHOD__, $data ); \n\t\t\t\n\t\t\t//Now we start to build. \n\t\t\tforeach( $keys as $key ){\n\t\t\t\tif( !empty( $data[ $key ] ) ){\n\t\t\t\t\t$this->data_set[ $key ] = $data[ $key ];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( !empty( $data[ 'data' ] ) && is_array( $data[ 'data' ] ) ){\n\t\t\t\t\t//looking deeper into the source arrays for data that matches the requesting field.\n\t\t\n\t\t\t\t\t//first check if field is available in top level of nested array. \n\t\t\t\t\tif( !empty( $data[ 'data' ][ $key ] ) ){\n\t\t\t\t\t\t$this->data_set[ $key ] = $data[ 'data' ][ $key ];\n\t\t\t\t\t\tcontinue;\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//else look deeper by referencing the first word of the key to find it's associated array. \n\t\t\t\t\t$pos = strpos( $key, '_' );\n\t\t\t\t\t$sub_arr = substr( $key, 0, $pos );\n\t\t\t\t\t\n\t\t\t\t\tif( !isset( $data[ 'data' ][ $sub_arr ] ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t \n\t\t\t\t\tif( is_array( $data[ 'data' ][ $sub_arr ] ) ){\n\t\t\t\t\t\t$sub_key = substr( $key, $pos + 1 );\t\t\t\t\t\n\t\t\t\t\t\t$this->data_set[ $key ] = $data[ 'data' ][ $sub_arr ][ $sub_key ] ?? '';\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t/* if( strcmp( $key, 'src_data' ) === 0 ){\n\t\t\t\t\t$this->data_set[ 'src_data' ] = $data;\n\t\t\t\t\tcontinue;\n\t\t\t\t} */\n\t\t\t\t\n\t\t\t\t$this->data_set[ $key ] = '';\n\t\t\t}\t\n\t\t\t\n\t\t\t\n\t\t\t//The final data set is specific to the initiating action being performed \n\t\t\t//$this->data_set = $this->$action();\n\t\t\t\n\t\t\treturn true;\n\t\t}", "function __data() {\n\t\tif ($data = $this->Session->read('data')) {\n\t\t\tforeach ($data as $k => $i) {\n\t\t\t\t$obj = ClassRegistry::init($k);\n\t\t\t\t$this->data[$k] = $i;\n\t\t\t}\n\t\t\t$this->Session->write('data', null);\n\t\t}\n\t\t// attempts to remember identity of commentor and prefill fields\n\t\tif (empty($this->data['Comment']) && $data = $this->Cookie->read('CommentUser')) {\n\t\t\t$this->data['Comment'] = $data;\n\t\t}\n\t}", "function infoDictionary() {}", "private function dataBaseRepresentation() {\n\t\t$array['website'] = $this->website;\n\t\t$array['name'] = $this->name;\n\t\t$array['country'] = $this->country;\n\t\treturn $array;\n\t}", "public function copyAttributesToKey()\n\t{\n\t\t$primarykey = $this->factory->getPrimarykey ;\n\t\tforeach( $primarykey->fields as $n=>$field )\n\t\t{\n\t\t\t$this->key[$field] = $this->$field ;\n\t\t}\n\t}", "private function setValues()\n {\n foreach($this->data as $type => $values)\n if(!preg_match('/(library)/i', $type))\n foreach($values as $key => $value)\n $this->{strtolower($type)}[$key] = $value;\n }", "public function set()\n {\n $args = func_get_args();\n $num = func_num_args();\n if ($num == 2) {\n self::$data[$args[0]] = $args[1];\n } else {\n if (is_array($args[0])) {\n foreach ($args[0] as $k => $v) {\n self::$data[$k] = $v;\n }\n }\n }\n }", "private function set_markerArray()\n {\n $markerArray = $this->pObj->objMarker->extend_marker();\n $this->markerArray = $markerArray;\n\n// // Add mode and view\n// $this->markerArray['###MODE###'] = $this->pObj->piVar_mode;\n// $this->markerArray['###VIEW###'] = $this->pObj->view;\n//\n// // Add cObj->data and piVars\n// $this->markerArray = $this->pObj->objMarker->extend_marker_wi_cObjData($this->markerArray);\n// $this->markerArray = $this->pObj->objMarker->extend_marker_wi_pivars($this->markerArray);\n }", "protected function setAvailableFields() {\r\n\t\t$this->availableFieldsArray = array(\r\n\t\t\t'uid',\r\n\t\t\t'pid',\r\n\t\t\t'tstamp',\r\n\t\t\t'crdate',\r\n\t\t\t'cruser_id',\r\n\t\t\t'deleted',\r\n\t\t\t'hidden',\r\n\t\t\t'name',\r\n\t\t\t'hint',\r\n\t\t\t'image',\r\n\t\t\t'use_arcticle_stock_info'\r\n\t\t);\r\n\t}", "public function createObjKeyArray(array $keyArray){\n\tif (isset($keyArray[\"id\"])) $this->id = $keyArray[\"id\"];\n\tif (isset($keyArray[\"codice_categoria\"])) $this->codice_categoria = $keyArray[\"codice_categoria\"];\n\tif (isset($keyArray[\"codice\"])) $this->codice = $keyArray[\"codice\"];\n\tif (isset($keyArray[\"descrizione\"])) $this->descrizione = $keyArray[\"descrizione\"];\n}" ]
[ "0.6061503", "0.5942292", "0.5877831", "0.58777785", "0.5778004", "0.5725188", "0.5706095", "0.56988376", "0.56988376", "0.56564474", "0.55834246", "0.5578728", "0.55576175", "0.5550427", "0.5546914", "0.55340296", "0.5532984", "0.5532149", "0.5520324", "0.55184746", "0.5516693", "0.54997104", "0.54775715", "0.5477518", "0.5460401", "0.5459236", "0.54390043", "0.5434813", "0.54292893", "0.54274696" ]
0.7523614
0
This method will serialize all the information in this object into a single array. Updating this method is not necessary when new properties are added to this object in the future. Only the InfoKeys array should be updated with all the properties.
public function serialize() { $aInformation = array(); foreach (self::$s_aInfoKeys as $sKey) { $aInformation[$sKey] = $this[$sKey]; } return serialize($aInformation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray()\n {\n return $this->info;\n }", "public function jsonSerialize()\n {\n return array_merge([\n 'settings' => $this->settings(),\n 'actions' => $this->actions(),\n 'columns' => $this->columns(),\n 'filters' => $this->filters(),\n 'cacheKey' => $this->generateCacheKey()\n ], parent::jsonSerialize());\n }", "public function jsonSerialize()\n {\n $publicProperties = get_object_vars($this);\n unset($publicProperties['properties']);\n\n return array_merge($publicProperties, $this->getPropertiesField());\n }", "public function jsonSerialize(): array\n {\n return get_object_vars($this);\n }", "public function getInfo(): array\n {\n return $this->_info;\n }", "public function serialize(): array\n {\n return [\n 'className' => get_class($this),\n 'id' => $this->id,\n 'backendId' => $this->backendId,\n 'queue' => $this->queue,\n 'arguments' => serialize(new ArrayObject($this->arguments)),\n 'attempts' => $this->attempts,\n 'enqueued' => $this->enqueued,\n 'serialized' => date('Y-m-d H:i:s'),\n ];\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function serialize()\n {\n return serialize(get_object_vars($this));\n }", "public function getInfo(): array\n {\n return $this->info;\n }", "private function setInfoKeys() {\n\t\tif (!empty(self::$s_aInfoKeys)) {\n\t\t\treturn;\n\t\t}\n\n\t\tself::$s_aInfoKeys = array(\n\t\t\t'ID', 'ProfileID', 'Nickname', 'Level', 'TempLevel',\n\t\t\t'IP', 'JoinTime', 'LogInTime',\n\t\t);\n\t}", "public function jsonSerialize() : array {\n\t\t$fields = get_object_vars($this);\n\n\t\t$fields[\"userId\"] = $this->userId->toString();\n\t\t$fields[\"userProfileId\"] = $this->userProfileId->toString();\n\n\t\treturn($fields);\n\t}", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function jsonSerialize() {\n return get_object_vars($this);\n }", "public function JsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\treturn ($fields);\n\t}", "public function JsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\treturn ($fields);\n\t}", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\tunset($fields[\"volEmailActivation\"]);\n\t\tunset($fields[\"volHash\"]);\n\t\tunset($fields[\"volSalt\"]);\n\t\treturn($fields);\n\t}", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "public function jsonSerialize(): array {\n\t\t$fields = get_object_vars($this);\n\n\t\t$fields[\"articleId\"] = $this->articleId->toString();\n\t\t$fields[\"articleProfileId\"] = $this->articleProfileId->toString();\n\n\t\t//format the date so that the front end can consume it\n\t\t$fields[\"articleDate\"] = round(floatval($this->articleDate->format(\"U.u\")) * 1000);\n\t\treturn ($fields);\n\t}", "public function jsonSerialize() : array {\n\t\t$fields = get_object_vars($this);\n\n\t\t$fields[\"cookbookRecipeId\"] = $this->cookbookRecipeId->toString();\n\t\t$fields[\"cookbookUserId\"] = $this->cookbookUserId->toString();\n\n\t\treturn($fields);\n\t}", "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\treturn ($fields);\n\t}", "public function jsonSerialize() : array {\n\t\t$fields = get_object_vars($this);\n\t\t$fields[\"saveJobPostingId\"] = $this->savedJobPostingId->toString();\n\t}", "public function jsonSerialize()\r\n {\r\n return get_object_vars($this);\r\n }", "public function jsonSerialize()\n\t{\n\n\t\treturn get_object_vars($this);\n\n\t}" ]
[ "0.64947146", "0.62652767", "0.6263716", "0.6253974", "0.6228656", "0.62259215", "0.6186687", "0.61436033", "0.61436033", "0.61436033", "0.61313325", "0.61070704", "0.6099184", "0.6097074", "0.6097074", "0.60861224", "0.60861224", "0.60814995", "0.60717505", "0.60717505", "0.60717505", "0.60717505", "0.60717505", "0.60717505", "0.60670376", "0.60655063", "0.60644656", "0.6056405", "0.60503733", "0.604748" ]
0.71195203
0
Initialize the units post type
function __construct() { add_action( 'init', array( $this, 'init_post_type' ) ); // Setup the custom columns for the CPT add_filter( 'manage_edit-units_columns', array( $this, 'edit_units_columns' ) ); add_action( 'manage_units_posts_custom_column', array( $this, 'manage_units_columns' ) ); add_filter( 'manage_edit-units_sortable_columns', array( $this, 'units_sortable_columns' ) ); add_filter( 'request', array( $this, 'sort_units' ) ); // Setup metaboxes add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) ); add_action( 'save_post', array( $this, 'save_unit_meta_boxes' ) ); // Add custom messages add_filter( 'post_updated_messages', array( $this, 'updated_messages' ) ); // Load default templates add_filter( 'template_include', array( $this, 'load_templates' ) ); // Load frontend styles/scripts add_action( 'init', array( $this, 'load_scripts') ); add_action( 'init', array( $this, 'load_styles' ) ); // Load backend styles/scripts add_action('admin_print_scripts', array( $this, 'load_admin_scripts' ) ); add_action('admin_print_styles', array( $this, 'load_admin_styles' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_post_type() {\n\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Unit', 'Post Type General Name', 'wppm' ),\n\t\t\t'singular_name' => _x( 'Unit', 'Post Type Singular Name', 'wppm' ),\n\t\t\t'menu_name' => __( 'Units', 'wppm' ),\n\t\t\t'parent_item_colon' => __( 'Parent Item:', 'wppm' ),\n\t\t\t'all_items' => __( 'All Units', 'wppm' ),\n\t\t\t'view_item' => __( 'View Unit', 'wppm' ),\n\t\t\t'add_new_item' => __( 'Add New Unit', 'wppm' ),\n\t\t\t'add_new' => __( 'Add New', 'wppm' ),\n\t\t\t'edit_item' => __( 'Edit Unit', 'wppm' ),\n\t\t\t'update_item' => __( 'Update Unit', 'wppm' ),\n\t\t\t'search_items' => __( 'Search Units', 'wppm' ),\n\t\t\t'not_found' => __( 'Not found', 'wppm' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'wppm' ),\n\t\t);\n\t\t$args = array(\n\t\t\t'label' => __( 'units', 'wppm' ),\n\t\t\t'description' => __( 'Units', 'wppm' ),\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => array( 'title', 'thumbnail', ),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'menu_position' => 5,\n\t\t\t//'menu_icon' => '',\n\t\t\t'can_export' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'capability_type' => 'post',\n\t\t);\n\t\tregister_post_type( 'units', $args );\n\t\tflush_rewrite_rules();\n\t\t\n\t\tadd_image_size( 'tiles-featured', 225, 225, true );\n\t\tadd_image_size( 'mini-tiles', 80, 55, true );\n\t}", "function register_post_type_unit(){\n\n\n\t\t$labels = array(\n\t\t\t\t\t\t'name' => _x('Unit', 'post type general name'),\n\t\t\t\t\t\t'singular_name' => _x('Unit', 'post type singular name'),\n\t\t\t\t\t\t'add_new' => _x('Add New', 'unit'),\n\t\t\t\t\t\t'add_new_item' => __('Add New '),\n\t\t\t\t\t\t'edit_item' => __('Edit '),\n\t\t\t\t\t\t'new_item' => __('New '),\n\t\t\t\t\t\t'all_items' => __('All Units'),\n\t\t\t\t\t\t'view_item' => __('View Unit'),\n\t\t\t\t\t\t'search_items' => __('Search Units'),\n\t\t\t\t\t\t'not_found' => __('No Units found'),\n\t\t\t\t\t\t'not_found_in_trash' => __('No Units found in Trash'),\n\t\t\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t\t\t'menu_name' => __('Unit'),\n\t\t\t\t\t\t'has_archive' => false\n\n\t\t\t\t\t\t);\n\n\t$args = array(\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => true,\n\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t'has_archive' => true,\n\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t'menu_position' => null, \n\t\t\t\t\t'supports' => array( 'title', 'editor', 'thumbnail')\n\t\t\t\t);\n\n\n\tregister_post_type( 'unit', $args);\n\n\n\t\t// Add new taxonomy, make it hierarchical (like categories)\n\t$labels = array(\n\t\t\t\t\t'name' => _x( 'Unit Type', 'taxonomy general name' ),\n\t\t\t\t\t'singular_name' => _x( 'Unit Type', 'taxonomy singular name' ),\n\t\t\t\t\t'search_items' => __( 'Search Unit Types' ),\n\t\t\t\t\t'all_items' => __( 'All Unit Types' ),\n\t\t\t\t\t'parent_item' => __( 'Parent Unit Type' ),\n\t\t\t\t\t'parent_item_colon' => __( 'Parent Unit Type:' ),\n\t\t\t\t\t'edit_item' => __( 'Edit Unit Type' ),\n\t\t\t\t\t'update_item' => __( 'Update Unit Type' ),\n\t\t\t\t\t'add_new_item' => __( 'Add New Unit Type' ),\n\t\t\t\t\t'new_item_name' => __( 'New Unit Type Name' ),\n\t\t\t\t\t'menu_name' => __( 'Unit Type' ),\n\t\t\t\t\t);\n\n\tregister_taxonomy( 'unit_type',array('unit'), array(\n\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array( 'slug' => 'unit'),\n\t\t\t\t\t));\n $labels = array(\n 'name' => _x( 'Building', 'taxonomy general name' ),\n 'singular_name' => _x( 'Building', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Unit Buildings' ),\n 'all_items' => __( 'All Buildings' ),\n 'parent_item' => __( 'Parent Building' ),\n 'parent_item_colon' => __( 'Parent Building:' ),\n 'edit_item' => __( 'Edit Building' ),\n 'update_item' => __( 'Update Building' ),\n 'add_new_item' => __( 'Add New Building' ),\n 'new_item_name' => __( 'New Building Name' ),\n 'menu_name' => __( 'Building' ),\n );\n\n register_taxonomy( 'building',array('unit'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'unit'),\n ));\n}", "function Units($args=array())\n {\n $this->Hash2Object($args);\n $this->AlwaysReadData=array(\"Name\");\n $this->Sort=array(\"Name\");\n $this->IDGETVar=\"Unit\";\n $this->UploadFilesHidden=FALSE;\n }", "public static function cpt_init() {\n\t\tforeach ( self::$types as $type ) {\n\t\t\tself::evo_custom_post_type( $type['type'] );\n\t\t}\n\t}", "public function slate_post_type_init() {\n\n new Slate_Post_Type('Characters', array(\n 'has_archive' => true,\n 'rewrite' => array(\n 'with_front' => false,\n 'slug' => 'characters'\n )\n ));\n\n new Slate_Post_Type('Items', array(\n 'has_archive' => true,\n 'rewrite' => array(\n 'with_front' => false,\n 'slug' => 'items'\n )\n ));\n\n new Slate_Post_Type('Games', array(\n 'has_archive' => true,\n 'rewrite' => array(\n 'with_front' => false,\n 'slug' => 'game-library'\n )\n ));\n\n }", "public function init()\n \t{\n \t\t// Initialize Post Type\n \t\t$this->create_post_type();\n \t\tadd_action('save_post', array($this, 'save_post'));\n \t}", "public function init()\n \t{\n \t\t// Initialize Post Type\n \t\t$this->create_post_type();\n \t\tadd_action('save_post', array(&$this, 'save_post'));\n \t}", "public function setUnits($units)\n {\n $this->units = $units;\n }", "public function __construct(){\n\n\t\tparent::setUnits($this->bytesUnits);\n\t}", "public function __construct()\n\t{\n\t\t$this->type('post');\n\t}", "public static function init() {\n\t\tadd_action( 'init', array( __CLASS__, 'register_post_type' ), 1 );\n\t}", "public static function __setUnits($units){\r\n self::$_units[] = $units;\r\n return $units;\r\n }", "public function __construct() {\n\t\t\tadd_action( 'init', array( &$this, 'register_post_type' ) );\n\t\t}", "public function initPostType(){\n\t\tforeach( $this->posttype as $pt ){\n\t\t\t$pt = WPO_FRAMEWORK_POSTTYPE.$pt.'.php';\n\t\t\tif( is_file($pt) ){\n\t\t\t\trequire_once($pt);\n\t\t\t}\n\t\t}\n\t}", "function __construct() {\n\n\t\t$this->ID = 'example';\n\n\t\t$this->singlename = 'Post Type';\n\t\t$this->pluralname = 'Post Types';\n\n\t\t$this->args = array(\n\t\t\t'taxonomies' => array('category')\n\t\t);\n\n\t\tparent::__construct();\n\n\t}", "public function __construct($unit = '') {\n $this->init();\n $this->exp = $this->unitExp($unit);\n }", "function initialize() {\n\t\t$this->number = 1;\n\t\t$this->post_types = array();\n\t\t$this->widget_form_fields = array();\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );\n\t\tadd_action( 'save_post', array( $this, 'save_widget_post_meta' ), 10, 3 );\n\t}", "public static function ppInit()\n\t{\n\t\tself::$definition['fields'] = array_merge(self::$definition['fields'], array(\n\t\t\t'minimal_quantity' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'validateProductQuantity'), \t\t\t'minimal_quantity_fractional' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isUnsignedFloat')\n\t\t));\n\t}", "function __construct(){\n\t\t\tadd_action( 'init' , array( $this, 'custom_post_type' ) );\n\t\t}", "private function initCustomPostType(){\n //Instantiate our custom post type object\n $this->cptWPDS = new PostType($this->wpdsPostType);\n \n //Set our custom post type properties\n $this->cptWPDS->setSingularName($this->wpdsPostTypeName);\n $this->cptWPDS->setPluralName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setMenuName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setLabels('Add New', 'Add New '.$this->wpdsPostTypeName, 'Edit '.$this->wpdsPostTypeName, 'New '.$this->wpdsPostTypeName, 'All '.$this->wpdsPostTypeNamePlural, 'View '.$this->wpdsPostTypeNamePlural, 'Search '.$this->wpdsPostTypeNamePlural, 'No '.strtolower($this->wpdsPostTypeNamePlural).' found', 'No '.strtolower($this->wpdsPostTypeNamePlural).' found in the trash');\n $this->cptWPDS->setMenuIcon('dashicons-welcome-write-blog');\n $this->cptWPDS->setSlug($this->wpdsPostType);\n $this->cptWPDS->setDescription('Writings from the universe');\n $this->cptWPDS->setShowInMenu(true);\n $this->cptWPDS->setPublic(true);\n $this->cptWPDS->setTaxonomies([$this->wpdsPostType]);\n $this->cptWPDS->removeSupports(['title']);\n \n //Register custom post type\n $this->cptWPDS->register();\n }", "public function init_post_type() {\n\t\t\t\n\t\t\t$labels = array(\n\t\t\t\t'name'\t\t\t\t=> 'Meetups',\n\t\t\t\t'new_item'\t\t\t=> 'Neues Meetup',\n\t\t\t\t'singular_name'\t\t=> 'Meetup',\n\t\t\t\t'view_item'\t\t\t=> 'Zeige Meetups',\n\t\t\t\t'edit_item'\t\t\t=> 'Editiere Meetup',\n\t\t\t\t'add_new_item'\t\t=> 'Meetup hinzuf&uuml;gen',\n\t\t\t\t'not_found'\t\t\t=> 'Kein Meetup gefunden',\n\t\t\t\t'search_items'\t\t=> 'Durchsuche Meetups',\n\t\t\t\t'parent_item_colon' => ''\n\t\t\t);\n\t\t\t\n\t\t\t$supports = array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'comments',\n\t\t\t);\n\t\t\t\n\t\t\t$args = array(\n\t\t\t\t'public'\t\t\t\t=> TRUE,\n\t\t\t\t'publicly_queryable'\t=> TRUE,\n\t\t\t\t'show_ui'\t\t\t\t=> TRUE, \n\t\t\t\t'query_var'\t\t\t\t=> TRUE,\n\t\t\t\t'capability_type'\t\t=> 'post',\n\t\t\t\t'hierarchical'\t\t\t=> FALSE,\n\t\t\t\t'menu_position'\t\t\t=> NULL,\n\t\t\t\t'supports'\t\t\t\t=> $supports,\n\t\t\t\t'has_archive'\t\t\t=> TRUE,\n\t\t\t\t'rewrite'\t\t\t\t=> TRUE,\n\t\t\t\t'labels'\t\t\t\t=> $labels\n\t\t\t);\n\t\t\t\n\t\t\tregister_post_type( 'wpmeetups', $args );\n\t\t}", "public function __construct()\n {\n // Metres, Centimetres, Millimetres, Yards, Foot, Inches\n $conversions = array(\n 'Weight' => array(\n 'base' => 'kg',\n 'conv' => array(\n 'g' => 1000,\n 'mg' => 1000000,\n 't' => 0.001,\n 'oz' => 35.274,\n 'lb' => 2.2046,\n )\n ),\n 'Distance' => array(\n 'base' => 'km',\n 'conv' => array(\n 'm' => 1000,\n 'cm' => 100000,\n 'mm' => 1000000,\n 'in' => 39370,\n 'ft' => 3280.8,\n 'yd' => 1093.6\n )\n )\n );\n\n foreach ($conversions as $val) {\n $this->addConversion($val['base'], $val['conv']);\n }\n }", "function init() {\n\n\t\t// Create Post Type\n\t\tadd_action( 'init', array( $this, 'post_type' ) );\n\n\t\t// Post Type columns\n\t\tadd_filter( 'manage_edit-event_columns', array( $this, 'edit_event_columns' ), 20 );\n\t\tadd_action( 'manage_event_posts_custom_column', array( $this, 'manage_event_columns' ), 20, 2 );\n\n\t\t// Post Type sorting\n\t\tadd_filter( 'manage_edit-event_sortable_columns', array( $this, 'event_sortable_columns' ), 20 );\n\t\t//add_action( 'load-edit.php', array( $this, 'edit_event_load' ), 20 );\n\n\t\t// Post Type title placeholder\n\t\tadd_filter( 'enter_title_here', array( $this, 'title_placeholder' ) );\n\n\t\t// Create Metabox\n\t\t$metabox = apply_filters( 'be_events_manager_metabox_override', false );\n\t\tif ( false === $metabox ) {\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'metabox_styles' ) );\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'metabox_scripts' ) );\n\t\t\tadd_action( 'add_meta_boxes', array( $this, 'metabox_register' ) );\n\t\t\tadd_action( 'save_post', array( $this, 'metabox_save' ), 1, 2 );\n\t\t}\n\n\t\t// Generate Events\n\t\tadd_action( 'wp_insert_post', array( $this, 'generate_events' ) );\n\t\tadd_action( 'wp_insert_post', array( $this, 'regenerate_events' ) );\n\t}", "protected function _getUnitsPerEm() {}", "public function __construct() {\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );\n\n\t\tadd_shortcode( 'demo-test', array( $this, 'demo_shortcode' ) );\n\n\t\tadd_action( 'init', array( $this, 'register_post_type' ) );\n\n\t\tadd_action( 'init', array( $this, 'generate_custom_post_type' ) );\n\n\t\t//add_action( 'init', array( $this, 'rewrite_rules' ) );\n\n\t\tadd_action( 'template_include', array( $this, 'custom_post_type_archive' ) );\n\n\t\tadd_action( 'template_include', array( $this, 'custom_post_type_archive_template' ) );\n\n\t\tadd_filter( 'single_template', array( $this, 'get_custom_post_type_template' ) );\n\n\t\tadd_action( 'admin_menu', array( $this, 'custom_menu_page' ) );\n\n\t\tadd_action( 'admin_init', array( $this, 'add_options' ) );\n\n\t\tadd_action( 'init', array( $this, 'generate_post_type' ) );\n\n\t\tadd_filter( 'post_type_link', array( $this, 'update_permalinks' ), 10, 2 );\n\t\tadd_filter( 'post_type_link', array( $this, 'update_post_permalinks' ), 10, 2 );\n\n\t\tadd_filter('term_link', array( $this, 'update_term_link' ) );\n\n\t add_action( 'wp_footer', function() {\n\t\t\tglobal $wp_query;\n\t\t\t//print_r( $wp_query );\n\t\t\tprint_r($this->post_types);\n\t\t});\n\t}", "public function __construct() {\n\t\t\t$this->field_type = 'number';\n\n\t\t\tparent::__construct();\n\t\t}", "public function setup() {\n\t\t$data_structures = new Data_Structures();\n\t\t$data_structures->setup();\n\t\t$data_structures->add_post_type( $this->post_type, [\n\t\t\t'singular' => 'Customer',\n\t\t\t'supports' => [ 'title' ],\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t] );\n\t\tadd_action( \"fm_post_{$this->post_type}\", [ $this, 'init' ] );\n\t}", "public function __construct(){\n //Create our custom taxonomy\n $this->initCustomTaxonomy();\n \n //Create our custom post type\n $this->initCustomPostType();\n \n //Manage our columns for our admin page\n $this->initColumns();\n }", "public function run()\n {\n Type::create([\n 'name' => 'Prototype',\n 'speed' => 60,\n 'fuelUnits' => 10,\n 'milesPerUnit' => 10\n ]);\n Type::create([\n 'name' => 'Normal',\n 'speed' => 40,\n 'fuelUnits' => 20,\n 'milesPerUnit' => 5\n ]);\n Type::create([\n 'name' => 'TransContinental',\n 'speed' => 20,\n 'fuelUnits' => 50,\n 'milesPerUnit' => 30\n ]);\n }", "public function __construct() {\n\n // Register the post type\n add_action('init', [ $this, 'reg_post_type' ] );\n add_action('init', [ $this, 'add_taxonomy' ] );\n add_action('init', [ $this, 'add_tags' ] );\n\n add_action( 'add_meta_boxes', [ $this, 'add_metabox' ], 1 );\n add_action( 'save_post', [ $this, 'save_metabox' ], 10, 2 );\n\n }" ]
[ "0.7033522", "0.6397466", "0.62332827", "0.6122542", "0.6092153", "0.59678835", "0.5914289", "0.5881884", "0.5808739", "0.5807038", "0.57591206", "0.57487965", "0.5719409", "0.57109785", "0.5696548", "0.5678446", "0.56705475", "0.5655557", "0.5639669", "0.55682725", "0.55647904", "0.5557075", "0.55021954", "0.5491711", "0.5485983", "0.5468135", "0.5461891", "0.5445995", "0.5434946", "0.5417894" ]
0.6537973
1
Initializes the "Units" custom post type in WP. We also add the two additional image sizes for our templates.
function init_post_type() { $labels = array( 'name' => _x( 'Unit', 'Post Type General Name', 'wppm' ), 'singular_name' => _x( 'Unit', 'Post Type Singular Name', 'wppm' ), 'menu_name' => __( 'Units', 'wppm' ), 'parent_item_colon' => __( 'Parent Item:', 'wppm' ), 'all_items' => __( 'All Units', 'wppm' ), 'view_item' => __( 'View Unit', 'wppm' ), 'add_new_item' => __( 'Add New Unit', 'wppm' ), 'add_new' => __( 'Add New', 'wppm' ), 'edit_item' => __( 'Edit Unit', 'wppm' ), 'update_item' => __( 'Update Unit', 'wppm' ), 'search_items' => __( 'Search Units', 'wppm' ), 'not_found' => __( 'Not found', 'wppm' ), 'not_found_in_trash' => __( 'Not found in Trash', 'wppm' ), ); $args = array( 'label' => __( 'units', 'wppm' ), 'description' => __( 'Units', 'wppm' ), 'labels' => $labels, 'supports' => array( 'title', 'thumbnail', ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, //'menu_icon' => '', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', ); register_post_type( 'units', $args ); flush_rewrite_rules(); add_image_size( 'tiles-featured', 225, 225, true ); add_image_size( 'mini-tiles', 80, 55, true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n\t\tadd_action( 'init', array( $this, 'init_post_type' ) );\n\n\t\t// Setup the custom columns for the CPT\n\t\tadd_filter( 'manage_edit-units_columns', array( $this, 'edit_units_columns' ) );\n\t\tadd_action( 'manage_units_posts_custom_column', array( $this, 'manage_units_columns' ) );\n\t\tadd_filter( 'manage_edit-units_sortable_columns', array( $this, 'units_sortable_columns' ) );\n\t\tadd_filter( 'request', array( $this, 'sort_units' ) );\n\n\t\t// Setup metaboxes\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );\n\t\tadd_action( 'save_post', array( $this, 'save_unit_meta_boxes' ) );\n\n\t\t// Add custom messages\n\t\tadd_filter( 'post_updated_messages', array( $this, 'updated_messages' ) );\n\n\t\t// Load default templates\n\t\tadd_filter( 'template_include', array( $this, 'load_templates' ) );\n\n\t\t// Load frontend styles/scripts\n\t\tadd_action( 'init', array( $this, 'load_scripts') );\n\t\tadd_action( 'init', array( $this, 'load_styles' ) );\n\n\t\t// Load backend styles/scripts\n\t\tadd_action('admin_print_scripts', array( $this, 'load_admin_scripts' ) );\n\t\tadd_action('admin_print_styles', array( $this, 'load_admin_styles' ) );\n\t}", "protected function init() {\n\t\t$this->load_image_sizes();\n\n\t\t// Set image size to WP\n\t\t$this->add_image_sizes();\n\t}", "function register_post_type_unit(){\n\n\n\t\t$labels = array(\n\t\t\t\t\t\t'name' => _x('Unit', 'post type general name'),\n\t\t\t\t\t\t'singular_name' => _x('Unit', 'post type singular name'),\n\t\t\t\t\t\t'add_new' => _x('Add New', 'unit'),\n\t\t\t\t\t\t'add_new_item' => __('Add New '),\n\t\t\t\t\t\t'edit_item' => __('Edit '),\n\t\t\t\t\t\t'new_item' => __('New '),\n\t\t\t\t\t\t'all_items' => __('All Units'),\n\t\t\t\t\t\t'view_item' => __('View Unit'),\n\t\t\t\t\t\t'search_items' => __('Search Units'),\n\t\t\t\t\t\t'not_found' => __('No Units found'),\n\t\t\t\t\t\t'not_found_in_trash' => __('No Units found in Trash'),\n\t\t\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t\t\t'menu_name' => __('Unit'),\n\t\t\t\t\t\t'has_archive' => false\n\n\t\t\t\t\t\t);\n\n\t$args = array(\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => true,\n\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t'has_archive' => true,\n\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t'menu_position' => null, \n\t\t\t\t\t'supports' => array( 'title', 'editor', 'thumbnail')\n\t\t\t\t);\n\n\n\tregister_post_type( 'unit', $args);\n\n\n\t\t// Add new taxonomy, make it hierarchical (like categories)\n\t$labels = array(\n\t\t\t\t\t'name' => _x( 'Unit Type', 'taxonomy general name' ),\n\t\t\t\t\t'singular_name' => _x( 'Unit Type', 'taxonomy singular name' ),\n\t\t\t\t\t'search_items' => __( 'Search Unit Types' ),\n\t\t\t\t\t'all_items' => __( 'All Unit Types' ),\n\t\t\t\t\t'parent_item' => __( 'Parent Unit Type' ),\n\t\t\t\t\t'parent_item_colon' => __( 'Parent Unit Type:' ),\n\t\t\t\t\t'edit_item' => __( 'Edit Unit Type' ),\n\t\t\t\t\t'update_item' => __( 'Update Unit Type' ),\n\t\t\t\t\t'add_new_item' => __( 'Add New Unit Type' ),\n\t\t\t\t\t'new_item_name' => __( 'New Unit Type Name' ),\n\t\t\t\t\t'menu_name' => __( 'Unit Type' ),\n\t\t\t\t\t);\n\n\tregister_taxonomy( 'unit_type',array('unit'), array(\n\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array( 'slug' => 'unit'),\n\t\t\t\t\t));\n $labels = array(\n 'name' => _x( 'Building', 'taxonomy general name' ),\n 'singular_name' => _x( 'Building', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Unit Buildings' ),\n 'all_items' => __( 'All Buildings' ),\n 'parent_item' => __( 'Parent Building' ),\n 'parent_item_colon' => __( 'Parent Building:' ),\n 'edit_item' => __( 'Edit Building' ),\n 'update_item' => __( 'Update Building' ),\n 'add_new_item' => __( 'Add New Building' ),\n 'new_item_name' => __( 'New Building Name' ),\n 'menu_name' => __( 'Building' ),\n );\n\n register_taxonomy( 'building',array('unit'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'unit'),\n ));\n}", "public function setup() {\n\n\t\t//add additional featured image sizes\n\t\t//NOTE: wordpress will allow hyphens in these names, but swig or the API(i'm not sure) will not\n\t\tif ( function_exists( 'add_image_size' ) ) {\n\n add_image_size('progressive', 32, 20, false); \n add_image_size('progressive_cropped', 32, 20, true); \n add_image_size('xs', 300, 187, false); //1.6:1\n add_image_size('sm', 768, 480, false); //1.6:1\n add_image_size('md', 1024, 640, false); //1.6:1\n\n\t\t\tadd_image_size( 'person', 500, 500, false );\n\t\t\t//add_image_size( 'news', 768, 413, true );//edited from 512x275 on 6-2-17 to test image blurriness\n\t\t\t//add_image_size( 'news', 512, 275, true );//original(pre-digital strategy)\n\t\t\tadd_image_size( 'news', 1280, 675, true );//edited from 512x275 on 6-6-17 to improve image quality\n\t\t\tadd_image_size( 'story', 400, 286, true );\n\t\t\tadd_image_size( 'story2', 500, 750, true );\t\t\t\t\t\t\t\t\t\n\t\t\tadd_image_size( 'testimonial', 1024, 550, true );\t\n\t\t\tadd_image_size( 'projectslideshow', 1680, 1680, false );\t\t\t\t\t\t\n\t\t\tadd_image_size( 'category', 1680, 600, true );\t\n\t\t\t//add_image_size( 'hero', 1680, 1050, false );\t\n\t\t\tadd_image_size( 'hero', 1900, 1180, false );\t\t\t\n\t\t\tadd_image_size( 'facebook', 1200, 630, false );\t\t\t\n\n\t\t}\n\n\t\tif ( function_exists( 'add_theme_support' ) ) {\n\t\t\tadd_theme_support( 'post-thumbnails' );\n\t\t}\n\n\n\t\t//register post types\n\t\t//optional - include a custom icon, list of icons available at https://developer.wordpress.org/resource/dashicons/\n\t\tregister_post_type( 'projects',\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Projects',\n\t\t\t\t\t'singular_name' =>'Project',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New Project',\n\t\t\t\t\t'edit_item' => 'Edit Project',\n\t\t\t\t\t'new_item' => 'New Project',\n\t\t\t\t\t'all_items' => 'All Projects',\n\t\t\t\t\t'view_item' => 'View Project',\n\t\t\t\t\t'search_items' => 'Search Projects',\n\t\t\t\t\t'not_found' => 'No Projects found',\n\t\t\t\t\t'not_found_in_trash' => 'No Projects found in Trash',\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'rewrite' => array('slug' => 'projects'),\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rest_base' => 'projects',\n\t\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t\t\t'supports' => array( 'title', 'thumbnail', 'editor'),\n\t\t\t\t'menu_icon' => 'dashicons-building'\n\t\t\t));\n\n\t\tregister_taxonomy( \n\t\t\t'project_categories', \n\t\t\t'projects', \n\t\t\tarray( \n\t\t\t\t'hierarchical' => true, \n\t\t\t\t'label' => 'Project Categories', \n\t\t\t\t'query_var' => true, \n\t\t\t\t'rewrite' => array('slug' => 'project_categories'),\n\t\t\t\t'rest_base' => 'project_categories',\n\t\t\t\t'rest_controller_class' => 'WP_REST_Terms_Controller', \n\t\t\t) \n\t\t);\n\n\n\t\tglobal $wp_taxonomies;\n\t\t$taxonomy_name = 'project_categories';\n\n\t\tif ( isset( $wp_taxonomies[ $taxonomy_name ] ) ) {\n\t\t\t$wp_taxonomies[ $taxonomy_name ]->show_in_rest = true;\n\t\t\t$wp_taxonomies[ $taxonomy_name ]->rest_base = $taxonomy_name;\n\t\t\t$wp_taxonomies[ $taxonomy_name ]->rest_controller_class = 'WP_REST_Terms_Controller';\n\t\t}\t\n\n\t\tregister_post_type( 'people',\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'People',\n\t\t\t\t\t'singular_name' =>'Person',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New Person',\n\t\t\t\t\t'edit_item' => 'Edit Person',\n\t\t\t\t\t'new_item' => 'New Person',\n\t\t\t\t\t'all_items' => 'All People',\n\t\t\t\t\t'view_item' => 'View Person',\n\t\t\t\t\t'search_items' => 'Search People',\n\t\t\t\t\t'not_found' => 'No People found',\n\t\t\t\t\t'not_found_in_trash' => 'No People found in Trash',\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'rewrite' => array('slug' => 'people'),\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rest_base' => 'people',\n\t\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t\t\t'supports' => array( 'title', 'thumbnail', 'editor'),\n\t\t\t\t'menu_icon' => 'dashicons-id'\n\t\t\t));\n\n\t\tregister_post_type( 'news',\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'News',\n\t\t\t\t\t'singular_name' =>'News Item',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New News Item',\n\t\t\t\t\t'edit_item' => 'Edit News Item',\n\t\t\t\t\t'new_item' => 'New News Item',\n\t\t\t\t\t'all_items' => 'All News Items',\n\t\t\t\t\t'view_item' => 'View News Item',\n\t\t\t\t\t'search_items' => 'Search News Items',\n\t\t\t\t\t'not_found' => 'No News Items found',\n\t\t\t\t\t'not_found_in_trash' => 'No News Items found in Trash',\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'rewrite' => array('slug' => 'news'),\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rest_base' => 'news',\n\t\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t\t\t'supports' => array( 'title', 'thumbnail', 'editor'),\n\t\t\t\t'menu_icon'\t=>\t'dashicons-welcome-widgets-menus'\n\t\t\t));\n\n\t\tregister_post_type( 'about',\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Info Pages',\n\t\t\t\t\t'singular_name' => 'Info Page',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New Info Page',\n\t\t\t\t\t'edit_item' => 'Edit Info Page',\n\t\t\t\t\t'new_item' => 'New Info Page',\n\t\t\t\t\t'all_items' => 'All Info Pages',\n\t\t\t\t\t'view_item' => 'View Info Page',\n\t\t\t\t\t'search_items' => 'Search Info Pages',\n\t\t\t\t\t'not_found' => 'No Info Pages found',\n\t\t\t\t\t'not_found_in_trash' => 'No Info Pages found in Trash',\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'rewrite' => array('slug' => 'about'),\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rest_base' => 'about',\n\t\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t\t\t'supports' => array( 'title', 'editor'),\n\t\t\t\t'menu_icon' => 'dashicons-admin-page'\t\t\t\t\n\t\t\t));\n\n\t\tregister_post_type( 'jobs',\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Jobs',\n\t\t\t\t\t'singular_name' => 'Job',\n\t\t\t\t\t'add_new' => 'Add New',\n\t\t\t\t\t'add_new_item' => 'Add New Job',\n\t\t\t\t\t'edit_item' => 'Edit Job',\n\t\t\t\t\t'new_item' => 'New Job',\n\t\t\t\t\t'all_items' => 'All Jobs',\n\t\t\t\t\t'view_item' => 'View Job',\n\t\t\t\t\t'search_items' => 'Search Jobs',\n\t\t\t\t\t'not_found' => 'No Jobs found',\n\t\t\t\t\t'not_found_in_trash' => 'No Jobs found in Trash',\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'has_archive' => true,\t\n\t\t\t\t'rewrite' => array('slug' => 'jobs'),\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rest_base' => 'jobs',\n\t\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t\t\t'supports' => array( 'title', 'editor'),\n\t\t\t\t'menu_icon' => 'dashicons-clipboard'\t\t\t\t\n\t\t\t));\n\n\t\t//add ACF options pages\n\t\t//optional - include a custom icon, list of icons available at https://developer.wordpress.org/resource/dashicons/\n\t\tif( function_exists('acf_add_options_page') ) {\n\t\t\t$option_page = acf_add_options_page(array(\n\t\t\t\t'page_title' \t=> 'Home Page',\n\t\t\t\t'menu_title' \t=> 'Home Page',\n\t\t\t\t'menu_slug' \t=> 'home-page',\n\t\t\t\t'icon_url' => 'dashicons-admin-home',\n\t\t\t\t'position'\t\t=> '50.1',\t\t\t\t\n\t\t\t));\n\t\t\t$option_page = acf_add_options_page(array(\n\t\t\t\t'page_title' \t=> 'About Page',\n\t\t\t\t'menu_title' \t=> 'About Page',\n\t\t\t\t'menu_slug' \t=> 'about-page',\n\t\t\t\t'icon_url' => 'dashicons-index-card',\n\t\t\t\t'position'\t\t=> '50.3',\t\t\t\t\n\t\t\t));\t\t\t\n\t\t\t$option_page = acf_add_options_page(array(\n\t\t\t\t'page_title' \t=> 'Work Page',\n\t\t\t\t'menu_title' \t=> 'Work Page',\n\t\t\t\t'menu_slug' \t=> 'work-page',\n\t\t\t\t'icon_url' => 'dashicons-screenoptions',\n\t\t\t\t'position'\t\t=> '50.5'\n\t\t\t));\t\n\t\t\t$option_page = acf_add_options_page(array(\n\t\t\t\t'page_title' \t=> 'News Page',\n\t\t\t\t'menu_title' \t=> 'News Page',\n\t\t\t\t'menu_slug' \t=> 'news-page',\n\t\t\t\t'icon_url' => 'dashicons-welcome-widgets-menus',\n\t\t\t\t'position'\t\t=> '50.7'\n\t\t\t));\t\n\t\t\t$option_page = acf_add_options_page(array(\n\t\t\t\t'page_title' \t=> 'General Information',\n\t\t\t\t'menu_title' \t=> 'General Information',\n\t\t\t\t'menu_slug' \t=> 'general-information',\n\t\t\t\t'icon_url' => 'dashicons-location',\n\t\t\t\t'position'\t\t=> '50.9'\n\t\t\t));\t\t\t\t\t\t\t\n\t\t}\n\n\t}", "public function slate_post_type_init() {\n\n new Slate_Post_Type('Characters', array(\n 'has_archive' => true,\n 'rewrite' => array(\n 'with_front' => false,\n 'slug' => 'characters'\n )\n ));\n\n new Slate_Post_Type('Items', array(\n 'has_archive' => true,\n 'rewrite' => array(\n 'with_front' => false,\n 'slug' => 'items'\n )\n ));\n\n new Slate_Post_Type('Games', array(\n 'has_archive' => true,\n 'rewrite' => array(\n 'with_front' => false,\n 'slug' => 'game-library'\n )\n ));\n\n }", "function init(){\n\t\t$this->register_cpt_lumo_slides();\n\n\t\tadd_action( 'admin_head', array($this, 'plugin_header_image') );\n\t\tadd_action( 'admin_head', array($this, 'lumo_cpt_icons') );\n\n\t\tadd_action('admin_menu', array($this, 'admin_menus') );\n\n\t\tadd_action('wp_enqueue_scripts', array($this, 'enqueue') );\n\n\t\t/**\n\t\t *\tSet Custom Main Slider Image size\n\t\t */\n\t\tadd_image_size('home-slider-image', 1600, 600);\n\t\tadd_image_size('home-slider-image-lowrez', 1366, 512);\n\t}", "public function __construct() {\n\t\t\t// Load Custom Post Type\n\t\t\tadd_filter( 'init', array( $this, 'init_post_type' ) );\n\t\t\t\n\t\t\tif ( 'wpmeetups' == $_GET[ 'post_type' ] || 'wpmeetups' == get_post_type( $_GET[ 'post' ] ) ) {\n\t\t\t\t// Scripts\n\t\t\t\tadd_filter( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );\n\t\t\t\t// Add Metaboxes on our pages\n\t\t\t\tadd_filter( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );\n\t\t\t}\n\t\t\t\n\t\t\t// Save Post-Meta\n\t\t\tadd_filter( 'save_post', array( $this, 'save_post' ) );\n\t\t\t\n\t\t\t// The Gallery\n\t\t\tadd_filter( 'init', array( $this, 'theme_support' ) );\n\t\t\tadd_filter( 'wp_ajax_photo_gallery_upload', array( $this, 'handle_file_upload' ) );\n\t\t\tadd_filter( 'wp_ajax_save_items_order', array( $this, 'save_items_order' ) );\n\t\t\tadd_filter( 'wp_ajax_delete_gallery_item', array( $this, 'delete_gallery_item' ) );\n\t\t\tadd_filter( 'wp_ajax_update_attachment', array( $this, 'update_attachment' ) );\n\t\t\tadd_filter( 'wp_ajax_refresh_gallery', array( $this, 'draw_gallery_items' ) );\n\t\t}", "function top_lot_init() {\n\tregister_post_type( 'top-lot', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Top Lots', 'wordplate' ),\n\t\t\t'singular_name' => __( 'Top Lot', 'wordplate' ),\n\t\t\t'all_items' => __( 'All Top Lots', 'wordplate' ),\n\t\t\t'archives' => __( 'Top Lot Archives', 'wordplate' ),\n\t\t\t'attributes' => __( 'Top Lot Attributes', 'wordplate' ),\n\t\t\t'insert_into_item' => __( 'Insert into Top Lot', 'wordplate' ),\n\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this Top Lot', 'wordplate' ),\n\t\t\t'featured_image' => _x( 'Featured Image', 'top-lot', 'wordplate' ),\n\t\t\t'set_featured_image' => _x( 'Set featured image', 'top-lot', 'wordplate' ),\n\t\t\t'remove_featured_image' => _x( 'Remove featured image', 'top-lot', 'wordplate' ),\n\t\t\t'use_featured_image' => _x( 'Use as featured image', 'top-lot', 'wordplate' ),\n\t\t\t'filter_items_list' => __( 'Filter Top Lots list', 'wordplate' ),\n\t\t\t'items_list_navigation' => __( 'Top Lots list navigation', 'wordplate' ),\n\t\t\t'items_list' => __( 'Top Lots list', 'wordplate' ),\n\t\t\t'new_item' => __( 'New Top Lot', 'wordplate' ),\n\t\t\t'add_new' => __( 'Add New', 'wordplate' ),\n\t\t\t'add_new_item' => __( 'Add New Top Lot', 'wordplate' ),\n\t\t\t'edit_item' => __( 'Edit Top Lot', 'wordplate' ),\n\t\t\t'view_item' => __( 'View Top Lot', 'wordplate' ),\n\t\t\t'view_items' => __( 'View Top Lots', 'wordplate' ),\n\t\t\t'search_items' => __( 'Search Top Lots', 'wordplate' ),\n\t\t\t'not_found' => __( 'No Top Lots found', 'wordplate' ),\n\t\t\t'not_found_in_trash' => __( 'No Top Lots found in trash', 'wordplate' ),\n\t\t\t'parent_item_colon' => __( 'Parent Top Lot:', 'wordplate' ),\n\t\t\t'menu_name' => __( 'Top Lots', 'wordplate' ),\n\t\t),\n\t\t'public' => true,\n\t\t'hierarchical' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'supports' => array( 'title','page-attributes' ),\n\t\t'has_archive' => false,\n\t\t'rewrite' => false,\n\t\t'query_var' => false,\n\t\t'menu_position' => null,\n\t\t'menu_icon' => 'dashicons-admin-post',\n\t\t'show_in_rest' => true,\n\t\t'rest_base' => 'top-lots',\n\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t) );\n\n}", "function init() {\n\n\t\t// Create Post Type\n\t\tadd_action( 'init', array( $this, 'post_type' ) );\n\n\t\t// Post Type columns\n\t\tadd_filter( 'manage_edit-event_columns', array( $this, 'edit_event_columns' ), 20 );\n\t\tadd_action( 'manage_event_posts_custom_column', array( $this, 'manage_event_columns' ), 20, 2 );\n\n\t\t// Post Type sorting\n\t\tadd_filter( 'manage_edit-event_sortable_columns', array( $this, 'event_sortable_columns' ), 20 );\n\t\t//add_action( 'load-edit.php', array( $this, 'edit_event_load' ), 20 );\n\n\t\t// Post Type title placeholder\n\t\tadd_filter( 'enter_title_here', array( $this, 'title_placeholder' ) );\n\n\t\t// Create Metabox\n\t\t$metabox = apply_filters( 'be_events_manager_metabox_override', false );\n\t\tif ( false === $metabox ) {\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'metabox_styles' ) );\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'metabox_scripts' ) );\n\t\t\tadd_action( 'add_meta_boxes', array( $this, 'metabox_register' ) );\n\t\t\tadd_action( 'save_post', array( $this, 'metabox_save' ), 1, 2 );\n\t\t}\n\n\t\t// Generate Events\n\t\tadd_action( 'wp_insert_post', array( $this, 'generate_events' ) );\n\t\tadd_action( 'wp_insert_post', array( $this, 'regenerate_events' ) );\n\t}", "function roots_setup() {\n // Add post thumbnails\n // http://codex.wordpress.org/Post_Thumbnails\n // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size\n // http://codex.wordpress.org/Function_Reference/add_image_size\n add_theme_support('post-thumbnails');\n // Add custom slider sizes\n add_image_size('slider_large', 1680, 670, true); // desktop - tablet landscape\n add_image_size('slider_medium', 1024, 408, true); // tablet landscape - tablet portrait\n add_image_size('slider_small', 768, 306, true); // tablet portrait - mobile\n // Tell the TinyMCE editor to use a custom stylesheet\n add_editor_style('/assets/css/editor-style.css');\n}", "public function setup() {\n $this->min_level = apply_filters( 'brg/ptt/minimum_user_level', 'activate_plugins' );\n\n add_filter( 'brg/posts_with_templates', array( $this, 'post_types_with_templates' ), 10, 1 );\n\n $this->admin_controller = new BRG_PTT_Admin_Interface_Controller( $this->min_level );\n $this->template_loader = new BRG_Template_Loader(); \n\n // setup the template post type\n $this->setup_posttype();\n }", "public function init()\n \t{\n \t\t// Initialize Post Type\n \t\t$this->create_post_type();\n \t\tadd_action('save_post', array($this, 'save_post'));\n \t}", "function gallery_init() {\n $labels = array(\n 'name' => 'Imágenes de la galería',\n 'singular_name' => 'Imagen de la galería',\n 'add_new_item' => 'New Image de la galería',\n 'edit_item' => 'Editar Imagen de la galería',\n 'new_item' => 'Nueva Imagen de la galería',\n 'view_item' => 'Ver Imagen de la galería',\n 'search_items' => 'Buscar Imágenes de la galería',\n 'not_found' => 'Imágenes de la galería noencontradas',\n 'not_found_in_trash' => 'Ninguna Imagen de la galería en la papelera'\n );\n $args = array(\n 'labels' => $labels,\n 'public' => false,\n 'show_ui' => true,\n 'supports' => array('thumbnail')\n );\n\n register_post_type( 'gallery', $args );\n}", "function ks_create_post_type() {\n\tregister_post_type( 'image-entry',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Comp. Entries', 'kilpailusivu' ),\n\t\t\t\t'singular_name' => __( 'Entry', 'kilpailusivu' ),\n\t\t\t\t'add_new' => __( 'Add New', 'kilpailusivu' ),\n\t\t\t\t'add_new_item' => __( 'Add New Entry', 'kilpailusivu' ),\n\t\t\t\t'edit' => __( 'Edit', 'kilpailusivu' ),\n\t\t\t\t'edit_item' => __( 'Edit Entry', 'kilpailusivu' ),\n\t\t\t\t'new_item' => __( 'New Entry', 'kilpailusivu' ),\n\t\t\t\t'view' => __( 'View', 'kilpailusivu' ),\n\t\t\t\t'view_item' => __( 'View Entry', 'kilpailusivu' ),\n\t\t\t\t'search_items' => __( 'Search Entries', 'kilpailusivu' ),\n\t\t\t\t'not_found' => __( 'No Entries found', 'kilpailusivu' ),\n\t\t\t\t'not_found_in_trash' => __( 'No Entries found in Trash', 'kilpailusivu' )\n\t\t\t),\n\t\t\t'public' => true,\n\t\t\t'hierarchical' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t),\n\t\t\t'menu_icon' => 'dashicons-smiley',\n\t\t\t'can_export' => true,\n\t\t\t'taxonomies' => array()\n\t\t) );\n}", "public function __construct() {\n $this->shopTypeOriginalImageUploadPath = Config::get('constant.SHOP_TYPE_ORIGINAL_IMAGE_UPLOAD_PATH');\n $this->shopTypeThumbImageUploadPath = Config::get('constant.SHOP_TYPE_THUMB_IMAGE_UPLOAD_PATH');\n $this->shopTypeThumbImageHeight = Config::get('constant.SHOP_TYPE_THUMB_IMAGE_HEIGHT');\n $this->shopTypeThumbImageWidth = Config::get('constant.SHOP_TYPE_THUMB_IMAGE_WIDTH');\n }", "public function init()\n \t{\n \t\t// Initialize Post Type\n \t\t$this->create_post_type();\n \t\tadd_action('save_post', array(&$this, 'save_post'));\n \t}", "function setup_post_types() {\n\t\t//Default support for WP Pages\n\t\tadd_post_type_support('page','sliders');\n\t\t\n\t\t/**\n\t\t * @cpt Sliders\n\t\t */\n\t\t$labels = array(\n\t\t\t'name' => __('Sliders','tw-sliders'),\n\t\t\t'singular_name' => __('Slider','tw-sliders'),\n\t\t\t'add_new' => __('Add slider','tw-sliders'),\n\t\t\t'add_new_item' => __('Add new slider','tw-sliders')\n\t\t);\n\t\t\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => 'themes.php',\n\t\t\t'supports' => array('title','sliders')\n\t\t); \n\t\t\n\t\tregister_post_type('tw-sliders',$args);\n\t}", "function photos_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'User Photos', 'Post Type General Name', 'twodayssss' ),\n\t\t\t'singular_name' => _x( 'User Album', 'Post Type Singular Name', 'twodayssss' ),\n\t\t\t'menu_name' => __( 'User Photos', 'twodayssss' ),\n\t\t\t'name_admin_bar' => __( 'User Photos', 'twodayssss' ),\n\t\t\t'archives' => __( 'Item Archives', 'twodayssss' ),\n\t\t\t'attributes' => __( 'Item Attributes', 'twodayssss' ),\n\t\t\t'parent_item_colon' => __( 'Parent Item:', 'twodayssss' ),\n\t\t\t'all_items' => __( 'All Items', 'twodayssss' ),\n\t\t\t'add_new_item' => __( 'Add New Item', 'twodayssss' ),\n\t\t\t'add_new' => __( 'Add New', 'twodayssss' ),\n\t\t\t'new_item' => __( 'New Item', 'twodayssss' ),\n\t\t\t'edit_item' => __( 'Edit Item', 'twodayssss' ),\n\t\t\t'update_item' => __( 'Update Item', 'twodayssss' ),\n\t\t\t'view_item' => __( 'View Item', 'twodayssss' ),\n\t\t\t'view_items' => __( 'View Items', 'twodayssss' ),\n\t\t\t'search_items' => __( 'Search Item', 'twodayssss' ),\n\t\t\t'not_found' => __( 'Not found', 'twodayssss' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'twodayssss' ),\n\t\t\t'featured_image' => __( 'Album Cover', 'twodayssss' ),\n\t\t\t'set_featured_image' => __( 'Set album cover', 'twodayssss' ),\n\t\t\t'remove_featured_image' => __( 'Remove album cover', 'twodayssss' ),\n\t\t\t'use_featured_image' => __( 'Use as album cover', 'twodayssss' ),\n\t\t\t'insert_into_item' => __( 'Insert into item', 'twodayssss' ),\n\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'twodayssss' ),\n\t\t\t'items_list' => __( 'Items list', 'twodayssss' ),\n\t\t\t'items_list_navigation' => __( 'Items list navigation', 'twodayssss' ),\n\t\t\t'filter_items_list' => __( 'Filter items list', 'twodayssss' ),\n\t\t);\n\t\t$args = array(\n\t\t\t'label' => __( 'User Photos', 'twodayssss' ),\n\t\t\t'description' => __( 'Image gallery for Ultimate member Users', 'twodayssss' ),\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => array( 'title','thumbnail','author'),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => false,\n\t\t\t'show_ui' => false,\n\t\t\t'show_in_menu' => false,\n\t\t\t'menu_position' => 5,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'can_export' => true,\n\t\t\t'has_archive' => false,\n\t\t\t'exclude_from_search' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'capability_type' => 'page',\n\t\t);\n\t\tregister_post_type( 'um_user_photos', $args );\n\t}", "public function init_post_type() {\n\t\t\t\n\t\t\t$labels = array(\n\t\t\t\t'name'\t\t\t\t=> 'Meetups',\n\t\t\t\t'new_item'\t\t\t=> 'Neues Meetup',\n\t\t\t\t'singular_name'\t\t=> 'Meetup',\n\t\t\t\t'view_item'\t\t\t=> 'Zeige Meetups',\n\t\t\t\t'edit_item'\t\t\t=> 'Editiere Meetup',\n\t\t\t\t'add_new_item'\t\t=> 'Meetup hinzuf&uuml;gen',\n\t\t\t\t'not_found'\t\t\t=> 'Kein Meetup gefunden',\n\t\t\t\t'search_items'\t\t=> 'Durchsuche Meetups',\n\t\t\t\t'parent_item_colon' => ''\n\t\t\t);\n\t\t\t\n\t\t\t$supports = array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'comments',\n\t\t\t);\n\t\t\t\n\t\t\t$args = array(\n\t\t\t\t'public'\t\t\t\t=> TRUE,\n\t\t\t\t'publicly_queryable'\t=> TRUE,\n\t\t\t\t'show_ui'\t\t\t\t=> TRUE, \n\t\t\t\t'query_var'\t\t\t\t=> TRUE,\n\t\t\t\t'capability_type'\t\t=> 'post',\n\t\t\t\t'hierarchical'\t\t\t=> FALSE,\n\t\t\t\t'menu_position'\t\t\t=> NULL,\n\t\t\t\t'supports'\t\t\t\t=> $supports,\n\t\t\t\t'has_archive'\t\t\t=> TRUE,\n\t\t\t\t'rewrite'\t\t\t\t=> TRUE,\n\t\t\t\t'labels'\t\t\t\t=> $labels\n\t\t\t);\n\t\t\t\n\t\t\tregister_post_type( 'wpmeetups', $args );\n\t\t}", "function neurovision_images() {\n \tregister_post_type( 'images', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */\n \t \t// let's now add all the options for this post type\n \t\tarray('labels' => array(\n \t\t\t'name' => __('Images', 'neurovisiontheme'), /* This is the Title of the Group */\n \t\t\t'singular_name' => __('Image', 'neurovisiontheme'), /* This is the individual type */\n \t\t\t'all_items' => __('All Images', 'neurovisiontheme'), /* the all items menu item */\n \t\t\t'add_new' => __('Add New Image', 'neurovisiontheme'), /* The add new menu item */\n \t\t\t'add_new_item' => __('Add New Image', 'neurovisiontheme'), /* Add New Display Title */\n \t\t\t'edit' => __( 'Edit', 'neurovisiontheme' ), /* Edit Dialog */\n \t\t\t'edit_item' => __('Edit Image', 'neurovisiontheme'), /* Edit Display Title */\n \t\t\t'new_item' => __('New Image', 'neurovisiontheme'), /* New Display Title */\n \t\t\t'view_item' => __('View Image', 'neurovisiontheme'), /* View Display Title */\n \t\t\t'search_items' => __('Search Images', 'neurovisiontheme'), /* Search Custom Type Title */\n \t\t\t'not_found' => __('Nothing found in the Database.', 'neurovisiontheme'), /* This displays if there are no entries yet */\n \t\t\t'not_found_in_trash' => __('Nothing found in Trash', 'neurovisiontheme'), /* This displays if there is nothing in the trash */\n \t\t\t'parent_item_colon' => ''\n \t\t\t), /* end of arrays */\n \t\t\t'description' => __( 'neurovision Images', 'neurovisiontheme' ), /* Custom Type Description */\n\n \t\t\t'public' => true,\n \t\t\t'publicly_queryable' => true,\n \t\t\t'exclude_from_search' => false,\n \t\t\t'show_ui' => true,\n \t\t\t'query_var' => true,\n \t\t\t'menu_position' => 6, /* this is what order you want it to appear in on the left hand side menu */\n \t\t\t'menu_icon' => 'dashicons-format-image', /* the icon for the custom post type menu */\n \t\t\t'rewrite'\t=> array( 'slug' => 'images', 'with_front' => false ), /* you can specify its url slug */\n \t\t\t'has_archive' => true, /* you can rename the slug here */\n \t\t\t'capability_type' => 'post',\n \t\t\t'hierarchical' => false,\n \t\t\t/* the next one is important, it tells what's enabled in the post editor */\n \t\t\t'supports' => array( 'title', 'editor', 'page-attributes', 'thumbnail')\n \t \t) /* end of options */\n \t); /* end of register post type */\n\n }", "function initialize() {\n\t\t$this->number = 1;\n\t\t$this->post_types = array();\n\t\t$this->widget_form_fields = array();\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );\n\t\tadd_action( 'save_post', array( $this, 'save_widget_post_meta' ), 10, 3 );\n\t}", "function post_meta_setup(){\n\t\t$type_meta_array = array(\n\t\t\t'settings' => array(\n\t\t\t\t'type' => 'multi_option',\n\t\t\t\t'title' => __( 'Single '.$this->single_up.' Options', 'pagelines' ),\n\t\t\t\t'shortexp' => __( 'Parameters', 'pagelines' ),\n\t\t\t\t'exp' => __( '<strong>Single '.$this->single_up.' Options</strong><br>Add '.$this->single_up.' Metadata that will be used on the page.<br><strong>HEADS UP:<strong> Each template uses different set of metadata. Check out <a href=\"http://bestrag.net/'.$this->multiple.'-lud\" target=\"_blank\">demo page</a> for more information.', 'pagelines' ),\n\t\t\t\t'selectvalues' => array(\n\t\t\t\t\t'client_name' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Client Name', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'client_name_url' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Client Name URL (eg: http://www.client.co)', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'partner' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Partner Company Name', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'partner_url' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Partner Company URL', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'project_slogan' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Project Slogan', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'img1' => array(\n\t\t\t\t\t\t'inputlabel' => __( 'Associate an image with this '.$this->single, 'pagelines' ),\n\t\t\t\t\t\t'type' => 'thickbox_image'\n\t\t\t\t\t),\n\t\t\t\t\t'img2' => array(\n\t\t\t\t\t\t'inputlabel' => __( 'Associate an image with this '.$this->single, 'pagelines' ),\n\t\t\t\t\t\t'type' => 'thickbox_image'\n\t\t\t\t\t),\n\t\t\t\t\t'custom_text1' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Custom Text/HTML/Shortcode 1', 'pagelines' )\n\t\t\t\t\t),\n\t\t\t\t\t'custom_text2' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'inputlabel' => __( 'Custom Text/HTML/Shortcode 2', 'pagelines' )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t );\n\t\t$fields = $type_meta_array['settings']['selectvalues'];\n\t\t$figo = array(); $findex = 0;\n\n\t\tforeach ($fields as $key => $value) {\n\t\t\t$figo[$findex] = array(\n\t\t\t\t'name' => $value['inputlabel'],\n\t\t\t\t'id' => $key,\n\t\t\t\t'type' => $value['type'],\n\t\t\t\t'std' => '',\n\t\t\t\t'class' => 'custom-class',\n\t\t\t\t'clone' => false\n\t\t\t);\n\t\t\t$findex++;\n\t\t}\n\t\t$metabox = array(\n\t\t\t'id' => 'projectal',\n\t\t\t'title' => 'Projectal Information',\n\t\t\t'pages' => array( $this->multiple ),\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'high',\n\t\t\t'fields' => $figo\n\t\t);\n\t\t new RW_Meta_Box($metabox);\n\t}", "function thirdtheme_room_page()\n {\n add_theme_support('post-thumbnails');\n add_image_size('room_size',268,281); \n $args = array(\n 'labels' => array('name' =>__('room page'),\n 'add_new' =>__('add new room photo')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-art',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail','excerpt')); \n register_post_type('room',$args);\n }", "public static function init() {\n\t\tadd_action( 'init', array( __CLASS__, 'register_post_type' ), 1 );\n\t}", "private function initCustomPostType(){\n //Instantiate our custom post type object\n $this->cptWPDS = new PostType($this->wpdsPostType);\n \n //Set our custom post type properties\n $this->cptWPDS->setSingularName($this->wpdsPostTypeName);\n $this->cptWPDS->setPluralName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setMenuName($this->wpdsPostTypeNamePlural);\n $this->cptWPDS->setLabels('Add New', 'Add New '.$this->wpdsPostTypeName, 'Edit '.$this->wpdsPostTypeName, 'New '.$this->wpdsPostTypeName, 'All '.$this->wpdsPostTypeNamePlural, 'View '.$this->wpdsPostTypeNamePlural, 'Search '.$this->wpdsPostTypeNamePlural, 'No '.strtolower($this->wpdsPostTypeNamePlural).' found', 'No '.strtolower($this->wpdsPostTypeNamePlural).' found in the trash');\n $this->cptWPDS->setMenuIcon('dashicons-welcome-write-blog');\n $this->cptWPDS->setSlug($this->wpdsPostType);\n $this->cptWPDS->setDescription('Writings from the universe');\n $this->cptWPDS->setShowInMenu(true);\n $this->cptWPDS->setPublic(true);\n $this->cptWPDS->setTaxonomies([$this->wpdsPostType]);\n $this->cptWPDS->removeSupports(['title']);\n \n //Register custom post type\n $this->cptWPDS->register();\n }", "public function __construct() {\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );\n\n\t\tadd_shortcode( 'demo-test', array( $this, 'demo_shortcode' ) );\n\n\t\tadd_action( 'init', array( $this, 'register_post_type' ) );\n\n\t\tadd_action( 'init', array( $this, 'generate_custom_post_type' ) );\n\n\t\t//add_action( 'init', array( $this, 'rewrite_rules' ) );\n\n\t\tadd_action( 'template_include', array( $this, 'custom_post_type_archive' ) );\n\n\t\tadd_action( 'template_include', array( $this, 'custom_post_type_archive_template' ) );\n\n\t\tadd_filter( 'single_template', array( $this, 'get_custom_post_type_template' ) );\n\n\t\tadd_action( 'admin_menu', array( $this, 'custom_menu_page' ) );\n\n\t\tadd_action( 'admin_init', array( $this, 'add_options' ) );\n\n\t\tadd_action( 'init', array( $this, 'generate_post_type' ) );\n\n\t\tadd_filter( 'post_type_link', array( $this, 'update_permalinks' ), 10, 2 );\n\t\tadd_filter( 'post_type_link', array( $this, 'update_post_permalinks' ), 10, 2 );\n\n\t\tadd_filter('term_link', array( $this, 'update_term_link' ) );\n\n\t add_action( 'wp_footer', function() {\n\t\t\tglobal $wp_query;\n\t\t\t//print_r( $wp_query );\n\t\t\tprint_r($this->post_types);\n\t\t});\n\t}", "function yee_post_type_testimonial_init(){\n\t$labels =array(\n\t\t'name'=>'Testimonials',\n\t\t'sigular_name'=>'Testimonial',\n\t\t'add_new'=>__('Add New Testimonial','Storefront-Child'),\n\t\t'add_new_item'=>__('Add New Testimonial','Storefront-Child'),\n\t\t'edit_item'=>__('Edit Testimonial','Storefront-Child'),\n\t\t'new_item'=>__('New Testimonial','Storefront-Child'),\n\t\t'view_item'=>__('View Testimonial','Storefront-Child'),\n\t\t'view_items'=>__('View Testimonials','Storefront-Child'),\n\t\t'all_items'=>__('All Testimonials','Storefront-Child'),\n\t\t'search_items'=>__('Search Testimonials','Storefront-Child')\n\t);\n\t$args =array(\n\t\t'labels'=>$labels,\n\t\t'public'=>true,\n\t\t'menu_position'=>5,\n\t\t'menu_icon'=>'dashicons-visibility',\n\t\t'hierarchical'=>false,\n\t\t'has_archive'=>true,\n\t\t'supports'=>array('title','editor','thumbnail','excerpt'),\n\t\t'rewrite'=>array('slug'=>'testimonial')\n\t\t\n\t);\n\tregister_post_type('yee_testimonial',$args);\n}", "function setup() {\n\tadd_filter( 'intermediate_image_sizes_advanced', __NAMESPACE__ . '\\\\disable_upload_sizes', 10, 2 );\n\tadd_filter( 'post_thumbnail_size', __NAMESPACE__ . '\\\\force_full_size_gifs', 10, 1 );\n}", "public function __construct(){\n //Create our custom taxonomy\n $this->initCustomTaxonomy();\n \n //Create our custom post type\n $this->initCustomPostType();\n \n //Manage our columns for our admin page\n $this->initColumns();\n }", "public static function cpt_init() {\n\t\tforeach ( self::$types as $type ) {\n\t\t\tself::evo_custom_post_type( $type['type'] );\n\t\t}\n\t}" ]
[ "0.67513204", "0.6545008", "0.6347232", "0.63238263", "0.6217401", "0.61152697", "0.59754544", "0.59493995", "0.5939075", "0.59047425", "0.5881784", "0.5867256", "0.58649045", "0.5841264", "0.5829468", "0.5827468", "0.581845", "0.58076155", "0.58067876", "0.58053976", "0.5794639", "0.57882726", "0.57832015", "0.576904", "0.5762704", "0.5756354", "0.5732228", "0.57193816", "0.57011", "0.5693797" ]
0.722265
0
Add meta boxes for the add/edit unit form.
function add_meta_boxes() { if( function_exists( 'add_meta_box' ) ) { add_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high'); add_meta_box( 'maps', __('Maps'), array( $this, '_display_maps_meta'), 'units', 'normal', 'high'); add_meta_box( 'gallery', __('Gallery'), array( $this, '_display_gallery_meta'), 'units', 'normal', 'low'); add_meta_box( 'unit-status', __('Availability'), array( $this, '_display_status_meta'), 'units', 'side', 'high'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_meta_boxes() {\n global $current_screen;\n\n $page_main = $this->_admin_pages['swpm'];\n\n if ($current_screen->id == $page_main && isset($_REQUEST['form'])) {\n add_meta_box('swpm_form_items_meta_box', __('Form Items', 'swpm-form-builder'), array(&$this, 'meta_box_form_items'), $page_main, 'side', 'high');\n }\n }", "public function add_meta_boxes() {\n\t\tglobal $current_screen;\n\n\t\t$page_main = $this->_admin_pages[ 'vfb-pro' ];\n\n\t\tif ( $current_screen->id == $page_main && isset( $_REQUEST['form'] ) ) {\n\t\t\tadd_meta_box( 'vfb_form_switcher', __( 'Quick Switch', 'visual-form-builder-pro' ), array( &$this, 'meta_box_switch_form' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_items_meta_box', __( 'Form Items', 'visual-form-builder-pro' ), array( &$this, 'meta_box_form_items' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_media_button_tip', __( 'Display Forms', 'visual-form-builder-pro' ), array( &$this, 'meta_box_display_forms' ), $page_main, 'side', 'low' );\n\t\t}\n\t}", "function formulize_meta_box() {\n\t\tadd_meta_box('formulize_sectionid',\n\t __('Formulize', 'formulize_textlabel'),\n\t 'formulize_inner_custom_box',\n\t 'page'\n\t\t);\n}", "public function add_meta_boxes()\n {\n /* Author Name */\n add_meta_box(\n 'testimonial_options',\n 'Testimonial Options',\n array ( $this , 'render_features_box'),\n 'testimonial',\n 'side',\n 'default'\n );\n /* Author email */\n /* approved [checkbox] */\n /* featured [checkbox] */\n }", "public function apb_add_meta_boxes() {\r\n\t}", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "function meta_boxes() {\n\t\tadd_meta_box( 'event-details', 'Event Details', array( $this , 'details_box' ), 'event', 'normal', 'high' );\n\t}", "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "public function add_metaboxes() {\n\t\tadd_meta_box(\n\t\t\t'pblw-requirements',\n\t\t\t__( 'Requirements', 'pblw_reqs' ),\n\t\t\tarray( $this, 'render_metabox' ),\n\t\t\t'download',\n\t\t\t'normal',\n\t\t\t'core'\n\t\t);\n\t}", "public function add_metaboxes() {\n\t\tadd_meta_box(\n\t\t\t'codes',\n\t\t\t__( 'Codes' ),\n\t\t\tarray( $this, 'render_codes_metabox' )\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'edit-codes',\n\t\t\t__( 'Edit codes' ),\n\t\t\tarray( $this, 'render_edit_metabox' )\n\t\t);\n\t}", "public function add_meta_boxes()\n {\n\n $this->_add_bitly_meta_box();\n\n }", "public static function add_metaboxes(){}", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "function cnew_custom_metabox_add() {\r\n add_meta_box(\r\n 'cnew_custom_metabox_workshop', \r\n __( 'Informações da Oficina', 'cnew' ), \r\n 'cnew_workshop_custom_metabox_callback', \r\n 'cnew_workshop', \r\n 'normal',\r\n 'high'\r\n );\r\n\r\n add_meta_box(\r\n 'cnew_custom_metabox_registration', \r\n __( 'Formulário de Inscrição', 'cnew' ), \r\n 'cnew_registration_custom_metabox_callback', \r\n 'cnew_registration', \r\n 'normal',\r\n 'high'\r\n );\r\n }", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "public function setup_meta_box() {\n\t\t\tadd_meta_box( 'add-shortcode-section', __( 'Shortcode', IFLANG ), array( $this, 'meta_box' ), 'nav-menus', 'side', 'high' );\n\t\t}", "public function add_metabox() {\n add_meta_box(\n 'customer_info',\n __( 'Customer Info', 'textdomain' ),\n array( $this, 'render_metabox' ),\n 'customer',\n 'advanced',\n 'default'\n );\n\n }", "function add_meta_boxes()\n {\n }", "public function add_meta_boxes() {\n\t\t\t// Address\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_address', \n\t\t\t\t'Adresse',\n\t\t\t\tarray( $this, 'meta_box_address' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Location\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_location', \n\t\t\t\t'Location',\n\t\t\t\tarray( $this, 'meta_box_location' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Geodata\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_geodata', \n\t\t\t\t'Geodaten',\n\t\t\t\tarray( $this, 'meta_box_geodata' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Date\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_dates', \n\t\t\t\t'Datum und Zeit der Meetups',\n\t\t\t\tarray( $this, 'meta_box_date' ),\n\t\t\t\t'wpmeetups', 'advanced', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Gallery\n\t\t\tadd_meta_box(\n\t\t\t\t'meetup_gallery',\n\t\t\t\t'Gallerie',\n\t\t\t\tarray( $this, 'meta_box_gallery' ),\n\t\t\t\t'wpmeetups', 'advanced', 'default'\n\t\t\t);\n\t\t}", "public function addMetaFieldsToAddForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t</div>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t</select>\n\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t</div>\n\t\t<?php\n\t}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "public static function add_meta_box() {\n\t\tadd_meta_box( 'sponsor-meta', __( 'Sponsor Meta', self::$text_domain ), array( __CLASS__, 'do_meta_box' ), self::$post_type_name , 'normal', 'high' );\n\t}", "public function register_meta_boxes()\n {\n }", "public function registerMetaBoxes()\n\t {\n\t \t$dataMetas = self::getDataMetas();\n\n\t \tif ( !empty($dataMetas) ) {\n\t \t\tforeach ($dataMetas as $key => $meta) {\n\t \t\t\t/* CHECK IF HAS PAGES */\n\t \t\t\tif ( isset($meta[\"_pages\"]) && !empty($meta[\"_pages\"][0]) ) {\n\t \t\t\t\tself::createMetasPages($meta);\n\t \t\t\t}\n\n\t \t\t\t/* POSTS TYPES REGISTER METAS */\n\t \t\t\tif ( isset($meta[\"_posts_types\"]) && !empty($meta[\"_posts_types\"][0]) ) {\n\t \t\t\t\tself::createMetasPostTypes($meta);\n\t \t\t\t}\n\n\t \t\t\t/* CHECK IF ALL POSTS IS true */\n\t \t\t\tif ( isset($meta[\"_all_posts\"]) && $meta['_all_posts'] == 'yes' ) {\n\t \t\t\t\tself::createMetasPosts($meta);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t }", "public function add_metabox() {\r\n\t\tadd_meta_box(\r\n\t\t\t'stats', // ID\r\n\t\t\t'Stats', // Title\r\n\t\t\tarray(\r\n\t\t\t\t$this,\r\n\t\t\t\t'meta_box', // Callback to method to display HTML\r\n\t\t\t),\r\n\t\t\t'spam-stats', // Post type\r\n\t\t\t'normal', // Context, choose between 'normal', 'advanced', or 'side'\r\n\t\t\t'core' // Position, choose between 'high', 'core', 'default' or 'low'\r\n\t\t);\r\n\t}", "function add_meta_box() {\t\t\n\t\t\t/* Gets available public post types. */\n\t\t\t$post_types = get_post_types( array( 'public' => true ), 'objects' );\n\t\t\t\n\t\t\t$post_types = apply_filters( 'remove_youtube_white_label_meta_box', $post_types );\n\t\t\t\n\t\t\t/* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */\n\t\t\tforeach ( $post_types as $type ) {\n\t\t\t\t/* Add the meta box. */\n\t\t\t\tadd_meta_box( self::DOMAIN . \"-{$type->name}-meta-box\", __( 'YouTube Embed Shortcode Creator (does not save meta)', self::DOMAIN ), array( $this, 'meta_box' ), $type->name, 'side', 'default' );\n\t\t\t}\n\t\t}", "public function add_meta_boxes() {\n\t\tforeach ( $this->screens as $screen ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'event-settings',\n\t\t\t\t__( 'Event Settings', 'lps_wp' ),\n\t\t\t\tarray( $this, 'add_meta_box_callback' ),\n\t\t\t\t$screen,\n\t\t\t\t'advanced',\n\t\t\t\t'default'\n\t\t\t);\n\t\t}\n\t}", "function _display_unitinfo_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/unit-info.php' );\n\t}", "public function addMetaboxes() {}" ]
[ "0.74768287", "0.72349536", "0.7183291", "0.71335405", "0.7076592", "0.7055092", "0.7054515", "0.7038045", "0.69603777", "0.6957431", "0.6908298", "0.6891041", "0.6876519", "0.685717", "0.68559784", "0.68356293", "0.68312013", "0.68237126", "0.6786773", "0.6740539", "0.67241555", "0.67239326", "0.6720341", "0.6707638", "0.66966766", "0.66931105", "0.6689773", "0.66886646", "0.6678695", "0.66781914" ]
0.7976936
0
Includes the unit info metabox code.
function _display_unitinfo_meta( $post ) { include( 'includes/metaboxes/unit-info.php' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function render_info_box() {\n\t\tinclude_once 'views/estimate/info.php';\n\t}", "function add_meta_boxes() {\n\t\tif( function_exists( 'add_meta_box' ) ) {\n\t\t\tadd_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'maps', __('Maps'), array( $this, '_display_maps_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'gallery', __('Gallery'), array( $this, '_display_gallery_meta'), 'units', 'normal', 'low');\n\t\t\tadd_meta_box( 'unit-status', __('Availability'), array( $this, '_display_status_meta'), 'units', 'side', 'high');\n\t\t}\n\t}", "public function unit()\n {\n $data = ['aktif' => 'unit',\n 'data_unit' => $this->M_prospektus->get_unit_menu()->result_array(),\n 'data_blok' => $this->M_prospektus->get_blok_kws()->result_array()\n ];\n\n $this->template->load('template','prospektus/V_data_unit', $data);\n }", "protected function info()\n\t\t{\n\t\t}", "function _display_status_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/unit-status.php' );\n\t}", "public function info()\n {\n return $this->type('info');\n }", "function info() {\n\t \treturn $this->description;\n\t }", "function display_custom_info_fields(){\n\t\n\tadd_settings_section(\"section\", \"Virksomhedsinformation\", null, \"theme-options\");\n\n add_settings_field(\"business_name\", \"Virksomhedsnavn\", \"display_business_name_element\", \"theme-options\", \"section\");\n\tadd_settings_field(\"support_phone\", \"Support Telefon\", \"display_support_phone_element\", \"theme-options\", \"section\");\n\tadd_settings_field(\"support_email\", \"Support Email\", \"display_support_email_element\", \"theme-options\", \"section\");\n\tadd_settings_field(\"street_address\", \"Gade\", \"display_street_address_element\", \"theme-options\", \"section\");\n\tadd_settings_field(\"city\", \"By og postnummer\", \"display_city_element\", \"theme-options\", \"section\");\n\n register_setting(\"section\", \"business_name\");\n\tregister_setting(\"section\", \"support_phone\");\n\tregister_setting(\"section\", \"support_email\");\n\tregister_setting(\"section\", \"street_address\");\n\tregister_setting(\"section\", \"city\");\n\t\n}", "Public function displayInfo(){ \r\n\t\t\techo \"The info about the dress.\"; \r\n\t\t\techo $this->color; \r\n\t\t\techo $this->fabric ; \r\n\t\t\techo $this->design;\r\n\t\t\techo self::MEDIUM;\r\n\t\t}", "public static function info_box() {\n\t\tglobal $hook_suffix;\n\n\t\tif ( 'post.php' !== $hook_suffix ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_meta_box(\n\t\t\t'munim_estimate_info_box',\n\t\t\t'Quick Info',\n\t\t\t[ __CLASS__, 'render_info_box' ],\n\t\t\t'munim_estimate',\n\t\t\t'side'\n\t\t);\n\t}", "public function info() {\n foreach ($this->items as $item) {\n $item->info();\n }\n }", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function show(Unit $unit)\n {\n //\n }", "public function getUnitName()\n {\n return $this->unit_name;\n }", "function info(){\n global $tpl, $ilTabs;\n\n $ilTabs->activateTab(\"info\");\n\n $my_tpl = new ilTemplate(\"tpl.info.html\", true, true,\n \"Customizing/global/plugins/Services/Repository/RepositoryObject/MobileQuiz\");\n\n // info text\n $my_tpl->setVariable(\"INFO_TEXT\", $this->txt(\"info_text\"));\n // mail to\n $my_tpl->setVariable(\"MAIL_TO\", $this->txt(\"info_mailto\"));\n // Instructions\n $my_tpl->setVariable(\"INSTRUCTIONS\",$this->txt(\"info_instructions\"));\n\n $html = $my_tpl->get();\n\n $tpl->setContent($html);\n }", "function infoScreenObject()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreen();\n\t}", "public function getInfoHtml()\n {\n return $this->getInfoBlock()->toHtml();\n }", "public function info() {\n\t\treturn array (\n\t\t\t\t'text_type' => 'selection',\n\t\t\t\t'module' => 'ZSELEX',\n\t\t\t\t'text_type_long' => $this->__ ( 'Deal Of The Day (DOTD)' ),\n\t\t\t\t'allow_multiple' => true,\n\t\t\t\t'form_content' => false,\n\t\t\t\t'form_refresh' => false,\n\t\t\t\t'show_preview' => true,\n\t\t\t\t'admin_tableless' => true \n\t\t);\n\t}", "function field_details() \n { ?>\n <div class=\"field-details\">\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?><label <?php $this->for_tag(\"inferno-concrete-setting-\"); ?>><?php endif; ?>\n <?php echo $this->setting['desc']; ?>\n <?php if($this->setting['type'] != 'radio' && $this->setting['type'] != 'checkbox') : ?></label><?php endif; ?>\n\n <?php if(isset($this->setting['more']) && $this->setting['more'] != '') : ?>\n <span class=\"more\"><?php echo $this->setting['more']; ?></span>\n <?php endif; ?>\n\n <?php if($this->setting['type'] == 'font') : ?>\n <div class=\"googlefont-desc\">\n <label <?php $this->for_tag(\"inferno-concrete-setting-\", \"-googlefont\"); ?>>\n <?php _e('Enter the Name of the Google Webfont You want to use, for example \"Droid Serif\" (without quotes). Leave blank to use a Font from the selector above.', 'inferno'); ?>\n </label>\n <span class=\"more\">\n <?php _e('You can view all Google fonts <a href=\"http://www.google.com/webfonts\">here</a>. Consider, that You have to respect case-sensitivity. If the font has been successfully recognized, the demo text will change to the entered font.', 'inferno'); ?>\n </span>\n </div>\n <?php endif; ?>\n </div>\n <?php\n }", "public function _info($info){\r\n return array('title'=>$info->full, 'block'=>false);\r\n }", "public function getEquipmentInfo(){\n \treturn array(\n \t\t'code' => 'CF8222', \n \t\t'name' => 'Celltac F Mek 8222', \n \t\t'description' => 'Automatic analyzer with 22 parameters and WBC 5 part diff Hematology Analyzer',\n \t\t'testTypes' => array(\"Full Haemogram\", \"WBC\")\n \t\t);\n }", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "public function add_metabox() {\n add_meta_box(\n 'customer_info',\n __( 'Customer Info', 'textdomain' ),\n array( $this, 'render_metabox' ),\n 'customer',\n 'advanced',\n 'default'\n );\n\n }", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "public function getUnit();", "public function dmcinfo() {\n $dmcinfo = [\n 'System Information' => [\n 'Status' => $this->api_version() ? 'Active' : 'Down',\n 'SOAP URL' => $this->soap_url,\n 'API Version' => $this->api_version(),\n 'Build' => $this->ecm_version(),\n 'Available API Functions' => $this->functions(),\n ],\n ];\n\n echo \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"DTD/xhtml1-transitional.dtd\\\">\\n<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\\n<head>\\n<style type=\\\"text/css\\\">\\nbody {background-color: #ffffff; color: #000000;}\\nbody, td, th, h1, h2 {font-family: sans-serif;}\\npre {margin: 0px; font-family: monospace;}\\na:link {color: #000099; text-decoration: none; background-color: #ffffff;}\\na:hover {text-decoration: underline;}\\ntable {border-collapse: collapse;}\\n.center {text-align: center;}\\n.center table { margin-left: auto; margin-right: auto; text-align: left;}\\n.center th { text-align: center !important; }\\ntd, th { border: 1px solid #000000; font-size: 75%; vertical-align:center;}\\nh1 {font-size: 150%;}\\nh2 {font-size: 125%;}\\n.p {text-align: left;}\\n.e {background-color: #000000; font-weight: bold; color: #ffcc00; text-align: right;}\\n.h {background-color: #000000; font-weight: bold; color: #ffcc00;}\\n.v {background-color: #cccccc; color: #000000;}\\n.vr {background-color: #cccccc; text-align: right; color: #000000;}\\nimg {float: right; border: 0px; margin-top: 7px;}\\nhr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}\\n</style>\\n<title>dmcinfo()</title><meta name=\\\"ROBOTS\\\" content=\\\"NOINDEX,NOFOLLOW,NOARCHIVE\\\" /></head>\\n<body><div class=\\\"center\\\"> <table border=\\\"0\\\" cellpadding=\\\"5\\\" width=\\\"600\\\">\\n<tr class=\\\"h\\\"><td>\\n<a href=\\\"http://api.ecircle.com/\\\"><img border=\\\"0\\\" src=\\\"http://api.ecircle.com/fileadmin/system/img/global/teradata_w137.png\\\" alt=\\\"Teradata Logo\\\" /></a><h1 class=\\\"p\\\">Digital Messaging Center</h1>\\n</td></tr></table><br />\";\n foreach ( $dmcinfo as $name => $section ) {\n echo \"<h3>$name</h3>\\n<table border=\\\"0\\\" cellpadding=\\\"5\\\" width=\\\"600\\\">\\n\";\n foreach ( $section as $key => $val ) {\n if ( is_array( $val ) ) {\n echo \"<tr><td class=\\\"e\\\" valign=\\\"top\\\">$key</td><td class=\\\"v\\\"><ul>\";\n foreach ( $val as $v ) {\n echo \"<li>$v</li>\";\n }\n echo \"</ul></td></tr>\\n\";\n } elseif ( is_string( $key ) ) {\n echo \"<tr><td class=\\\"e\\\">$key</td><td class=\\\"v\\\">$val</td></tr>\\n\";\n } else {\n echo \"<tr><td class=\\\"e\\\">$val</td></tr>\\n\";\n }\n }\n echo \"</table>\\n\";\n }\n echo \"</div></body>\";\n }", "public abstract function showInfo();" ]
[ "0.5899533", "0.58829147", "0.580986", "0.5758899", "0.57541895", "0.57413524", "0.5710687", "0.5671115", "0.5655343", "0.5647553", "0.56285274", "0.5598593", "0.5598593", "0.5598593", "0.5598593", "0.55816936", "0.5529929", "0.5512613", "0.5510243", "0.5502074", "0.5479294", "0.5467951", "0.54258454", "0.54072815", "0.5391585", "0.53710496", "0.53674495", "0.5364608", "0.5350174", "0.53467125" ]
0.76001644
0
Includes the unit maps metabox code.
function _display_maps_meta( $post ) { include( 'includes/metaboxes/maps.php' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _display_unitinfo_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/unit-info.php' );\n\t}", "function add_meta_boxes() {\n\t\tif( function_exists( 'add_meta_box' ) ) {\n\t\t\tadd_meta_box( 'unit-info', __('Unit Information'), array( $this, '_display_unitinfo_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'maps', __('Maps'), array( $this, '_display_maps_meta'), 'units', 'normal', 'high');\n\t\t\tadd_meta_box( 'gallery', __('Gallery'), array( $this, '_display_gallery_meta'), 'units', 'normal', 'low');\n\t\t\tadd_meta_box( 'unit-status', __('Availability'), array( $this, '_display_status_meta'), 'units', 'side', 'high');\n\t\t}\n\t}", "function section__map(){\n return array(\n 'content'=>\"<div style='width:300px; height:300px' style='\n margin-left:auto; margin-right:auto;' id='map'></div>\",\n 'class'=>'main',\n 'label'=>'Map',\n 'order'=>'1'\n );\n }", "function country_meta_boxes() {\n\t\t//add_meta_box( 'countries_meta', __( 'Quick link - All Countries', 'countries' ), array( $this, 'render_countries_meta' ), 'countries', 'side', 'low' );\n\t\tadd_meta_box( 'countrycode_meta', __( 'Country', 'countries' ), array( $this, 'render_countrycode_meta' ), 'countries', 'normal', 'low' );\n\t\t}", "public function addMetaboxes() {}", "function cspm_add_locations_metabox(){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Add Locations Metabox options */\r\n\t\t\t \r\n\t\t\t$cspm_add_locations_metabox_options = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_add_locations_metabox',\r\n\t\t\t\t'title' => esc_attr__( 'Progress Map: Add locations', 'cspm' ),\r\n\t\t\t\t'object_types' => isset($this->plugin_settings['post_types']) ? $this->plugin_settings['post_types'] : array(), // Post types\r\n\t\t\t\t'priority' => 'high',\r\n\t\t\t\t//'context' => 'side',\r\n\t\t\t\t'show_names' => true, // Show field names on the left\t\t\r\n\t\t\t\t'closed' => false,\t\t\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Create post type Metabox */\r\n\t\t\t\t \r\n\t\t\t\t$cspm_add_locations_metabox = new_cmb2_box( $cspm_add_locations_metabox_options );\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Display Add Locations Metabox fields */\r\n\t\t\t\r\n\t\t\t\t$this->cspm_add_locations_tabs($cspm_add_locations_metabox, $cspm_add_locations_metabox_options);\r\n\t\t\t\r\n\t\t}", "public function metabox_locations() {\n\t\t\tif ( empty( $this->tabs ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\techo '<div id=\"wpseo-local-metabox\">';\n\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\n\t\t\t// Adding a tabbed UI to match the options pages even more.\n\t\t\t$this->tab_navigation();\n\t\t\t$this->tabs_panels();\n\n\t\t\t// Noncename needed to verify where the data originated.\n\t\t\techo '<input type=\"hidden\" name=\"locationsmeta_noncename\" id=\"locationsmeta_noncename\" value=\"' . esc_attr( wp_create_nonce( plugin_basename( __FILE__ ) ) ) . '\" />';\n\n\t\t\techo '</div>';\n\t\t\techo '</div><!-- .wpseo-metabox-content -->';\n\t\t}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "function rng_METANAME_metabox_init() {\n}", "public function getMap() {\n return [\n 'sku' => 'itemNo',\n 'shortDescription' => 'description',\n 'longDescription' => 'description2',\n 'measurementUnit' => 'unitOfMeasure',\n 'mpn' => 'vendorItemNo',\n 'ean' => 'eanNo',\n ];\n }", "function fiorello_mikado_meta_boxes_map_after_setup_theme() {\n\t\tdo_action( 'fiorello_mikado_action_before_meta_boxes_map' );\n\t\t\n\t\tforeach ( glob( MIKADO_FRAMEWORK_ROOT_DIR . '/admin/meta-boxes/*/map.php' ) as $meta_box_load ) {\n\t\t\tinclude_once $meta_box_load;\n\t\t}\n\t\t\n\t\tdo_action( 'fiorello_mikado_action_meta_boxes_map' );\n\t\t\n\t\tdo_action( 'fiorello_mikado_action_after_meta_boxes_map' );\n\t}", "function meta_box($post) {\r\n\t\t$map = get_post_meta($post->ID, '_mapp_map', true);\r\n\t\t$pois = get_post_meta($post->ID, '_mapp_pois', true);\r\n\r\n\t\t// Load the edit map\r\n\t\t// Note that mapTypes is hardcoded = TRUE (so user can change type, even if not displayed in blog)\r\n\t\t$map['maptypes'] = 1;\r\n\t\t$this->map($map, $pois, true);\r\n\r\n\t\t// The <div> will be filled in with the list of POIs\r\n\t\t//echo \"<div id='admin_poi_div'></div>\";\r\n\t}", "function shortcode_map() {\r\n\t\t\tif ( !function_exists( 'vc_map' ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$base = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_preset',\r\n\t\t\t\t\t'heading' => __( 'Main Preset', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'preset',\r\n\t\t\t\t\t'tooltip' => MPC_Helper::style_presets_desc(),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'shortcode' => $this->shortcode,\r\n\t\t\t\t\t'description' => __( 'Choose preset or create new one.', 'mpc' ),\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t/* Properties List */\r\n\t\t\t$properties = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_divider',\r\n\t\t\t\t\t'title' => __( 'List of Properties', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties_divider',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'mpc_split',\r\n\t\t\t\t\t'heading' => __( 'Properties', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties',\r\n\t\t\t\t\t'admin_label' => true,\r\n\t\t\t\t\t'tooltip' => __( 'Define properties values. Each new line will be a separate property.', 'mpc' ),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Transform', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties_font_transform',\r\n\t\t\t\t\t'tooltip' => __( 'Select properties transform style.', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t'' => '',\r\n\t\t\t\t\t\t__( 'Capitalize', 'mpc' ) => 'capitalize',\r\n\t\t\t\t\t\t__( 'Small Caps', 'mpc' ) => 'small-caps',\r\n\t\t\t\t\t\t__( 'Uppercase', 'mpc' ) => 'uppercase',\r\n\t\t\t\t\t\t__( 'Lowercase', 'mpc' ) => 'lowercase',\r\n\t\t\t\t\t\t__( 'None', 'mpc' ) => 'none',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'dropdown',\r\n\t\t\t\t\t'heading' => __( 'Alignment', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties_font_align',\r\n\t\t\t\t\t'tooltip' => __( 'Select properties alignment.', 'mpc' ),\r\n\t\t\t\t\t'value' => array(\r\n\t\t\t\t\t\t'' => '',\r\n\t\t\t\t\t\t__( 'Left', 'mpc' ) => 'left',\r\n\t\t\t\t\t\t__( 'Right', 'mpc' ) => 'right',\r\n\t\t\t\t\t\t__( 'Center', 'mpc' ) => 'center',\r\n\t\t\t\t\t\t__( 'Justify', 'mpc' ) => 'justify',\r\n\t\t\t\t\t\t__( 'Default', 'mpc' ) => 'inherit',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'std' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column mpc-advanced-field',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'type' => 'colorpicker',\r\n\t\t\t\t\t'heading' => __( 'Color', 'mpc' ),\r\n\t\t\t\t\t'param_name' => 'properties_font_color',\r\n\t\t\t\t\t'tooltip' => __( 'Define properties color.', 'mpc' ),\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t\t'edit_field_class' => 'vc_col-sm-4 vc_column',\r\n\t\t\t\t),\r\n\t\t\t);\r\n\r\n\t\t\t$properties_even_background = MPC_Snippets::vc_background( array( 'prefix' => 'prop_even', 'subtitle' => __( 'Even Properties', 'mpc' ) ) );\r\n\r\n\t\t\t$class = MPC_Snippets::vc_class();\r\n\r\n\t\t\t$params = array_merge(\r\n\t\t\t\t$base,\r\n\r\n\t\t\t\t$properties,\r\n\t\t\t\t$properties_even_background,\r\n\t\t\t\t$class\r\n\t\t\t);\r\n\r\n\t\t\treturn array(\r\n\t\t\t\t'name' => __( 'Pricing Legend', 'mpc' ),\r\n\t\t\t\t'description' => __( 'Pricing table legend', 'mpc' ),\r\n\t\t\t\t'base' => 'mpc_pricing_legend',\r\n\t\t\t\t'as_child' => array( 'only' => 'mpc_pricing_box' ),\r\n\t\t\t\t'content_element' => true,\r\n//\t\t\t\t'icon' => mpc_get_plugin_path( __FILE__ ) . '/assets/images/icons/mpc-pricing-box.png',\r\n\t\t\t\t'icon' => 'mpc-shicon-pricing-legend',\r\n\t\t\t\t'category' => __( 'MPC', 'mpc' ),\r\n\t\t\t\t'params' => $params,\r\n\t\t\t);\r\n\t\t}", "public function showMap()\n {\n return $this->maptype === 'Embed MAP' ? $this->showEmbedMap() : $this->showStaticMap();\n }", "function wp_nav_menu_locations_meta_box()\n {\n }", "function igv_cmb_metaboxes() {\n\t$prefix = '_igv_';\n\n\t/**\n\t * Metaboxes declarations here\n * Reference: https://github.com/WebDevStudios/CMB2/blob/master/example-functions.php\n\t */\n\n}", "public function processSymbols() {\r\n\t\t$layers = array ();\r\n\t\t$layers [] = array ('map' => 'amenazas', 'layer' => 'Comunas', 'clsprefix' => 'Comuna ', 'clsdisplay' => 'num_comuna', 'clsitem' => 'num_comuna' );\r\n\t\t$layers [] = array ('map' => 'amenazas', 'layer' => 'Areas Homogeneas', 'clsprefix' => '', 'clsdisplay' => 'nombre', 'clsitem' => 'id_area' );\r\n\t\t$layers [] = array ('map' => 'amenazas', 'layer' => 'Amenazas', 'clsprefix' => '', 'clsdisplay' => 'descripcion', 'clsitem' => 'codamenaza' );\r\n\t\t\r\n\t\t$this->addSymbols ( $layers );\r\n\t}", "function specialdisplaytypes() {\n return array (\"xy_coord\"=>1, \"latlong\"=>1, \"matrix\"=>1);\n }", "public function getMapTypeControl()\n {\n return $this->mapTypeControl;\n }", "function warquest_show_map() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\t\r\n\t/* output */\r\n\tglobal $page;\r\n\t\r\n\t$page .= '<div class=\"subparagraph\">'.t('GENERAL_PLANET_'.$player->planet).' '.t('HOME_MAP_TITLE').'</div>';\r\n\r\n\t$page .= '<div class=\"box\">';\r\n\t$page .= warquest_ui_map($player, $player->planet);\r\n\t\r\n\t$page .= '<div class=\"note\"><center>';\r\n\t$page .= t('HOME_MAP_NOTE');\r\n\t$page .= '</center></div>';\t\r\n\t\t\r\n\t$page .= '</div>';\r\n}", "function wpb_add_custom_meta_boxes() {\n\tglobal $post;\n\tif ('134' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n\n\tif ('136' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n\n\tif ('138' == $post -> ID) { \n\t\tadd_meta_box(\n\t\t\t'league_table',\n\t\t\t'League Table',\n\t\t\t'league_table_callback',\n\t\t\t'page'\n\t\t);\n\t}\n}", "protected function getMap()\n\t{\n\t\treturn array(\n\t\t\t'USE' => new Field\\Checkbox('USE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_USE')\n\t\t\t)),\n\t\t\t'CODE' => new Field\\Textarea('CODE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE'),\n\t\t\t\t'help' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE_HELP2'),\n\t\t\t\t'placeholder' => '<script>\n\tvar googletag = googletag || {};\n\tgoogletag.cmd = googletag.cmd || [];\n</script>'\n\t\t\t))\n\t\t);\n\t}", "public function vcMap() {\n\t\tif(function_exists('vc_map')) {\n\n\t\t\tvc_map( array(\n\t\t\t\t\t'name' => esc_html__('Album', 'qode-music'),\n\t\t\t\t\t'base' => $this->base,\n\t\t\t\t\t'category' => esc_html__('by QODE MUSIC','qode-music'),\n\t\t\t\t\t'icon' => 'icon-wpb-album extended-custom-icon-qode',\n\t\t\t\t\t'allowed_container_element' => 'vc_row',\n\t\t\t\t\t'params' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\n\t\t\t\t\t\t\t'heading'\t\t=> esc_html__('Album','qode-music'),\n\t\t\t\t\t\t\t'param_name' \t=> 'album',\n\t\t\t\t\t\t\t'value' \t\t=> $this->getAlbums(),\n\t\t\t\t\t\t\t'admin_label' \t=> true,\n\t\t\t\t\t\t\t'save_always' \t=> true\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t\t'heading' => esc_html__('Album Skin','qode-music'),\n\t\t\t\t\t\t\t'param_name' => 'album_skin',\n\t\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t\tesc_html__('Default','qode-music')\t\t=> '',\n\t\t\t\t\t\t\t\tesc_html__('Dark','qode-music') \t\t=> 'dark',\n\t\t\t\t\t\t\t\tesc_html__('Light','qode-music') \t\t=> 'light'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'admin_label' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t\t'heading' => esc_html__('Title Tag','qode-music'),\n\t\t\t\t\t\t\t'param_name' => 'title_tag',\n\t\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t\t'' => '',\n\t\t\t\t\t\t\t\t'h2'\t=> 'h2',\n\t\t\t\t\t\t\t\t'h3'\t=> 'h3',\n\t\t\t\t\t\t\t\t'h4'\t=> 'h4',\n\t\t\t\t\t\t\t\t'h5'\t=> 'h5',\n\t\t\t\t\t\t\t\t'h6'\t=> 'h6'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'admin_label' => true\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function rh_contact_page_meta_boxes( $meta_boxes ) {\n\n\t\t$classic_design = ( 'classic' == INSPIRY_DESIGN_VARIATION );\n\t\t$last_columns = 12;\n\t\t$icon_columns = 6;\n\n\t\t$fields = array(\n\n\t\t\t// Contact Map\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Map', 'framework' ),\n\t\t\t\t'id' => \"theme_show_contact_map\",\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'std' => '1',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'1' => esc_html__( 'Show', 'framework' ),\n\t\t\t\t\t'0' => esc_html__( 'Hide', 'framework' ),\n\t\t\t\t),\n\t\t\t\t'columns' => 12,\n\t\t\t\t'tab' => 'map',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Map Latitude', 'framework' ),\n\t\t\t\t'desc' => 'You can use <a href=\"http://www.latlong.net/\" target=\"_blank\">latlong.net</a> OR <a href=\"http://itouchmap.com/latlong.html\" target=\"_blank\">itouchmap.com</a> to get Latitude and longitude of your desired location.',\n\t\t\t\t'id' => \"theme_map_lati\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '-37.817917',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'map',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Map Longitude', 'framework' ),\n\t\t\t\t'id' => \"theme_map_longi\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '144.965065',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'map',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Map Zoom Level', 'framework' ),\n\t\t\t\t'desc' => esc_html__( 'Provide Map Zoom Level.', 'framework' ),\n\t\t\t\t'id' => \"theme_map_zoom\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '17',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'map',\n\t\t\t),\n\t\t);\n\n\t\t$map_type = inspiry_get_maps_type();\n\t\tif ( 'google-maps' == $map_type ) {\n\n\t\t\t$fields = array_merge( $fields, array(\n\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Map Type', 'framework' ),\n\t\t\t\t\t'desc' => esc_html__( 'Choose Google Map Type', 'framework' ),\n\t\t\t\t\t'id' => \"inspiry_contact_map_type\",\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'roadmap' => esc_html__( 'RoadMap', 'framework' ),\n\t\t\t\t\t\t'satellite' => esc_html__( 'Satellite', 'framework' ),\n\t\t\t\t\t\t'hybrid' => esc_html__( 'Hybrid', 'framework' ),\n\t\t\t\t\t\t'terrain' => esc_html__( 'Terrain', 'framework' ),\n\t\t\t\t\t),\n\t\t\t\t\t'std' => 'roadmap',\n\t\t\t\t\t'columns' => 6,\n\t\t\t\t\t'tab' => 'map',\n\t\t\t\t)\n\t\t\t) );\n\n\t\t\t$icon_columns = 12;\n\t\t}\n\n\t\t$fields = array_merge( $fields, array(\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Google Maps Marker', 'framework' ),\n\t\t\t\t'desc' => esc_html__( 'You may upload custom google maps marker for the contact page here. Image size should be around 50px by 50px.', 'framework' ),\n\t\t\t\t'id' => \"inspiry_contact_map_icon\",\n\t\t\t\t'type' => 'image_advanced',\n\t\t\t\t'max_file_uploads' => 1,\n\t\t\t\t'columns' => $icon_columns,\n\t\t\t\t'tab' => 'map',\n\t\t\t),\n\n\t\t\t// Contact Details\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Contact Detail', 'framework' ),\n\t\t\t\t'id' => \"theme_show_details\",\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'std' => '1',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'1' => esc_html__( 'Show', 'framework' ),\n\t\t\t\t\t'0' => esc_html__( 'Hide', 'framework' ),\n\t\t\t\t),\n\t\t\t\t'columns' => 12,\n\t\t\t\t'tab' => 'detail',\n\t\t\t),\n\t\t) );\n\n\t\tif ( $classic_design ) {\n\t\t\t$fields = array_merge( $fields, array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Contact Details Title', 'framework' ),\n\t\t\t\t\t'id' => \"theme_contact_details_title\",\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'columns' => 6,\n\t\t\t\t\t'tab' => 'detail',\n\t\t\t\t)\n\t\t\t) );\n\n\t\t\t$last_columns = 6;\n\t\t}\n\n\t\t$fields = array_merge( $fields, array(\n\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Cell Number', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_cell\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'detail',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Phone Number', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_phone\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'detail',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Fax Number', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_fax\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'detail',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Display Email', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_display_email\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'detail',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Contact Address', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_address\",\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => $last_columns,\n\t\t\t\t'tab' => 'detail',\n\t\t\t),\n\n\t\t) );\n\n\t\tif ( $classic_design ) {\n\t\t\t$fields = array_merge( $fields, array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_html__( 'Contact Form Heading', 'framework' ),\n\t\t\t\t\t'id' => \"theme_contact_form_heading\",\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'columns' => 6,\n\t\t\t\t\t'tab' => 'form',\n\t\t\t\t)\n\t\t\t) );\n\t\t}\n\n\t\t$fields = array_merge( $fields, array(\n\t\t\t// Contact Form\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Name Field Label', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_form_name_label\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Email Field Label', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_form_email_label\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Phone Number Field Label', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_form_number_label\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Message Field Label', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_form_message_label\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Contact Form Email', 'framework' ),\n\t\t\t\t'desc' => esc_html__( 'Provide email address that will get messages from contact form.', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_email\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => get_option( 'admin_email' ),\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Contact Form CC Email', 'framework' ),\n\t\t\t\t'desc' => esc_html__( 'You can add multiple comma separated cc email addresses, to get a carbon copy of contact form message.', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_cc_email\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Contact Form BCC Email', 'framework' ),\n\t\t\t\t'desc' => esc_html__( 'You can add multiple comma separated bcc email addresses, to get a blind carbon copy of contact form message.', 'framework' ),\n\t\t\t\t'id' => \"theme_contact_bcc_email\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Contact Form Shortcode ( To Replace Default Form )', 'framework' ),\n\t\t\t\t'desc' => esc_html__( 'If you want to replace default contact form with a plugin based form then provide its shortcode here.', 'framework' ),\n\t\t\t\t'id' => \"inspiry_contact_form_shortcode\",\n\t\t\t\t'type' => 'text',\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => esc_html__( 'Select Page For Redirection', 'framework' ),\n\t\t\t\t'desc' => esc_html__( 'User will be redirected to the selected page after successful submission of the contact form.', 'framework' ),\n\t\t\t\t'id' => \"inspiry_contact_form_success_redirect_page\",\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => inspiry_pages(),\n\t\t\t\t'std' => '',\n\t\t\t\t'columns' => 6,\n\t\t\t\t'tab' => 'form',\n\t\t\t),\n\t\t) );\n\n\t\t$meta_boxes[] = array(\n\t\t\t'id' => 'contact-page-meta-box',\n\t\t\t'title' => esc_html__( 'Contact Page Settings', 'framework' ),\n\t\t\t'post_types' => array( 'page' ),\n\t\t\t'show' => array(\n\t\t\t\t'template' => array(\n\t\t\t\t\t'templates/contact.php',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'tabs' => array(\n\t\t\t\t'map' => array(\n\t\t\t\t\t'label' => esc_html__( 'Contact Map', 'framework' ),\n\t\t\t\t\t'icon' => 'fas fa-map-marker-alt',\n\t\t\t\t),\n\t\t\t\t'detail' => array(\n\t\t\t\t\t'label' => esc_html__( 'Contact Details', 'framework' ),\n\t\t\t\t\t'icon' => 'far fa-address-card',\n\t\t\t\t),\n\t\t\t\t'form' => array(\n\t\t\t\t\t'label' => esc_html__( 'Contact Form', 'framework' ),\n\t\t\t\t\t'icon' => 'far fa-envelope-open',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'tab_style' => 'left',\n\t\t\t'fields' => $fields,\n\t\t);\n\n\t\treturn $meta_boxes;\n\t}", "function htheme_map_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_map($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "public function add_metaboxes() {\n\t\tadd_meta_box(\n\t\t\t'codes',\n\t\t\t__( 'Codes' ),\n\t\t\tarray( $this, 'render_codes_metabox' )\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'edit-codes',\n\t\t\t__( 'Edit codes' ),\n\t\t\tarray( $this, 'render_edit_metabox' )\n\t\t);\n\t}", "function opaljob_areasize_unit_format( $value='' ){\n return $value . ' ' . '<span>'.'m2'.'</span>';\n}", "static function metabox($post){\n\t\twp_nonce_field( 'flat-options', 'flat-options_nonce' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\techo '<style>';\n\t\techo '.admin-meta-input{display:block; margin-top: 10px;}';\n\t\techo 'div.field-holder{display: block;float: left; margin: 10px 20px; height: 80px;}';\n\t\techo '.field-block{display: inline-block;clear: both;float: none;}';\n\t\techo '.postbox .inside .field-block h2{padding: 8px 12px;font-weight: 600;font-size: 18px;margin: 0;line-height: 1.4}';\n\t\techo '</style>';\n\t\t\t\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Licitálással kapcsolatos adatok</h2>';\n\t\tforeach ($fieldblocks['licit'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Hely adatok</h2>';\n\t\tforeach ($fieldblocks['location'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlan adatok és településrendezési előírások</h2>';\n\t\tforeach ($fieldblocks['parameters'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Ingatlanjogi jellemzők</h2>';\n\t\tforeach ($fieldblocks['info'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\n\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Közművek, energiaellátás, telekommunikáció</h2>';\n\t\tforeach ($fieldblocks['sources'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\n\t\t\t\t\t\n\t\techo '<div class=\"field-block\">';\n\t\techo '<h2>Építmény (épület) jellemzői</h2>';\n\t\tforeach ($fieldblocks['building'] as $key => $field){\t\t\n\t\t\techo '<div class=\"field-holder\">';\n\t\t\techo '<label>' .$field['label']. '</label>';\n\t\t\techo '<input type=\"' .$field['type']. '\" class=\"admin-meta-input ' .$field['class']. '\" name=\"' .$key. '\" value=\"' .get_post_meta( $post->ID, $key, true ). '\" />';\t\t\t\n\t\t\techo \"</div>\";\n\t\t}\n\t\techo '</div>';\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\techo \"\n\t\t\t<script>\n\t\t\t\tjQuery(document).ready(function(){\n\t\t\t\t\tjQuery('.datepicker').datepicker();\t\n\t\t\t\t});\t\n\t\t\t</script>\t\n\t\t\";\n\t\t\n\t\techo '<br clear=\"all\">';\n\t\t\n }", "public function Bali_map()\n\t{\n\t\t$this->template = view::factory('templates/Gmap')\n\t\t\t->set('lang', url::lang())\n\t\t\t->set('website_name', Kohana::lang('website.name'))\n\t\t\t->set('website_slogan', Kohana::lang('website.slogan'))\n\t\t\t->set('webpage_title', Kohana::lang('nav.'.str_replace('_', ' ', url::current())))\n\t\t\t->set('map_options', Kohana::config('Gmap.maps.Bali'))\n\t\t\t->set('map_markers', Kohana::config('Gmap.markers.Bali'))\n\t\t\t->set('map_icon_path', url::base().skin::config('images.Gmap.path'));\n\t}" ]
[ "0.6468183", "0.58479995", "0.579256", "0.56953067", "0.56925803", "0.56658876", "0.5644808", "0.55971956", "0.55805874", "0.55689377", "0.5552088", "0.555088", "0.5535579", "0.541608", "0.5403218", "0.54004365", "0.53865427", "0.5365935", "0.5361866", "0.53326154", "0.5323825", "0.5321035", "0.53158814", "0.5271796", "0.52602", "0.5259395", "0.5205471", "0.5195526", "0.5188592", "0.51826704" ]
0.6270081
1
Includes the unit status metabox code.
function _display_status_meta( $post ) { include( 'includes/metaboxes/unit-status.php' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatus(): UnitEnum|string;", "function i4_get_unit_status() {\n global $current_i4_user, $post;\n\n //Store the Parent Data for the Unit for use.\n $unit_parent_data = WPCW_units_getAssociatedParentData($post->ID);\n\n $user_id = $current_i4_user->ID;\n\n //Check if the Unit is complete\n $unit_status = $this->i4_is_unit_complete($unit_parent_data->course_id, $user_id, $post->ID);\n\n return $unit_status;\n }", "function getStatusString() {\n\t\tswitch ($this->getData('status')) {\n\t\t\tcase THESIS_STATUS_INACTIVE:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status.inactive';\n\t\t\tcase THESIS_STATUS_ACTIVE:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status.active';\n\t\t\tdefault:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status';\n\t\t}\n\t}", "function _display_unitinfo_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/unit-info.php' );\n\t}", "function pafd_metabox_status_cb() {\n\n\tglobal $post, $pafd_textdomain;\n\n\t// Prepare status for use with K\n\t$statuses[ '' ] = __( 'None', $pafd_textdomain );\n\t$status_terms = get_terms( 'pafd_status', 'hide_empty=0' ); \n\tforeach ( $status_terms as $status_term ) {\n\t\t$statuses[ $status_term->term_id ] = $status_term->name;\n\t}\n\n\t// Get the file current status id\n\tif ( $post ) {\n\t\t$post_status_terms = wp_get_object_terms( $post->ID, 'pafd_status' );\n\t\t$post_status_term = array_shift( $post_status_terms );\n\t\tif( ! empty( $post_status_term ) ) {\n\t\t\t$post_status_id = $post_status_term->term_id;\n\t\t} else {\n\t\t\t$post_status_id = '';\n\t\t}\n\t}\n\n\t// Print the statuses\n\tK::select(\n\t\t'pafd-status',\n\t\tnull,\n\t\tarray(\n\t\t\t'options' => $statuses,\n\t\t\t'selected' => $post_status_id,\n\t\t)\n\t);\n\n\t// Print a nonce field\n\tK::input(\n\t\t'pafd-status-nonce',\n\t\tarray(\n\t\t\t'type' => 'hidden',\n\t\t\t'value' => wp_create_nonce( 'pafd_save_status' ),\n\t\t)\n\t);\n}", "public function getStatusAdmin()\n {\n switch ($this->status) {\n case 0:\n return '<span class=\"label label-danger\">Open</span>';\n case 1:\n return '<span class=\"label label-success\">Closed</span>';\n }\n }", "function GetStatus() {\n if ($this->buttons['lunch_end']) {\n return \"Out to lunch.\";\n }\n if ($this->buttons['work_start']) {\n return \"Not working.\";\n }\n else {\n return \"Working.\";\n }\n }", "function getDetailedStatus() ;", "public function register_status() {\n register_post_status( self::$status, array(\n 'label' => __( 'Limbo', 'fu-events-calendar' ),\n 'label_count' => _nx_noop( 'Limbo <span class=\"count\">(%s)</span>', 'Limbo <span class=\"count\">(%s)</span>', 'event status', 'fu-events-calendar' ),\n 'show_in_admin_all_list' => false,\n 'show_in_admin_status_list' => true,\n 'public' => false,\n 'internal' => false,\n ) );\n }", "public function status() {\n\t\treturn self::STATUS_DESCRIPTIONS[$this->status];\n\t}", "public function getStatus () {\n\n\t// TODO\n\n\treturn \"invalid\";\n }", "public function getBarUnit() {\n return $this->cBarUnit;\n }", "public function getStatus() {\n\t\t$code = $this->status['code'];\n\t\tif ($code === '0'){\n\t\t\treturn 'Closed';\n\t\t}else if($code === '1'){\n\t\t\treturn 'On Hold';\n\t\t}else if($code === '2'){\n\t\t\treturn 'Open';\n\t\t}else if($code === '3'){\n\t\t\t$openingDate = ($this->status['openingdate'] === '') ? 'soon' : date(\"j M\", strtotime($this->status['openingdate']));\n\t\t\treturn 'Opening '.$openingDate; \n\t\t}else if($code === '4'){\n\t\t\treturn 'Closed For Season'; \n\t\t}else if($code === '5'){ \n\t\t\t$updateTime = ($this->status['updatetime'] === '') ? 'No Estimate' : 'Estimated: '.date(\"g:ia\", strtotime($this->status['updatetime']));\n\t\t\treturn 'Delayed '.$updateTime; \n\t\t}\n\t}", "function get_status() {\n return $this->status;\n }", "public function getStatus() \n {\n if ($this->status) \n {\n \techo 'user status : присутствует<br><br><br>';\n }\n else\n {\n \techo 'user status : отсутствует<br><br><br>';\t\n }\n }", "function statusMessage()\n {\n }", "public function getStatusString()\r\n {\r\n return $GLOBALS['TICKETSTATUS_DESC'][$this->status];\r\n }", "public function status() {\n\t\treturn self::STATUS_DESCRIPTIONS[$this->oehhstat];\n\t}", "public function getDetailedSystemStatus() {}", "public function GetStatus()\n\t{\n\t\t// Demnach ist der Status in IPS der einzige der vorliegt.\t\t\n\t}", "public function getStatusAsString(){\r\n $list = self::getStatusList();\r\n if (isset($list[$this->status]))\r\n return $list[$this->status];\r\n \r\n return 'Unknown';\r\n }", "function _showStatus() {\r\n $okMessage = implode('<br />', $this->_okMessage);\r\n $errMessage = implode('<br />', $this->_errMessage);\r\n\r\n if (!empty($errMessage)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_ERROR_MESSAGE', $errMessage);\r\n } else {\r\n $this->_objTpl->hideBlock('errormsg');\r\n }\r\n\r\n if (!empty($okMessage)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_OK_MESSAGE', $okMessage);\r\n } else {\r\n $this->_objTpl->hideBlock('okmsg');\r\n }\r\n }", "public function statusButton() {\n\t\t$code = $this->status['code'];\n\t\tif ($code === '0'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Closed</div>';\n\t\t}else if($code === '1'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">On Hold</div>';\n\t\t}else if($code === '2'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Open</div>';\n\t\t}else if($code === '3'){\n\t\t\t$openingDate = ($this->status['openingdate'] === '') ? 'soon' : date(\"j M\", strtotime($this->status['openingdate']));\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Opening '.$openingDate.'</div>'; \n\t\t}else if($code === '4'){\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Closed <span>For Season</span></div>'; \n\t\t}else if($code === '5'){ \n\t\t\t$updateTime = ($this->status['updatetime'] === '') ? 'No Estimate' : 'Estimated: '.date(\"g:ia\", strtotime($this->status['updatetime']));\n\t\t\treturn '<div class=\"status-button s'.$code.'\">Delayed Opening</div>\n\t\t\t\t\t<div class=\"estimate\">'.$updateTime.'</div>'; \n\t\t}\n\t}", "public function get_status(){\n return $this->status;\n }", "function getStatusName() {\n\t\treturn $this->data_array['status_name'];\n\t}", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "function wpmantis_get_status_translation()\n{\n\t$options = get_option('wp_mantis_options');\n\textract($options);\n\t$client = new SoapClient($mantis_soap_url);\n\ttry\n\t{\t\n\t\t$results = $client->mc_enum_status($mantis_user, $mantis_password);\n\t\t\n\t\tforeach ($results as $result)\n\t\t{\n\t\t\t\t$id = $result->id;\n\t\t\t\t$name = $result->name;\n\t\t\t\t\n\t\t\t\t$mantis_statuses[$id] = $name;\n\t\t}\n\t\t$options['mantis_statuses'] = $mantis_statuses;\n\t\tupdate_option('wp_mantis_options', $options);\n\t\t\n\t\t?>\n <div id=\"message\" class=\"updated fade\">\n <p><?php _e('Options saved.', 'wp-mantis'); ?></p>\n </div>\n <?php\n\t}\n\tcatch(SoapFault $e)\n\t{\n\t\tthrow $e;\n\t\t?>\n <div id=\"message\" class=\"error fade\">\n <p><?php printf(__('Error: %s', 'wp-mantis'), $e->getMessage()); ?></p>\n </div>\n <?php\n\t}\n}", "function get_status()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_STATUS);\r\n }", "public function getUnitName()\n {\n return $this->unit_name;\n }" ]
[ "0.63098574", "0.61501235", "0.6001096", "0.5992697", "0.59849507", "0.59756595", "0.57938856", "0.57717305", "0.5759435", "0.5735232", "0.57280993", "0.5669508", "0.56585354", "0.5649375", "0.564511", "0.56441", "0.56288064", "0.56246394", "0.56232274", "0.5615621", "0.5614538", "0.56127924", "0.5607352", "0.5603187", "0.5585588", "0.5584951", "0.5584951", "0.5580617", "0.55603945", "0.55484474" ]
0.6889715
0
Handles saving data from unit metaboxes.
function save_unit_meta_boxes( $post_id ) { /* * If we arent doing an autosave we merge all the extra fields with their corresponding post data. * Next we check to make sure we are saving a unit vs a post or page so we dont make the geocoding * request when we dont need to. Once we geocode the address, we save the long/lat in the DB. Next we * check to see if we are chaging the property from rented to available and if so, we set that date time * so we can calculate the listing age later on. */ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; //Check to make sure we are on a "Units" page so we dont geocode on every page save// if (isset($_POST['unitsMetaBoxUpdate']) && $_POST['unitsMetaBoxUpdate'] == 'yesPlease') { $post_data = array_merge($this->extra_fields, $_POST); foreach( $this->extra_fields as $key => $value ) { update_post_meta( $post_id, $key, $post_data[$key]); } $address = $post_data['address']." ".$post_data['city'].", ".$post_data['state']." ".$post_data['zip']; $geoCode = $this->_geo_code( $address, $post_data ); update_post_meta( $post_id, 'lat', $geoCode['lat']); update_post_meta( $post_id, 'lon', $geoCode['lon']); //Lets see if user is making the unit available for rent.// //1) Check previous status $prevStatus = $_POST['previousStatus']; //2) Check if posted value is avail && previousStatus is rented if ($prevStatus == 'Rented' && $_POST['status'] == 'For Rent') { update_post_meta( $post_id, 'last_avail_date', strtotime('now')); } else { update_post_meta( $post_id, 'last_avail_date', $_POST['last_avail_date']); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function meta_boxes_save() {\r\n\t\t\r\n\t\t// Only process if the form has actually been submitted\r\n\t\tif (\r\n\t\t\tisset( $_POST['_wpnonce'] ) &&\r\n\t\t\tisset( $_POST['post_ID'] )\r\n\t\t) {\r\n\t\t\t\r\n\t\t\t// Do nonce security check\r\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\r\n\t\t\t\r\n\t\t\t// Grab post ID\r\n\t\t\t$post_ID = (int) $_POST['post_ID'];\r\n\t\t\t\r\n\t\t\t// Iterate through each possible piece of meta data\r\n\t\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\t\tif ( isset( $_POST['_' . $key] ) ) {\r\n\t\t\t\t\t$data = esc_html( $_POST['_' . $key] ); // Sanitise data input\r\n\t\t\t\t\tupdate_post_meta( $post_ID, '_' . $key, $data ); // Store the data\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }", "function liblynx_save_meta_box_data($post_id)\n{\n\n /*\n * We need to verify this came from our screen and with proper authorization,\n * because the save_post action can be triggered at other times.\n */\n\n // Check if our nonce is set.\n if (!isset($_POST['liblynx_meta_box_nonce'])) {\n return;\n }\n\n\n\n // Verify that the nonce is valid.\n if (!wp_verify_nonce($_POST['liblynx_meta_box_nonce'], 'liblynx_save_meta_box_data')) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return;\n }\n\n // Check the user's permissions.\n if (isset($_POST['post_type']) && 'page'==$_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return;\n }\n } else {\n if (!current_user_can('edit_post', $post_id)) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n\n //is our metabox is being submitted?\n if (!isset($_POST['liblynx_metabox'])) {\n return;\n }\n\n //determine new state\n $protect=isset($_POST['liblynx_protect'])?true:false;\n $unit=trim($_POST['liblynx_custom_unit']);\n\n // Update the meta field in the database.\n update_post_meta($post_id, '_liblynx_protect', $protect);\n update_post_meta($post_id, '_liblynx_unit', $unit);\n}", "function apprenants_save_meta_box_data($post_id)\r\n {\r\n // verify taxonomies meta box nonce\r\n if (!isset($_POST['apprenants_meta_box_nonce']) || !wp_verify_nonce($_POST['apprenants_meta_box_nonce'], basename(__FILE__))) {\r\n return;\r\n }\r\n\r\n // return if autosave\r\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\r\n return;\r\n }\r\n\r\n // Check the user's permissions.\r\n if (!current_user_can('edit_post', $post_id)) {\r\n return;\r\n }\r\n\r\n // store custom fields values\r\n // nom string\r\n if (isset($_REQUEST['nom'])) {\r\n update_post_meta($post_id, '_apprenants_nom', sanitize_text_field($_POST['nom']));\r\n }\r\n\r\n // store custom fields values\r\n // prénom string\r\n if (isset($_REQUEST['prenom'])) {\r\n update_post_meta($post_id, '_apprenants_prenom', sanitize_text_field($_POST['prenom']));\r\n }\r\n\r\n // store custom fields values\r\n // github string\r\n if (isset($_REQUEST['github'])) {\r\n update_post_meta($post_id, '_apprenants_github', sanitize_text_field($_POST['github']));\r\n }\r\n\r\n // store custom fields values\r\n //linkedIn string\r\n if (isset($_REQUEST['linkedIn'])) {\r\n update_post_meta($post_id, '_apprenants_linkedIn', sanitize_text_field($_POST['linkedIn']));\r\n }\r\n\r\n // store custom fields values\r\n //portfolio string\r\n if (isset($_REQUEST['portfolio'])) {\r\n update_post_meta($post_id, '_apprenants_portfolio', sanitize_text_field($_POST['portfolio']));\r\n }\r\n }", "function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\n//echo '<textarea style=\"width:800px;height:600px;\">';print_r( $_POST['_translation'] );echo '</textarea>';\n//die('dead');\n\n\t\t\t// Stash all the post meta\n\t\t\tif ( isset( $_POST['_translation'] ) ) {\n\t\t\t\t$_translation = $_POST['_translation'];\n\t\t\t\tdelete_post_meta( $post_ID, '_translation' );\n\t\t\t\tforeach( $_translation as $key => $trans ) {\n\t\t\t\t\t$trans = wp_kses( $trans, '', '' );\n\t\t\t\t\tif ( $trans != '' )\n\t\t\t\t\t\tadd_post_meta( $post_ID, '_translation', $trans );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static function save_metabox_data($post_id){\n\t\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$keywords = array();\t\t\t\n\t\t\t//now it's safe to save info\n\t\t\tif(isset($_POST['affiliate_keywords'])){\n\t\t\t\tforeach($_POST['affiliate_keywords'] as $key => $value){\n\t\t\t\t\t$keywords[$key] = trim($value);\n\t\t\t\t}\n\t\t\t\tself::save_keywords($post_id, $keywords);\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['local_position_enabled'])){\n\t\t\t\tupdate_post_meta($post_id, 'local_position_enabled', 'y');\n\t\t\t}\n\t\t\telse{\n\t\t\t\tupdate_post_meta($post_id, 'local_position_enabled', '');\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['position'])){\n\t\t\t\t$positions = array();\n\t\t\t\tforeach($_POST['position'] as $key => $value){\n\t\t\t\t\t$positions[$key] = $value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tupdate_post_meta($post_id, 'local_positions', $positions);\n\t\t\t}\n\t\t\t\n\t\t\t//saving loal links\n\t\t\tif(isset($_POST['local_links'])){\n\t\t\t\tupdate_post_meta($post_id, 'local_links', $_POST['local_links']);\n\t\t\t}\n\t\t}", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\t\t\t\n\t\t\t// Set wrong answers\n\t\t\tdelete_post_meta( $post_ID, '_wrong_answers' );\n\t\t\tforeach( $_POST['_wrong_answers'] as $key => $value ) {\n\t\t\t\tif ( $value != '' && $value != 0 ) {\n\t\t\t\t\t$value = (int) $value;\n\t\t\t\t\tadd_post_meta( $post_ID, '_wrong_answers', $value );\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// Stash all the post meta\n\t\t\tforeach( $this->post_meta as $key => $x ) {\n\t\t\t\tif ( isset( $_POST[$key] ) ) {\n\t\t\t\t\t$value = (int) $_POST[$key];\n\t\t\t\t\tif ( $value != 0 )\n\t\t\t\t\t\tupdate_post_meta( $post_ID, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function saveForm(){\t\n\t\t$this->saveFormBase();\n\t\t$this->saveFormGeoCoverage();\n\t\t$this->saveVaFormResolution();\n\t\tif ($this->dataset->nbModForm >0) $this->saveModForm();\n\t\tif ($this->dataset->nbSatForm >0) $this->saveSatForm();\n\t\tif ($this->dataset->nbInstruForm >0) $this->saveInstruForm();\n\t\t$this->saveFormGrid();\n\t\t//Parameter\n\t\t$this->saveFormVariables($this->dataset->nbVars);\n\t\t//REQ DATA_FORMAT\n\t\t$this->dataset->required_data_formats = array();\n\t\t$this->dataset->required_data_formats[0] = new data_format;\n\t\t$this->dataset->required_data_formats[0]->data_format_id = $this->exportValue('required_data_format');\n\t}", "function tiva_product_custom_data_meta_box_save($post_id)\n{\n if (defined('DOING_AJAX')) {\n return;\n }\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return;\n }\n\n if (isset($_POST['product_garanti'])) {\n\n update_post_meta($post_id, 'product_garanti', $_POST['product_garanti']);\n\n } else {\n\n delete_post_meta($post_id, 'product_garanti');\n }\n\n if (isset($_POST['shoper_input'])) {\n\n update_post_meta($post_id, 'shoper_input', $_POST['shoper_input']);\n\n } else {\n delete_post_meta($post_id, 'shoper_input');\n }\n\n if (isset($_POST['bastebandi_input'])) {\n\n update_post_meta($post_id, 'bastebandi_input', $_POST['bastebandi_input']);\n\n } else {\n delete_post_meta($post_id, 'bastebandi_input');\n }\n\n\n if (isset($_POST['haml_input'])) {\n\n update_post_meta($post_id, 'haml_input', $_POST['haml_input']);\n\n } else {\n delete_post_meta($post_id, 'haml_input');\n }\n\n}", "function caviar_save_meta_box_data( $post_id ) {\n\t// Sanitize user input.\n\t$txtname = sanitize_text_field( $_POST['txtName'] );\n\t$txtAddress = $_POST['txtAddress'];\n\t$selTrans = $_POST['selTrans'];\n\t$txtWebsite = sanitize_text_field( $_POST['txtWebsite'] );\n\t$chkFood = $_POST['chkFood'];\n\t$itemFeatures = $_POST['itemFeatures'];\n\t$rePersonalData = $_POST['rePersonalData'];\n\t$gender = $_POST['gender'];\n\t$edAboutMe = $_POST['edAboutMe'];\n\n\t$features = array();\n\n\t// Update the meta field in the database.\n\tupdate_post_meta( $post_id, '_txtName', $txtname );\n\tupdate_post_meta( $post_id, '_txtAddress', $txtAddress );\n\tupdate_post_meta( $post_id, '_selTrans', $selTrans );\n\tupdate_post_meta( $post_id, '_txtWebsite', $txtWebsite );\n\tupdate_post_meta( $post_id, '_chkFood', $chkFood );\n\tupdate_post_meta( $post_id, '_gender', $gender );\n\tupdate_post_meta( $post_id, '_colorMeta', $_POST['colorMeta'] );\n\tupdate_post_meta( $post_id, '_selHobby', $_POST['selHobby'] );\n\tupdate_post_meta( $post_id, '_edAboutMe', $edAboutMe );\n\tupdate_post_meta( $post_id, '_selCats', $_POST['selCats'] );\n\tupdate_post_meta( $post_id, '_upPhoto', $_POST['upPhoto'] );\n\tupdate_post_meta( $post_id, '_upLicense', $_POST['upLicense'] );\n\n\t// var_dump($itemFeatures);\n\tif ( isset( $itemFeatures ) )\n\t{\n\t\tforeach ( $itemFeatures as $feature )\n\t\t{\n\t\t\tif ( '' !== trim( $feature['title'] ) )\n\t\t\t\t$features[] = $feature;\n\t\t}\n\t}\n\n\tupdate_post_meta( $post_id, '_itemFeatures', $features );\n\n\n\tif ( isset( $rePersonalData ) )\n\t{\n\t\tforeach ( $rePersonalData as $data )\n\t\t{\n\t\t\t$pData[] = $data;\n\t\t}\n\t}\n\n\tupdate_post_meta( $post_id, '_rePersonalData', $pData );\n}", "function save_rew_meta_box_input($rew_id)\n{\n\n\tif (isset($_POST['main_address'])){\n\t\t\n\t\tupdate_post_meta($rew_id , 'main_address', $_POST['main_address']);\n\t}\n\n\tif (isset($_POST['district_address'])){\n\t\t\n\t\tupdate_post_meta($rew_id , 'district_address', $_POST['district_address']);\n\t}\n\n\tif (isset($_POST['rew_rooms'])){\n\t\t\n\t\tupdate_post_meta($rew_id , 'rew_rooms', $_POST['rew_rooms']);\n\t}\n\n\n\tif (isset($_POST['rew_floors'])){\n\t\t\n\t\tupdate_post_meta($rew_id , 'rew_floors', $_POST['rew_floor']);\n\t}\n\tif (isset($_POST['Apartment_area'])){\n\t\t\n\t\tupdate_post_meta($rew_id , 'Apartment_area', $_POST['Apartment_area']);\n\t}\n\n\tif (isset($_POST['flat_type'])){\n\t\t\n\t\tupdate_post_meta($rew_id , 'flat_type', $_POST['flat_type']);\n\t}\n\n\tif (isset($_POST['rew_price'])){\n\t\t\n\t\tupdate_post_meta($rew_id , 'rew_price', $_POST['rew_price']);\n\t}\n\n\n\n\t\t// villa rew_garden\n\tif (isset($_POST['rew_garden'])){\n\t\t\n\t\tupdate_post_meta($rew_id , 'rew_garden', $_POST['rew_garden']);\n\t}\n\n}", "function metabox_store($post){\n\t\tglobal $postmec;\n\t\tinclude $postmec->get_postmec_dir() . 'metaboxes/metabox.store.php';\n\t}", "Function Wp_meta_box_store(){\n\n\t$mult_posts = array( 'post', 'page' );\n\n\tforeach ($mult_posts as $mult_post) {\n\t\tadd_meta_box(\n\t\t\t'meta_box_id', \t\t\t\t\t# metabox id\n\t\t\t__('Author Bio', 'textdomain'),\t# Title \n\t\t\t'wp_meta_box_call_back_func_store', \t# Callback Function \n\t\t\t$mult_post, \t\t\t\t\t# Post Type\n\t\t\t'normal'\t\t\t\t\t\t# textcontent\n\t\t);\n\t}\n\t\n}", "public function saveData($data)\n\t {\n\t \t$name = self::getNameMetaBox($data['_title_meta_box']);\n\n\t \t$content = self::getDataMetas();\n\t \t$data['_name_meta_box'] = $name;\n\t \t$content[$name] = $data;\n\t \tupdate_option('metas-custom', $content);\n\t }", "function ccwts_metabox_ticketsale_save( $post_id )\n{\n //if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n //if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n //if( !current_user_can( 'edit_post' ) ) return;\n \n // now we can actually save the data\n /*$allowed = array( \n 'a' => array( // on allow a tags\n 'href' => array() // and those anchors can only have href attribute\n )\n );*/\n \n // Make sure your data is set before trying to save it\n if(basename( get_page_template() ) == 'page-biglietteria-2017.php' || basename( get_page_template() ) == 'page-biglietteria-2017-hotel.php' )\n {\n \n if( isset( $_POST['ccwts_ticketsale_id'] ) && intval($_POST['ccwts_ticketsale_id']) > 0)\n ccwts_field('ticketsale_id', $_POST['ccwts_ticketsale_id']);\n\n if(basename( get_page_template() ) == 'page-biglietteria-2017-hotel.php' ){\n if( isset( $_POST['ccwts_parkhotel_ticket_id'] ) && intval($_POST['ccwts_parkhotel_ticket_id']) > 0)\n ccwts_field('parkhotel_ticket_id', $_POST['ccwts_parkhotel_ticket_id']);\n }\n\n }\n //update_post_meta( $post_id, 'my_meta_box_text', wp_kses( $_POST['my_meta_box_text'], $allowed ) );\n \n //if( isset( $_POST['my_meta_box_select'] ) )\n //update_post_meta( $post_id, 'my_meta_box_select', esc_attr( $_POST['my_meta_box_select'] ) );\n \n // This is purely my personal preference for saving check-boxes\n //$chk = isset( $_POST['my_meta_box_check'] ) && $_POST['my_meta_box_select'] ? 'on' : 'off';\n //update_post_meta( $post_id, 'my_meta_box_check', $chk );\n}", "function OF_meta_box_data_update( $post_id ) {\n\n /*\n * We need to verify this came from our screen and with proper authorization,\n * because the save_post action can be triggered at other times.\n */\n\n // Check if our nonce is set.\n if ( ! isset( $_POST['OF_meta_box_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $_POST['OF_meta_box_nonce'], 'OF_meta_box' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions.\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n }\n\n } else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n \n\n global $allowedtags;\n\n // allow iframe only in this instance\n $iframe = array( 'iframe' => array(\n 'src' => array(),\n 'width' => array(),\n 'height' => array(),\n 'frameborder' => array(),\n 'div' => array(),\n 'span'=> array(),\n 'class' => array(),\n 'allowFullScreen' => array() // add any other attributes you wish to allow\n ) );\n\n $allowed_html = array_merge( $allowedtags, $iframe );\n\n\n // Sanitize user input.\n // Without html \"sanitize_text_field\"\n global $wpdb;\n $allnormalMetas = $wpdb->get_results(\"SELECT * FROM `plugin_of_metabox`\", OBJECT); //\\\n foreach($allnormalMetas as $single_meta){ \n $my_data_sku = wp_kses( $_POST[$single_meta->meta_slug], $allowed_html ); // pic data from post \n update_post_meta( $post_id, $single_meta->meta_slug, $my_data_sku); // Update the meta field in the database.\n }\n}", "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 }", "function do_save(){\n\t\t// check that number and post_ID is set\n\t\tif( empty($this->post_ID) || empty($this->number) ) return false;\n\t\t\n\t\t// check that we have data in POST\n\t\tif( $this->id_base != 'checkbox' && (\n\t\t\t\tempty($_POST['field-'.$this->id_base][$this->number]) ||\n\t\t\t\t!is_array($_POST['field-'.$this->id_base][$this->number])\n\t\t\t)\n\t\t )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$input = @$_POST['field-'.$this->id_base][$this->number];\n\t\t// get real values\n\t\t$values = $this->save( $input );\n\t\t// save to post meta\n\t\tupdate_post_meta($this->post_ID, $this->slug, $values);\n\t\treturn true;\n\t}", "protected function save_meta() {\n\n\t\t// save all data in array\n\t\tupdate_user_meta( $this->user_id, APP_REPORTS_U_DATA_KEY, $this->meta );\n\n\t\t// also save total reports in separate meta for sorting queries\n\t\tupdate_user_meta( $this->user_id, APP_REPORTS_U_TOTAL_KEY, $this->total_reports );\n\t}", "function wck_save_single_metabox( $post_id, $post ){\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\r\n return $post_id;\r\n\r\n // Check the user's permissions.\r\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\r\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\r\n return $post_id;\r\n }\r\n } else {\r\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\r\n return $post_id;\r\n }\r\n }\r\n\r\n /* only go through for metaboxes defined for this post type */\r\n if( get_post_type( $post_id ) != $this->args['post_type'] )\r\n return $post_id;\r\n\r\n if( !empty( $_POST ) ){\r\n /* for single metaboxes we save a hidden input that contains the meta_name attr as a key so we need to search for it */\r\n foreach( $_POST as $request_key => $request_value ){\r\n if( strpos( $request_key, '_wckmetaname_' ) !== false && strpos( $request_key, '#wck' ) !== false ){\r\n /* found it so now retrieve the meta_name from the key formatted _wckmetaname_actuaname#wck */\r\n $request_key = str_replace( '_wckmetaname_', '', $request_key );\r\n $meta_name = sanitize_text_field( str_replace( '#wck', '', $request_key ) );\r\n /* we have it so go through only on the WCK object instance that has this meta_name */\r\n if( $this->args['meta_name'] == $meta_name ){\r\n\r\n /* get the meta values from the $_POST and store them in an array */\r\n $meta_values = array();\r\n if( !empty( $this->args['meta_array'] ) ){\r\n foreach ($this->args['meta_array'] as $meta_field){\r\n /* in the $_POST the names for the fields are prefixed with the meta_name for the single metaboxes in case there are multiple metaboxes that contain fields wit hthe same name */\r\n $single_field_name = $this->args['meta_name'] .'_'. Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'],$meta_field );\r\n if (isset($_POST[$single_field_name])) {\r\n /* checkbox needs to be stored as string not array */\r\n if( $meta_field['type'] == 'checkbox' )\r\n $_POST[$single_field_name] = implode( ', ', $_POST[$single_field_name] );\r\n\r\n $meta_values[Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'], $meta_field )] = wppb_sanitize_value( $_POST[$single_field_name] );\r\n }\r\n else\r\n $meta_values[Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'], $meta_field )] = '';\r\n }\r\n }\r\n\r\n /* test if we have errors for the required fields */\r\n $errors = self::wck_test_required( $this->args['meta_array'], $meta_name, $meta_values, $post_id );\r\n if( !empty( $errors ) ){\r\n /* if we have errors then add them in the global. We do this so we get all errors from all single metaboxes that might be on that page */\r\n global $wck_single_forms_errors;\r\n if( !empty( $errors['errorfields'] ) ){\r\n foreach( $errors['errorfields'] as $key => $field_name ){\r\n $errors['errorfields'][$key] = $this->args['meta_name']. '_' .$field_name;\r\n }\r\n }\r\n $wck_single_forms_errors[] = $errors;\r\n }\r\n else {\r\n /* no errors so we can save */\r\n update_post_meta($post_id, $meta_name, array($meta_values));\r\n /* handle unserialized fields */\r\n if ($this->args['unserialize_fields']) {\r\n if (!empty($this->args['meta_array'])) {\r\n foreach ($this->args['meta_array'] as $meta_field) {\r\n update_post_meta($post_id, $meta_name . '_' . Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'], $meta_field ) . '_1', $_POST[$this->args['meta_name'] . '_' . Wordpress_Creation_Kit_PB::wck_generate_slug( $meta_field['title'], $meta_field )]);\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }", "function pexeto_save_meta_data($new_meta_boxes, $post_id){\n\tforeach($new_meta_boxes as $meta_box) {\n\n\t\tif($meta_box['type']!='heading'){\n\t\t\t// Verify\n\t\t\tif ( !wp_verify_nonce( $_POST[$meta_box['name'].'_noncename'], plugin_basename(__FILE__) )) {\n\t\t\t\treturn $post_id;\n\t\t\t}\n\n\t\t\tif ( 'page' == $_POST['post_type'] ) {\n\t\t\t\tif ( !current_user_can( 'edit_page', $post_id ))\n\t\t\t\treturn $post_id;\n\t\t\t} else {\n\t\t\t\tif ( !current_user_can( 'edit_post', $post_id ))\n\t\t\t\treturn $post_id;\n\t\t\t}\n\n\t\t\t$data = $_POST[$meta_box['name'].'_value'];\n\n\n\n\t\t\tif(get_post_meta($post_id, $meta_box['name'].'_value') == \"\")\n\t\t\tadd_post_meta($post_id, $meta_box['name'].'_value', $data, true);\n\t\t\telseif($data != get_post_meta($post_id, $meta_box['name'].'_value', true))\n\t\t\tupdate_post_meta($post_id, $meta_box['name'].'_value', $data);\n\t\t\telseif($data == \"\")\n\t\t\tdelete_post_meta($post_id, $meta_box['name'].'_value', get_post_meta($post_id, $meta_box['name'].'_value', true));\n\n\t\t}\n\t}\n}", "function mf_SALF_artist_meta_save_data($post_id) {\n\tglobal $artist_meta_box;\n\t\n\t\n\t\n\t\n \n \n // verify nonce\n if (!wp_verify_nonce($_POST['artist_meta_box_nonce'], basename(__FILE__))) {\n return $post_id;\n }\n\n // check autosave\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n }\n\n // check permissions\n if ('page' == $_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return $post_id;\n }\n } elseif (!current_user_can('edit_post', $post_id)) {\n return $post_id;\n }\n \n foreach ($artist_meta_box['fields'] as $field) {\n\t\t\n\t\tif($field['type']!='checkbox'){\n $old = get_post_meta($post_id, $field['id'], true);\n $new = $_POST[$field['id']];\n\t\t \n\t\t\n if ($new && $new != $old) {\n update_post_meta($post_id, $field['id'], $new);\n } elseif ('' == $new && $old) {\n delete_post_meta($post_id, $field['id'], $old);\n }\n\n\t\t} else {\n\t\t\n\t\t$old = get_post_meta($post_id, 'mf_SALF_artist_meta_checks', true);\n\t\t$new = $_POST['mf_SALF_artist_meta_checks'];\n\t\t\n\t\t\n\t\tif ($new && $new != $old) {\n update_post_meta($post_id, 'mf_SALF_artist_meta_checks', $new);\n } elseif ('' == $new && $old) {\n delete_post_meta($post_id, 'mf_SALF_artist_meta_checks', $old);\n }\t\n\t\t}\n\t\t\n }\n}", "function save_metabox_data($post_id){\t\n\t\t\t\n\t\tupdate_post_meta($post_id,'wiki-contributons-status',$_REQUEST['wiki-tabel-shownorhide']);\n\t\t\n\t}", "function meta_box_save( $post_id )\n{\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n //if( !current_user_can( 'edit_post' ) ) return;\n\t\n\t// now we can actually save the data\n $allowed = array(\n 'a' => array( // on allow a tags\n 'href' => array() // and those anchors can only have href attribute\n )\n );\n // Make sure your data is set before trying to save it\n if( isset( $_POST['meta_box_manufacturer'] ) )\n update_post_meta( $post_id, 'meta_box_manufacturer', $_POST['meta_box_manufacturer'] );\n}", "function save_my_meta_box_data2( $post_id ) {\n\n\n // Check if our nonce is set.\n if ( ! isset( $_POST['post_meta_box_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $_POST['post_meta_box_nonce'], 'post_meta_box' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions.\n if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n }\n\n } else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n\n // Make sure that it is set.\n if ( ! isset( $_POST['second_title'] ) ) {\n return;\n }\n // Make sure that it is set.\n if ( ! isset( $_POST['fexid'] ) ) {\n return;\n }\n // Make sure that it is set.\n if ( ! isset( $_POST['po_sources'] ) ) {\n return;\n }\n\n // Sanitize user input.\n $my_sec_title = sanitize_text_field( $_POST['second_title'] );\n $my_post_sources = sanitize_text_field( $_POST['po_sources'] );\n $my_fexid = sanitize_text_field( $_POST['fexid'] );\n\n // Update the meta field in the database.\n update_post_meta( $post_id, 'post_second_title', $my_sec_title );\n update_post_meta( $post_id, 'post_sources', $my_post_sources );\n update_post_meta( $post_id, 'post_fexid', $my_fexid );\n}", "static function save_metabox($post_id){\n\t\tif ( ! isset( $_POST['flat-options_nonce'] ) )\n\t\t\treturn $post_id;\n\n\t\t$nonce = $_POST['flat-options_nonce'];\n\n\n\t\t// Verify that the nonce is valid.\n\t\tif ( ! wp_verify_nonce( $nonce, 'flat-options' ) )\n\t\t\treturn $post_id;\n\n\t\t// If this is an autosave, our form has not been submitted,\n // so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t\t\treturn $post_id;\n\n\t\t// Check the user's permissions.\n\t\tif ( 'page' == $_POST['post_type'] ) {\n\n\t\t\tif ( ! current_user_can( 'edit_page', $post_id ) )\n\t\t\t\treturn $post_id;\n\t\n\t\t} else {\n\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) )\n\t\t\t\treturn $post_id;\n\t\t}\n\n\t\t/* OK, its safe for us to save the data now. */\n\t\t\n\t\t$fieldblocks = self::get_fields();\n\t\t\n\t\tforeach ($fieldblocks as $key => $fields){\n\t\t\tforeach ($fields as $key => $field){\t\t\t\n\t\t\t\tif ($field['type'] == \"text\") $value = sanitize_text_field($_POST[$key]);\n\t\t\t\tif ($field['type'] == \"number\") $value = (int) $_POST[$key];\n\t\t\t\t\n\t\t\t\tupdate_post_meta( $post_id, $key, $value );\n\t\t\t}\n\t\t}\t\n\t \n }", "function prosody_poem_type_save_meta_box_data ($post_id=null)\n{\n $post_id = (is_null($post_id)) ? get_post()->ID : $post_id;\n\n /*\n * We need to verify this came from our screen and with proper\n * authorization, because the save_post action can be triggered at other\n * times.\n */\n\n // Check if our nonce is set.\n if ( ! isset( $_POST['prosody_poem_type_meta_box_nonce'] ) ) {\n return;\n }\n\n // Verify that the nonce is valid.\n $nonce = $_POST['prosody_poem_type_meta_box_nonce'];\n if ( ! wp_verify_nonce( $nonce, 'prosody_poem_type_meta_box' ) ) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't\n // want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check the user's permissions.\n if ( isset( $_POST['post_type'] ) &&\n 'prosody_poem' == $_POST['post_type'] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n }\n\n } else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n /* OK, its safe for us to save the data now. */\n\n // Make sure that it is set.\n if ( ! isset( $_POST['prosody_poem_type'] ) ) {\n return;\n }\n\n // Sanitize user input. In this case we don't so the transform will work.\n $my_data = sanitize_text_field( $_POST['prosody_poem_type'] );\n\n // Update the meta field in the database.\n update_post_meta( $post_id, 'Type', $my_data );\n}", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "abstract protected function saveItems();" ]
[ "0.6280761", "0.6053815", "0.5933455", "0.5899549", "0.58380383", "0.57930064", "0.57580316", "0.5753993", "0.57531196", "0.5750848", "0.57364553", "0.5716982", "0.5690367", "0.56795466", "0.56663674", "0.56576496", "0.5636568", "0.5627613", "0.5614143", "0.55847514", "0.5566941", "0.55539846", "0.55235106", "0.55074954", "0.550669", "0.5496418", "0.5489133", "0.5481315", "0.54795426", "0.54488623" ]
0.6570864
0
Sets the update messages for the units custom post type.
function updated_messages( $messages ) { global $post_ID, $post; $messages['units'] = array( 0 => '', // Unused. Messages start at index 1. 1 => __('Unit updated.'), 2 => __('Unit updated.'), 3 => __('Custom field deleted.'), 4 => __('Unit updated.'), 5 => isset($_GET['revision']) ? sprintf( __('Unit restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => __('Unit published.'), 7 => __('Unit saved.'), 8 => __('Unit submitted. <a target="_blank" href="%s">Preview Unit</a>'), 9 => sprintf( __('Unit scheduled for: <strong>%1$s</strong>.'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ) ), 10 => __('Unit draft updated.') ); return $messages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post_type_updated_messages( $messages ) {\r\n global $post, $post_ID;\r\n\r\n $name = ucwords( str_replace( '_', ' ', $this->post_type_name ) );\r\n $plural = $name . 's';\r\n\r\n $messages[$this->post_type_name] = array(\r\n 0 => '', // Unused. Messages start at index 1.\r\n 1 => sprintf( __(\"$name updated. <a href='%s'>View $name</a>\"), esc_url( get_permalink($post_ID) ) ),\r\n 2 => __(\"Custom field updated.\"),\r\n 3 => __(\"Custom field deleted.\"),\r\n 4 => __(\"$name updated.\"),\r\n // translators: %s: date and time of the revision\r\n 5 => isset($_GET['revision']) ? sprintf( __(\"$name restored to revision from %s\"), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\r\n 6 => sprintf( __(\"$name published. <a href='%s'>View $name</a>\"), esc_url( get_permalink($post_ID) ) ),\r\n 7 => __(\"$name saved.\"),\r\n 8 => sprintf( __(\"$name submitted. <a target='_blank' href='%s'>Preview book</a>\"), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),\r\n 9 => sprintf( __(\"$name scheduled for: <strong>%1$s</strong>. <a target='_blank' href='%2$s'>Preview book</a>\"),\r\n // translators: Publish box date format, see php.net/date\r\n date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),\r\n 10 => sprintf( __(\"$name draft updated. <a target='_blank' href='%s'>Preview book</a>\"), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),\r\n );\r\n\r\n return $messages;\r\n }", "public function custom_post_type_post_update_messages( $messages ) {\n\n\t\t\t$custom_post_type = get_post_type( get_the_ID() );\n\n\t\t\tif ( 'astra_adv_header' == $custom_post_type ) {\n\n\t\t\t\t$obj = get_post_type_object( $custom_post_type );\n\t\t\t\t$singular_name = $obj->labels->singular_name;\n\t\t\t\t$messages[ $custom_post_type ] = array(\n\t\t\t\t\t0 => '', // Unused. Messages start at index 1.\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t1 => sprintf( __( '%s updated.', 'astra-addon' ), $singular_name ),\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t2 => sprintf( __( 'Custom %s updated.', 'astra-addon' ), $singular_name ),\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t3 => sprintf( __( 'Custom %s deleted.', 'astra-addon' ), $singular_name ),\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t4 => sprintf( __( '%s updated.', 'astra-addon' ), $singular_name ),\n\t\t\t\t\t/* translators: %1$s: singular custom post type name ,%2$s: date and time of the revision */\n\t\t\t\t\t5 => isset( $_GET['revision'] ) ? sprintf( __( '%1$s restored to revision from %2$s', 'astra-addon' ), $singular_name, wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t6 => sprintf( __( '%s published.', 'astra-addon' ), $singular_name ),\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t7 => sprintf( __( '%s saved.', 'astra-addon' ), $singular_name ),\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t8 => sprintf( __( '%s submitted.', 'astra-addon' ), $singular_name ),\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t9 => sprintf( __( '%s scheduled for.', 'astra-addon' ), $singular_name ),\n\t\t\t\t\t/* translators: %s: singular custom post type name */\n\t\t\t\t\t10 => sprintf( __( '%s draft updated.', 'astra-addon' ), $singular_name ),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $messages;\n\t\t}", "function rw_post_updated_messages( $messages ) {\n\n\t\t$post = get_post();\n\t\t$post_type = get_post_type( $post );\n\t\t$post_type_object = get_post_type_object( $post_type );\n\t\t\n\t\tif ( !get_transient( get_current_user_id().'publisherror' ) ){\n\t\t\treturn $messages;\n\t\t}\n\t\telse {\n\t\t\t$messages['post'][6] = '';\n\t\t}\n\t\t\n\t\treturn $messages;\n}", "public function talks_updated_messages( $messages = array() ) {\n\t\t\tglobal $post;\n\n\t\t\t// Bail if not posting/editing a talk.\n\t\t\tif ( ! wct_is_admin() ) {\n\t\t\t\treturn $messages;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @param array list of updated messages\n\t\t\t */\n\t\t\t$messages[ $this->post_type ] = apply_filters( 'wct_admin_updated_messages', array(\n\t\t\t\t 0 => '', // Unused. Messages start at index 1.\n\t\t\t\t 1 => sprintf( __( 'Talk updated. <a href=\"%s\">View Talk</a>', 'wordcamp-talks' ), esc_url( wct_talks_get_talk_permalink( $post ) ) ),\n\t\t\t\t 2 => __( 'Custom field updated.', 'wordcamp-talks' ),\n\t\t\t\t 3 => __( 'Custom field deleted.', 'wordcamp-talks' ),\n\t\t\t\t 4 => __( 'Talk updated.', 'wordcamp-talks'),\n\t\t\t\t 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Talk restored to revision from %s', 'wordcamp-talks' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\n\t\t\t\t 6 => sprintf( __( 'Talk published. <a href=\"%s\">View Talk</a>', 'wordcamp-talks' ), esc_url( wct_talks_get_talk_permalink( $post ) ) ),\n\t\t\t\t 7 => __( 'Talk saved.', 'wordcamp-talks' ),\n\t\t\t\t 8 => sprintf( __( 'Talk submitted. <a target=\"_blank\" href=\"%s\">Preview Talk</a>', 'wordcamp-talks' ), esc_url( add_query_arg( 'preview', 'true', wct_talks_get_talk_permalink( $post ) ) ) ),\n\t\t\t\t 9 => sprintf(\n\t\t\t\t \t\t__( 'Talk scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview Talk</a>', 'wordcamp-talks' ),\n\t\t\t\t\t\tdate_i18n( _x( 'M j, Y @ G:i', 'Talk Publish box date format', 'wordcamp-talks' ), strtotime( $post->post_date ) ),\n\t\t\t\t\t\tesc_url( wct_talks_get_talk_permalink( $post ) )\n\t\t\t\t\t),\n\t\t\t\t10 => sprintf( __( 'Talk draft updated. <a target=\"_blank\" href=\"%s\">Preview Talk</a>', 'wordcamp-talks' ), esc_url( add_query_arg( 'preview', 'true', wct_talks_get_talk_permalink( $post ) ) ) ),\n\t\t\t) );\n\n\t\t\treturn $messages;\n\t\t}", "function post_updated_messages($messages)\n {\n }", "function post_updated_messages( $messages ) {\n\t\t$post = get_post();\n\t\t$post_type_object = get_post_type_object( 'locale' );\n\n\t\t$messages['locale'] = array(\n\t\t\t0 => '', // Unused. Messages start at index 1.\n\t\t\t1 => __( 'Locale updated.', 'wp-i18n-team-crawler' ),\n\t\t\t2 => __( 'Custom field updated.', 'wp-i18n-team-crawler' ),\n\t\t\t3 => __( 'Custom field deleted.', 'wp-i18n-team-crawler' ),\n\t\t\t4 => __( 'Locale updated.', 'wp-i18n-team-crawler' ),\n\t\t\t/* translators: %s: date and time of the revision */\n\t\t\t5 => isset( $_GET['revision'] ) ? sprintf( __( 'Locale restored to revision from %s', 'wp-i18n-team-crawler' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\n\t\t\t6 => __( 'Locale published.', 'wp-i18n-team-crawler' ),\n\t\t\t7 => __( 'Locale saved.', 'wp-i18n-team-crawler' ),\n\t\t\t8 => __( 'Locale submitted.', 'wp-i18n-team-crawler' ),\n\t\t\t9 => sprintf(\n\t\t\t\t__( 'Locale scheduled for: <strong>%1$s</strong>.', 'wp-i18n-team-crawler' ),\n\t\t\t\t// translators: Publish box date format, see http://php.net/date\n\t\t\t\tdate_i18n( __( 'M j, Y @ G:i', 'wp-i18n-team-crawler' ), strtotime( $post->post_date ) )\n\t\t\t),\n\t\t\t10 => __( 'Locale draft updated.', 'wp-i18n-team-crawler' )\n\t\t);\n\n\t\tif ( $post_type_object->publicly_queryable ) {\n\t\t\t$permalink = get_permalink( $post->ID );\n\n\t\t\t$view_link = sprintf( ' <a href=\"%s\">%s</a>', esc_url( $permalink ), __( 'View locale', 'wp-i18n-team-crawler' ) );\n\t\t\t$messages['locale' ][1] .= $view_link;\n\t\t\t$messages['locale' ][6] .= $view_link;\n\t\t\t$messages['locale' ][9] .= $view_link;\n\n\t\t\t$preview_permalink = add_query_arg( 'preview', 'true', $permalink );\n\t\t\t$preview_link = sprintf( ' <a target=\"_blank\" href=\"%s\">%s</a>', esc_url( $preview_permalink ), __( 'Preview locale', 'wp-i18n-team-crawler' ) );\n\t\t\t$messages['locale' ][8] .= $preview_link;\n\t\t\t$messages['locale' ][10] .= $preview_link;\n\t\t}\n\n\t\treturn $messages;\n\t}", "function my_updated_messages( $messages ) {\n\tglobal $post, $post_ID;\n\t$messages['product'] = array(\n\t\t0 => '',\n\t\t1 => sprintf( __('Product updated. <a href=\"%s\">View product</a>'), esc_url( get_permalink($post_ID) ) ),\n\t\t2 => __('Custom field updated.'),\n\t\t3 => __('Custom field deleted.'),\n\t\t4 => __('Product updated.'),\n\t\t5 => isset($_GET['revision']) ? sprintf( __('Product restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\n\t\t6 => sprintf( __('Product published. <a href=\"%s\">View product</a>'), esc_url( get_permalink($post_ID) ) ),\n\t\t7 => __('Product saved.'),\n\t\t8 => sprintf( __('Product submitted. <a target=\"_blank\" href=\"%s\">Preview product</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),\n\t\t9 => sprintf( __('Product scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview product</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),\n\t\t10 => sprintf( __('Product draft updated. <a target=\"_blank\" href=\"%s\">Preview product</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),\n\t);\n\treturn $messages;\n}", "public function onPostUpdatePostMessages(Event $event): void\n {\n $this->container->get(IOInterface::class)->write($this->postMessages);\n }", "function update_messages( $event_messages ) {\n\t\tglobal $post, $post_ID;\n\t\t\n\t\t/* Set some simple messages for editing slides, no post previews needed. */\n\t\t$event_messages['event'] = array( \n\t\t\t0\t=> '',\n\t\t\t1\t=> 'Event updated.',\n\t\t\t2\t=> 'Custom field updated.',\n\t\t\t2\t=> 'Custom field deleted.',\n\t\t\t4\t=> 'Event updated.',\n\t\t\t5\t=> isset($_GET['revision']) ? sprintf( 'Event restored to revision from %s', wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\n\t\t\t6\t=> 'Event added to calendar.',\n\t\t\t7\t=> 'Event saved.',\n\t\t\t8\t=> 'Event added to calendar.',\n\t\t\t9\t=> sprintf( 'Event scheduled for: <strong>%1$s</strong>.' , strtotime( $post->post_date ) ),\n\t\t\t10\t=> 'Event draft updated.',\n\t\t);\n\t\treturn $event_messages;\n\t}", "public function custom_bulk_admin_notices() {\n\t\tglobal $post_type, $pagenow;\n\t\tif($pagenow == 'edit.php' && $post_type == 'post' && isset($_REQUEST['built']) && (int) $_REQUEST['built']) {\n\t\t\t$message = sprintf( _n( 'Post flat file built.', '%s post flat files built.', $_REQUEST['built'] ), number_format_i18n( $_REQUEST['built'] ) );\n\t\t\techo \"<div class=\\\"updated\\\"><p>{$message}</p></div>\";\n\t\t}\n\t}", "function volpress_update_messages( $messages ) {\n\tglobal $post, $post_ID;\n\t$messages['volpress_vol'] = array(\n\t0 => '', // Unused. Messages start at index 1.\n\t1 => sprintf( __('Volunteer Event updated. <a href=\"%s\">View volunteer Event</a>', 'your_text_domain'), esc_url( get_permalink($post_ID) ) ),\n\t2 => __('Custom field updated.', 'your_text_domain'),\n\t3 => __('Custom field deleted.', 'your_text_domain'),\n\t4 => __('Volunteer Event updated.', 'your_text_domain'),\n\t/* translators: %s: date and time of the revision */\n\t5 => isset($_GET['revision']) ? sprintf( __('Volunteer Event restored to revision from %s', 'your_text_domain'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\n\t6 => sprintf( __('Volunteer Event published. <a href=\"%s\">View Volunteer Event</a>', 'your_text_domain'), esc_url( get_permalink($post_ID) ) ),\n\t7 => __('Volunteer Event saved.', 'your_text_domain'),\n\t8 => sprintf( __('Volunteer Event submitted. <a target=\"_blank\" href=\"%s\">Preview volunteer Event</a>', 'your_text_domain'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),\n\t9 => sprintf( __('Volunteer Event scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview volunteer Event</a>', 'your_text_domain'),\n\t\t// translators: Publish box date format, see http://php.net/date\n\t\tdate_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),\n\t10 => sprintf( __('Volunteer Event draft updated. <a target=\"_blank\" href=\"%s\">Preview volunteer</a>', 'your_text_domain'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),\n\t);\n\n\treturn $messages;\n}", "function ffw_media_updated_messages( $messages ) {\n\tglobal $post, $post_ID;\n\n\t$url1 = '<a href=\"' . get_permalink( $post_ID ) . '\">';\n\t$url2 = ffw_media_get_label_singular();\n\t$url3 = '</a>';\n\n\t$messages['FFW_media'] = array(\n\t\t1 => sprintf( __( '%2$s updated. %1$sView %2$s%3$s.', 'FFW_media' ), $url1, $url2, $url3 ),\n\t\t4 => sprintf( __( '%2$s updated. %1$sView %2$s%3$s.', 'FFW_media' ), $url1, $url2, $url3 ),\n\t\t6 => sprintf( __( '%2$s published. %1$sView %2$s%3$s.', 'FFW_media' ), $url1, $url2, $url3 ),\n\t\t7 => sprintf( __( '%2$s saved. %1$sView %2$s%3$s.', 'FFW_media' ), $url1, $url2, $url3 ),\n\t\t8 => sprintf( __( '%2$s submitted. %1$sView %2$s%3$s.', 'FFW_media' ), $url1, $url2, $url3 )\n\t);\n\n\treturn $messages;\n}", "function my_updated_messages($messages) {\n\tglobal $post, $post_ID;\n\t$messages['listing'] = array(\n\t\t0 => '',\n\t\t1 => sprintf( __('Listing updated. <a href=\"%s\">View Listing</a>'), esc_url(get_permalink($post_ID)) ),\n\t\t2 => __('Custom field updated.'),\n\t\t3 => __('Custom field deleted.'),\n\t\t4 => __('Listing updated.'),\n\t\t5 => isset($_GET['revision']) ? sprintf( __('Listing restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\n\t\t6 => sprintf( __('Listing published. <a href=\"%s\">View Listing</a>'), esc_url(get_permalink($post_ID)) ),\n\t\t7 => __('Listing saved.'),\n\t\t8 => sprintf( __('Listing submitted. <a target=\"_blank\" href=\"%s\">Preview listing</a>'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))) ),\n\t\t9 => sprintf( __('Listing scheduled for : <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview listing</a>'), date_i18n( __('M j, Y @ G:i'), strtotime($post->post_date) ), esc_url(get_permalink($post_ID)) ),\n\t\t10 => sprintf( __('Listing draft updated. <a target=\"_blank\" href=\"%s\">Preview listing</a>'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))) ),\n\t);\n\treturn $messages;\n}", "public function testUpdateReplenishmentCustomFields()\n {\n }", "public function talks_updated_bulk_messages( $bulk_messages = array(), $bulk_counts = array() ) {\n\t\t\t// Bail if not posting/editing a talk\n\t\t\tif ( ! wct_is_admin() ) {\n\t\t\t\treturn $bulk_messages;\n\t\t\t}\n\n\t\t\t$bulk_messages[ $this->post_type ] = apply_filters( 'wct_admin_updated_bulk_messages', array(\n\t\t\t\t'updated' => _n( '%s talk updated.', '%s talks updated.', $bulk_counts['updated'], 'wordcamp-talks' ),\n\t\t\t\t'locked' => _n( '%s talk not updated; somebody is editing it.', '%s talks not updated; somebody is editing them.', $bulk_counts['locked'], 'wordcamp-talks' ),\n\t\t\t\t'deleted' => _n( '%s talk permanently deleted.', '%s talks permanently deleted.', $bulk_counts['deleted'], 'wordcamp-talks' ),\n\t\t\t\t'trashed' => _n( '%s talk moved to the Trash.', '%s talks moved to the Trash.', $bulk_counts['trashed'], 'wordcamp-talks' ),\n\t\t\t\t'untrashed' => _n( '%s talk restored from the Trash.', '%s talks restored from the Trash.', $bulk_counts['untrashed'], 'wordcamp-talks' ),\n\t\t\t) );\n\n\t\t\treturn $bulk_messages;\n\t\t}", "protected function _set_custom_stuff()\n\t{\n\t\t//setup our custom error messages\n\t\t$this->setCustomMessages($this->_custom_messages);\n\t}", "protected function _set_custom_stuff() {\n //setup our custom error messages\n // $this->setCustomMessages( $this->_custom_messages );\n }", "public static function updated_messages( $messages ) {\n\t\tglobal $post;\n\n\t\t$messages['simple_sponsor'] = array(\n\t\t\t0 => '', // Unused. Messages start at index 1.\n\t\t\t1 => sprintf( __('Sponsor updated. <a href=\"%s\">View sponsor</a>', self::$text_domain ), esc_url( get_permalink($post->ID) ) ),\n\t\t\t2 => __('Custom field updated.', self::$text_domain ),\n\t\t\t3 => __('Custom field deleted.', self::$text_domain ),\n\t\t\t4 => __('Sponsor updated.', self::$text_domain ),\n\t\t\t/* translators: %s: date and time of the revision */\n\t\t\t5 => isset($_GET['revision']) ? sprintf( __('Sponsor restored to revision from %s', self::$text_domain ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\n\t\t\t6 => sprintf( __('Sponsor published. <a href=\"%s\">View sponsor</a>', self::$text_domain ), esc_url( get_permalink($post->ID) ) ),\n\t\t\t7 => __('Sponsor saved.', self::$text_domain ),\n\t\t\t8 => sprintf( __('Sponsor submitted. <a target=\"_blank\" href=\"%s\">Preview sponsor</a>', self::$text_domain ), esc_url( add_query_arg( 'preview', 'true', get_permalink($post->ID) ) ) ),\n\t\t\t9 => sprintf( __('Sponsor scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview sponsor</a>', self::$text_domain ),\n\t\t\t // translators: Publish box date format, see http://php.net/date\n\t\t\t date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ),\n\t\t\t10 => sprintf( __('Sponsor draft updated. <a target=\"_blank\" href=\"%s\">Preview sponsor</a>', self::$text_domain ), esc_url( add_query_arg( 'preview', 'true', get_permalink($post->ID) ) ) ),\n\t\t);\n\n\t\treturn $messages;\n\t}", "public static function bulk_admin_notices() {\n\t\tglobal $post_type, $pagenow;\n\n\t\tif ( 'edit.php' !== $pagenow || 'shop_subscription' !== $post_type || ! isset( $_REQUEST['bulk_action'] ) || 'remove_personal_data' !== wc_clean( $_REQUEST['bulk_action'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$changed = isset( $_REQUEST['changed'] ) ? absint( $_REQUEST['changed'] ) : 0;\n\t\t$message = sprintf( _n( 'Removed personal data from %d subscription.', 'Removed personal data from %d subscriptions.', $changed, 'woocommerce-subscriptions' ), number_format_i18n( $changed ) );\n\t\techo '<div class=\"updated\"><p>' . esc_html( $message ) . '</p></div>';\n\t}", "public static function postUpdatedMessages ($messages) {\n global $post, $post_ID;\n $link = esc_url( get_permalink($post_ID) );\n\n $messages['travelcard'] = array(\n 0 => '',\n 1 => sprintf( __('Card updated. <a href=\"%s\">View card</a>'), $link ),\n 2 => __('Custom field updated.'),\n 3 => __('Custom field deleted.'),\n 4 => __('Card updated.'),\n 5 => isset($_GET['revision']) ? sprintf( __('Card restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,\n 6 => sprintf( __('Card published. <a href=\"%s\">View card</a>'), $link ),\n 7 => __('Card saved.'),\n 8 => sprintf( __('Card submitted. <a target=\"_blank\" href=\"%s\">Preview card</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),\n 9 => sprintf( __('Card scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview card</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), $link ),\n 10 => sprintf( __('Card draft updated. <a target=\"_blank\" href=\"%s\">Preview card</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),\n );\n return $messages;\n }", "function Admin_Messages_admin_update($args)\n{\n // Get parameters from whatever input we need. All arguments to this\n // function should be obtained from pnVarCleanFromInput(), getting them\n // from other places such as the environment is not allowed, as that makes\n // assumptions that will not hold in future versions of PostNuke\n list($mid,\n\t $objectid,\n $title,\n $content,\n $language,\n $active,\n $expire,\n $oldtime,\n $changestartday,\n $whocanview) = pnVarCleanFromInput('mid',\n\t\t 'objectid',\n 'title',\n 'content',\n 'language',\n 'active',\n 'expire',\n 'oldtime',\n 'changestartday',\n 'whocanview');\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 \n // At this stage we check to see if we have been passed $objectid, the\n // generic item identifier. This could have been passed in by a hook or\n // through some other function calling this as part of a larger module, but\n // if it exists it overrides $mid\n //\n // Note that this module couuld just use $objectid everywhere to avoid all\n // of this munging of variables, but then the resultant code is less\n // descriptive, especially where multiple objects are being used. The\n // decision of which of these ways to go is up to the module developer\n if (!empty($objectid)) {\n $mid = $objectid;\n } \n\n // Confirm authorisation code. This checks that the form had a valid\n // authorisation code attached to it. If it did not then the function will\n // proceed no further as it is possible that this is an attempt at sending\n // in false data to the system\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n return true;\n }\n\n // Notable by its absence there is no security check here. This is because\n // the security check is carried out within the API function and as such we\n // do not duplicate the work here\n\n // The API function is called. Note that the name of the API function and\n // the name of this function are identical, this helps a lot when\n // programming more complex modules. The arguments to the function are\n // passed in as their own arguments array.\n //\n // The return value of the function is checked here, and if the function\n // suceeded then an appropriate message is posted. Note that if the\n // function did not succeed then the API function should have already\n // posted a failure message so no action is required\n if(pnModAPIFunc('Admin_Messages',\n 'admin',\n 'update',\n array('mid' => $mid,\n 'title' => $title,\n 'content' => $content,\n 'language' => $language,\n 'active' => $active,\n 'expire' => $expire,\n 'oldtime' => $oldtime,\n 'changestartday' => $changestartday,\n 'whocanview' => $whocanview))) {\n // Success\n pnSessionSetVar('statusmsg', _ADMINMESSAGESUPDATED);\n }\n\n // This function generated no output, and so now it is complete we redirect\n // the user to an appropriate page for them to carry on their work\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n\n // Return\n return true;\n}", "function Admin_Messages_admin_modify($args)\n{\n // Get parameters from whatever input we need. All arguments to this\n // function should be obtained from pnVarCleanFromInput(), getting them\n // from other places such as the environment is not allowed, as that makes\n // assumptions that will not hold in future versions of PostNuke\n list($mid,\n $objectid)= pnVarCleanFromInput('mid',\n 'objectid');\n\n \n // Admin 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\n // At this stage we check to see if we have been passed $objecmid, the\n // generic item identifier. This could have been passed in by a hook or\n // through some other function calling this as part of a larger module, but\n // if it exists it overrides $mid\n //\n // Note that this module couuld just use $objecmid everywhere to avoid all\n // of this munging of variables, but then the resultant code is less\n // descriptive, especially where multiple objects are being used. The\n // decision of which of these ways to go is up to the module developer\n if (!empty($objecmid)) {\n $mid = $objecmid;\n } \n\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('Admin_Messages');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n // The user API function is called. This takes the item ID which we\n // obtained from the input and gets us the information on the appropriate\n // item. If the item does not exist we post an appropriate message and\n // return\n $item = pnModAPIFunc('Admin_Messages',\n 'user',\n 'get',\n array('mid' => $mid));\n\n if ($item == false) {\n return pnVarPrepHTMLDisplay(_ADMINMESSAGESNOSUCHITEM);\n }\n\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing. However,\n // in this case we had to wait until we could obtain the item name to\n // complete the instance information so this is the first chance we get to\n // do the check\n if (!pnSecAuthAction(0, 'Admin_Messages::item', \"$item[title]::$mid\", ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n\t// Assign the item\n\t$pnRender->assign($item);\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('admin_messages_admin_modify.htm');\n}", "public function add_admin_notices() {\n // add_action( 'admin_notices', array( 'Hotmembers3\\Membership_Areas_Controller', 'perform_on_post') );\n }", "public function register_hooks() {\n\t\tadd_action( 'admin_init', [ $this, 'intercept_save_update_notification' ] );\n\t}", "public function updated_message() {\n\t\t$tab = Template::current_tab();\n\n\t\t// Show updated notice.\n\t\tadd_action( 'beehive_admin_top_notices', function () use ( $tab ) {\n\t\t\tswitch ( $tab ) {\n\t\t\t\tcase 'tracking':\n\t\t\t\t\t$this->notice( __( 'Tracking ID updated successfully.', 'ga_trans' ), 'success', true );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->notice( __( 'Changes were saved successfully.', 'ga_trans' ), 'success', true );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} );\n\t}", "function gp3_custom_post_types_messages($messages) {\n\tglobal $post, $post_ID;\n\t$messages['project'] = array(\n\t\t0 => '', // Unused. Messages start at index 1.\n\t\t1 => sprintf(__('Project updated. <a href=\"%s\">View project</a>', 'gp3ptt'), esc_url(get_permalink($post_ID))),\n\t\t2 => __('Custom field updated.', 'gp3ptt'),\n\t\t3 => __('Custom field deleted.', 'gp3ptt'),\n\t\t4 => __('Project updated.', 'gp3ptt'),\n\t\t/* translators: %s: date and time of the revision */\n\t\t5 => isset($_GET['revision']) ? sprintf(__('Project restored to revision from %s', 'gp3ptt'), wp_post_revision_title((int) $_GET['revision'], false)) : false,\n\t\t6 => sprintf(__('Project published. <a href=\"%s\">View project</a>', 'gp3ptt'), esc_url(get_permalink($post_ID))),\n\t\t7 => __('Project saved.', 'gp3ptt'),\n\t\t8 => sprintf(__('Project submitted. <a target=\"_blank\" href=\"%s\">Preview project</a>', 'gp3ptt'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))),\n\t\t9 => sprintf(__('Project scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview project</a>', 'gp3ptt'),\n\t\t\t// translators: Publish box date format, see http://php.net/date\n\t\t\tdate_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url(get_permalink($post_ID))),\n\t\t10 => sprintf(__('Project draft updated. <a target=\"_blank\" href=\"%s\">Preview project</a>', 'gp3ptt'), esc_url(add_query_arg( 'preview', 'true', get_permalink($post_ID)))),\n\t);\n\treturn $messages;\n}", "public function init() {\n\t\tif (is_admin()) {\n\t\t\tadd_action('admin_init', array($this, 'autoupdate'));\n\n\t\t\t$pages = array(\n\t\t\t\t'post',\n\t\t\t\t'post-new',\n\t\t\t);\n\t\t\tif (in_array(self::$page_base, $pages)) {\n\t\t\t\tadd_action('add_meta_boxes', array($this, 'add_meta_box'));\n\t\t\t\tadd_action('save_post', array($this, 'save_meta_data'));\n\t\t\t}\n\n\t\t\tif ('plugins' === self::$page_base)\n\t\t\t\tadd_action('in_plugin_update_message-'.basename(dirname(__FILE__)).'/'.basename(__FILE__), array($this, 'update_message'), 10, 2);\n\t\t} else {\n\t\t\tadd_action('wp_enqueue_scripts', array($this, 'enqueue_additional_css_file'));\n\t\t\tadd_action('wp_print_styles', array($this, 'print_additional_css'));\n\t\t}\n\t}", "protected function _applyPostInstallationMessages()\n\t{\n\t\t// Make sure it's Joomla! 3.2.0 or later\n\t\tif (!version_compare(JVERSION, '3.2.0', 'ge'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure there are post-installation messages\n\t\tif (empty($this->postInstallationMessages))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the extension ID for our component\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('extension_id')\n\t\t\t->from('#__extensions')\n\t\t\t->where($db->qn('type') . ' = ' . $db->q('component'))\n\t\t\t->where($db->qn('element') . ' = ' . $db->q($this->componentName));\n\t\t$db->setQuery($query);\n\n\t\ttry\n\t\t{\n\t\t\t$ids = $db->loadColumn();\n\t\t}\n\t\tcatch (Exception $exc)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (empty($ids))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$extension_id = array_shift($ids);\n\n\t\tforeach ($this->postInstallationMessages as $message)\n\t\t{\n\t\t\t$message['extension_id'] = $extension_id;\n\t\t\t$this->addPostInstallationMessage($message);\n\t\t}\n\t}", "public function intercept_save_update_notification() {\n\t\tglobal $pagenow;\n\n\t\tif ( $pagenow !== 'admin.php' || ! YoastSEO()->helpers->current_page->is_yoast_seo_page() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Variable name is the same as the global that is set by get_settings_errors.\n\t\t$wp_settings_errors = get_settings_errors();\n\n\t\tforeach ( $wp_settings_errors as $key => $wp_settings_error ) {\n\t\t\tif ( ! $this->is_settings_updated_notification( $wp_settings_error ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tself::$settings_saved = true;\n\t\t\tunset( $wp_settings_errors[ $key ] );\n\t\t\t// Overwrite the global with the list excluding the Changed saved message.\n\t\t\t$GLOBALS['wp_settings_errors'] = $wp_settings_errors;\n\t\t\tbreak;\n\t\t}\n\t}", "private function hooks() {\n\n\t\t\t/** Actions *******************************************************************/\n\n\t\t\t// Build the submenus.\n\t\t\tadd_action( 'admin_menu', array( $this, 'admin_menus' ), 10 );\n\n\t\t\t// Loading the talks edit screen\n\t\t\tadd_action( 'load-edit.php', array( $this, 'load_edit_talk' ) );\n\n\t\t\t// Make sure Editing a plugin's taxonomy highlights the plugin's nav\n\t\t\tadd_action( 'load-edit-tags.php', array( $this, 'taxonomy_highlight' ) );\n\n\t\t\t// Add metaboxes for the post type\n\t\t\tadd_action( \"add_meta_boxes_{$this->post_type}\", array( $this, 'add_metaboxes' ), 10, 1 );\n\t\t\t// Save metabox inputs\n\t\t\tadd_action( \"save_post_{$this->post_type}\", array( $this, 'save_metaboxes' ), 10, 3 );\n\n\t\t\t// Display upgrade notices\n\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices' ) );\n\n\t\t\t// Register the settings\n\t\t\tadd_action( 'admin_init', array( $this, 'register_admin_settings' ) );\n\n\t\t\tadd_action( 'load-settings_page_wc_talks', array( $this, 'settings_load' ) );\n\n\t\t\t// Talks columns (in post row)\n\t\t\tadd_action( \"manage_{$this->post_type}_posts_custom_column\", array( $this, 'column_data' ), 10, 2 );\n\n\t\t\t// Maybe neutralize quick edit\n\t\t\tadd_action( 'post_row_actions', array( $this, 'talk_row_actions' ), 10, 2 );\n\n\t\t\t// Do some global stuff here (custom css rule)\n\t\t\tadd_action( 'admin_head', array( $this, 'admin_head' ), 10 );\n\n\t\t\t/** Filters *******************************************************************/\n\n\t\t\t// Updated message\n\t\t\tadd_filter( 'post_updated_messages', array( $this, 'talks_updated_messages' ), 10, 1 );\n\t\t\tadd_filter( 'bulk_post_updated_messages', array( $this, 'talks_updated_bulk_messages' ), 10, 2 );\n\n\t\t\t// Redirect\n\t\t\tadd_filter( 'redirect_post_location', array( $this, 'redirect_talk_location' ), 10, 2 );\n\n\t\t\t// Filter the WP_List_Table views to include custom views.\n\t\t\tadd_filter( \"views_edit-{$this->post_type}\", array( $this, 'talk_views' ), 10, 1 );\n\n\t\t\t// temporarly remove bulk edit\n\t\t\tadd_filter( \"bulk_actions-edit-{$this->post_type}\", array( $this, 'talk_bulk_actions' ), 10, 1 );\n\n\t\t\t// Talks column headers.\n\t\t\tadd_filter( \"manage_{$this->post_type}_posts_columns\", array( $this, 'column_headers' ) );\n\n\t\t\t// Add a link to About & settings page in plugins list\n\t\t\tadd_filter( 'plugin_action_links', array( $this, 'modify_plugin_action_links' ), 10, 2 );\n\n\t\t\t/** Specific case: ratings ****************************************************/\n\n\t\t\t// Only sort by rates & display people who voted if ratings is not disabled.\n\t\t\tif ( ! wct_is_rating_disabled() ) {\n\t\t\t\tadd_action( \"manage_edit-{$this->post_type}_sortable_columns\", array( $this, 'sortable_columns' ), 10, 1 );\n\n\t\t\t\t// Manage votes\n\t\t\t\tadd_filter( 'wct_admin_get_meta_boxes', array( $this, 'ratings_metabox' ), 9, 1 );\n\t\t\t\tadd_action( 'load-post.php', array( $this, 'maybe_delete_rate' ) );\n\n\t\t\t\t// Custom feedback\n\t\t\t\tadd_filter( 'wct_admin_updated_messages', array( $this, 'ratings_updated' ), 10, 1 );\n\n\t\t\t\t// Help tabs\n\t\t\t\tadd_filter( 'wct_get_help_tabs', array( $this, 'rates_help_tabs' ), 11, 1 );\n\t\t\t}\n\t\t}" ]
[ "0.6877475", "0.6567271", "0.6310768", "0.624991", "0.6169963", "0.6168723", "0.5782762", "0.564999", "0.5647439", "0.5593254", "0.5571341", "0.55684596", "0.5518046", "0.54790485", "0.547759", "0.54534394", "0.54157263", "0.52883714", "0.5254608", "0.5242985", "0.52407515", "0.5182665", "0.51656026", "0.5145373", "0.51343066", "0.5101458", "0.50711834", "0.50434035", "0.50388557", "0.5022221" ]
0.6879671
0
Check if the user has overwritten the default templates and loads them is they have. If not, we default to the templates included in the plugin.
function load_templates( $template ) { if ( is_singular( 'units' ) ) { if ( $overridden_template = locate_template( 'single-units.php' ) ) { $template = $overridden_template; } else { $template = plugin_dir_path( __file__ ) . 'templates/single-units.php'; } } elseif ( is_archive( 'units' ) ) { if ( $overridden_template = locate_template( 'archive-units.php' ) ) { $template = $overridden_template; } else { $template = plugin_dir_path( __file__ ) . 'templates/archive-units.php'; } } load_template( $template ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defaultTemplate(){\n $this->addLocations(); // add addon files to pathfinder\n return array($this->template_file);\n }", "function load_plugin_templates() : void {\n\trequire_once plugin_dir_path( __FILE__ ) . '../templates/messages/subscriber-only-message.php';\n\trequire_once plugin_dir_path( __FILE__ ) . '../templates/messages/split-content-message.php';\n\trequire_once plugin_dir_path( __FILE__ ) . '../templates/messages/banner-message.php';\n}", "private function _load_template()\n\t\t{\n\t\t\t//check for a custom template\n\t\t\t$template_file = 'views/'.$this->template_file.'.tpl';\n\n\n\t\t\tif(file_exists($template_file) && is_readable($template_file))\n\t\t\t{\n\t\t\t\t$path = $template_file;\n\t\t\t}\n\t\t\telse if(file_exists($default_file = 'views/error/index.php') && is_readable($default_file))\n\t\t\t{\n\t\t\t\t$path = $default_file;\n\t\t\t}\n\n\t\t\t//If the default template is missing, throw an error\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exception(\"No default template found\");\n\t\t\t}\n\n\n\t\t\t//Load the contents of the file and return them\n\t\t\t$this->_template = file_get_contents($path);\n\n\t\t}", "public function loadTemplate()\n\t\t{\n\t\t}", "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 }", "public function loadTemplate()\n\t{\n\t\t$t_location = \\IPS\\Request::i()->t_location;\n\t\t$t_key = \\IPS\\Request::i()->t_key;\n\t\t\n\t\tif ( $t_location === 'block' and $t_key === '_default_' and isset( \\IPS\\Request::i()->block_key ) )\n\t\t{\n\t\t\t/* Find it from the normal template system */\n\t\t\tif ( isset( \\IPS\\Request::i()->block_app ) )\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Application::load( \\IPS\\Request::i()->block_app ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Plugin::load( \\IPS\\Request::i()->block_plugin ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\t\n\t\t\t$location = $plugin->getTemplateLocation();\n\t\t\t\n\t\t\t$templateBits = \\IPS\\Theme::master()->getRawTemplates( $location['app'], $location['location'], $location['group'], \\IPS\\Theme::RETURN_ALL );\n\t\t\t$templateBit = $templateBits[ $location['app'] ][ $location['location'] ][ $location['group'] ][ $location['name'] ];\n\t\t\t\n\t\t\tif ( ! isset( \\IPS\\Request::i()->noencode ) OR ! \\IPS\\Request::i()->noencode )\n\t\t\t{\n\t\t\t\t$templateBit['template_content'] = htmlentities( $templateBit['template_content'], ENT_DISALLOWED, 'UTF-8', TRUE );\n\t\t\t}\n\t\t\t\n\t\t\t$templateArray = array(\n\t\t\t\t'template_id' \t\t\t=> $templateBit['template_id'],\n\t\t\t\t'template_key' \t\t\t=> 'template_' . $templateBit['template_name'] . '.' . $templateBit['template_id'],\n\t\t\t\t'template_title'\t\t=> $templateBit['template_name'],\n\t\t\t\t'template_desc' \t\t=> null,\n\t\t\t\t'template_content' \t\t=> $templateBit['template_content'],\n\t\t\t\t'template_location' \t=> null,\n\t\t\t\t'template_group' \t\t=> null,\n\t\t\t\t'template_container' \t=> null,\n\t\t\t\t'template_rel_id' \t\t=> null,\n\t\t\t\t'template_user_created' => null,\n\t\t\t\t'template_user_edited' => null,\n\t\t\t\t'template_params' \t => $templateBit['template_data']\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ( \\is_numeric( $t_key ) )\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key, 'template_id' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key );\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $ex )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->json( array( 'error' => true ) );\n\t\t\t}\n\n\t\t\tif ( $template !== null )\n\t\t\t{\n\t\t\t\t$templateArray = array(\n\t 'template_id' \t\t\t=> $template->id,\n\t 'template_key' \t\t\t=> $template->key,\n\t 'template_title'\t\t=> $template->title,\n\t 'template_desc' \t\t=> $template->desc,\n\t 'template_content' \t\t=> ( isset( \\IPS\\Request::i()->noencode ) AND \\IPS\\Request::i()->noencode ) ? $template->content : htmlentities( $template->content, ENT_DISALLOWED, 'UTF-8', TRUE ),\n\t 'template_location' \t=> $template->location,\n\t 'template_group' \t\t=> $template->group,\n\t 'template_container' \t=> $template->container,\n\t 'template_rel_id' \t\t=> $template->rel_id,\n\t 'template_user_created' => $template->user_created,\n\t 'template_user_edited' => $template->user_edited,\n\t 'template_params' \t => $template->params\n\t );\n\t\t\t}\n\t\t}\n\n\t\tif ( \\IPS\\Request::i()->show == 'json' )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( $templateArray );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->sendOutput( \\IPS\\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \\IPS\\Theme::i()->getTemplate( 'templates', 'cms', 'admin' )->viewTemplate( $templateArray ) ), 200, 'text/html', \\IPS\\Output::i()->httpHeaders );\n\t\t}\n\t}", "function zr_template_load( $template ){ \n\tif( !is_user_logged_in() && zr_options('maintaince_enable') ){\n\t\t$template = ZRPATH . 'includes/maintaince/maintaince.php';\n\t}\n\treturn $template;\n}", "function youpztStore_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n if ( $args && is_array( $args ) ) {\n extract( $args );\n }\n\n $located = youpztStore_locate_template( $template_name, $template_path, $default_path );\n\n if ( ! file_exists( $located ) ) {\n //_doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '2.1' );\n return;\n }\n\n // Allow 3rd party plugin filter template file from their plugin.\n $located = apply_filters('youpztStore_get_template', $located, $template_name, $args, $template_path, $default_path );\n\n include( $located );\n\n}", "protected function setDefaultTemplate()\n {\n $defaultTemplate = $this->config->getKey('default_template');\n $this->setTemplate($defaultTemplate);\n }", "function stage_get_fallback_template($chosen_key, $default_key = null, $data = array())\n{\n // Does the file exist -> return\n $path = Settings::getFallbackTemplatePath($chosen_key, $default_key);\n return stage_render_template($path, $data);\n}", "function youpztStore_locate_template( $template_name, $template_path = '', $default_path = '' ) {\n if ( ! $template_path ) {\n $template_path =UPSTORE_TEMPLATE_DIR;\n }\n\n if ( ! $default_path ) {\n $default_path =UPSTORE_PLUGIN_DIR.'/templates/';\n }\n\n // Look within passed path within the theme - this is priority.\n $template = locate_template(\n array(\n trailingslashit( $template_path ) . $template_name,\n $template_name\n )\n );\n\n // Get default template/\n if ( ! $template) {\n $template = $default_path . $template_name;\n }\n\n // Return what we found.\n return $template;\n}", "function getDefault($url){\n \n\t \n\t \n\t $path = explode('/', $url);\n\t \t \n\t $temp = $path[$this -> getPos($url)];\n\t \n\t if($temp != ''){\n\t \n\t\t$file = DIR_TEMPLATE.'/'.$temp.'.php';\n\t\t\n\t if (is_readable($file)) {\n\n //include the alternative template\n\t\t $template = $file;\n\t\t\n\t\t}else{\n\t\t\n\t\t //include the default template\n\t\t $template = DIR_TEMPLATE.'/default.php';\n\t\t\n\t\t}\n }else{\n \n\t\t //include the default template\n\t\t $template = DIR_TEMPLATE.'/default.php';\n\n }\t \n \n return $template;\n \n }", "function emp_locate_template( $template_name, $load=false, $args = array() ) {\n\t//First we check if there are overriding tempates in the child or parent theme\n\t$located = locate_template(array('plugins/events-manager-pro/'.$template_name));\n\tif( !$located ){\n\t\t$dir_location = plugin_dir_path(__FILE__);\n\t\tif ( file_exists( $dir_location.'templates/'.$template_name) ) {\n\t\t\t$located = $dir_location.'templates/'.$template_name;\n\t\t}\n\t}\n\t$located = apply_filters('emp_locate_template', $located, $template_name, $load, $args);\n\tif( $located && $load ){\n\t\tif( is_array($args) ) extract($args);\n\t\tinclude($located);\n\t}\n\treturn $located;\n}", "function load_newsletter_template($template) {\n global $post;\n\n // Is this a futurninews post?\n if ($post->post_type == \"futurninews\"){\n\n $plugin_path = plugin_dir_path( __FILE__ );\n\n $template_name = 'single-newsletter.php';\n\n // checks if there is a single template in themefolder, or it doesn't exist in the plugin\n if($template === get_stylesheet_directory() . '/' . $template_name\n || !file_exists($plugin_path . $template_name)) {\n\n // returns \"single.php\" or \"single-my-custom-post-type.php\" from theme directory.\n return $template;\n }\n\n // If not, return futurninews custom post type template.\n return $plugin_path . $template_name;\n }\n\n //This is not futurninews, do nothing with $template\n return $template;\n}", "function LoadTemplate( $name )\n{\n if ( file_exists(\"$name.html\") ) return file_get_contents(\"$name.html\");\n if ( file_exists(\"templates/$name.html\") ) return file_get_contents(\"templates/$name.html\");\n if ( file_exists(\"../templates/$name.html\") ) return file_get_contents(\"../templates/$name.html\");\n}", "private function load_template()\r\n\t{\r\n\t\tif(! $this -> loaded)\r\n\t\t{\r\n\t\t\t$controller = $this -> sp -> targetdir().\"/\".sp_StaticProjector::templates_dir.\"/\".$this->name.\"_controller.php\";\r\n\t\t\tsp_StaticRegister::push_object(\"sp\", $this -> sp);\r\n\t\t\t\r\n\t\t\tif(!file_exists($controller))\r\n\t\t\t{\r\n $controller = $this -> sp -> coretemplatesdir().\"/\".$this->name.\"_controller.php\";\r\n if(! file_exists($controller)) {\r\n $controller = $this -> sp -> coretemplatesdir().\"/default_controller.php\";\r\n }\r\n\t\t\t\t/*if($this -> name == \"default\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$default_controller = $this -> sp -> defaultsdir().\"/default_controller.php\";\r\n\t\t\t\t\t@copy($default_controller, $controller);\r\n\t\t\t\t\tchmod($controller,sp_StaticProjector::file_create_rights);\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$base_code = file_get_contents($this -> sp -> defaultsdir().\"/new_controller.txt\");\r\n\t\t\t\t\t$controller_code = str_replace(\"%controller_name%\", $this->name.\"_controller\", $base_code);\r\n\t\t\t\t\tfile_put_contents($controller, $controller_code);\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\trequire_once($controller);\r\n\r\n\t\t\t$template = $this -> sp -> targetdir().\"/\".sp_StaticProjector::templates_dir.\"/\".$this->name.\"_template.php\";\r\n\t\t\tif(!file_exists($template))\r\n\t\t\t{\r\n $template = $this -> sp -> coretemplatesdir().\"/\".$this->name.\"_template.php\";\r\n if(! file_exists($template)) {\r\n $template = $this -> sp -> coretemplatesdir().\"/default_template.php\";\r\n }\r\n\t\t\t\t/*if($this -> name == \"default\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$default_template = $this -> sp -> defaultsdir().\"/default_template.php\";\r\n\t\t\t\t\t@copy($default_template, $template);\r\n\t\t\t\t\tchmod($template,sp_StaticProjector::file_create_rights);\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$chunks_code = \"\";\r\n\t\t\t\t\t$chunk_base = file_get_contents($this -> sp -> defaultsdir().\"/new_template_chunk.txt\");\r\n\t\t\t\t\tforeach($this -> sp -> get_config() -> default_templates_chunks() as $chunk)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$chunks_code .= str_replace(\"%chunk_name%\",$chunk,$chunk_base);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$template_base = file_get_contents($this -> sp -> defaultsdir().\"/new_template.txt\");\r\n\t\t\t\t\t$template_code = str_replace(\"%template_name%\", $this -> name.\"_template\", $template_base);\r\n\t\t\t\t\t$template_code = str_replace(\"%template_chunks%\", $chunks_code, $template_code);\r\n\t\t\t\t\tfile_put_contents($template, $template_code);\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\trequire_once($template);\r\n\t\t\tsp_StaticRegister::pop_object(\"sp\");\r\n\t\t\t\r\n\t\t\t$this -> loaded = true;\r\n\t\t}\r\n\t}", "function astra_addon_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {\n\n\t\t$located = astra_addon_locate_template( $template_name, $template_path, $default_path );\n\n\t\tif ( ! file_exists( $located ) ) {\n\t\t\t/* translators: 1: file location */\n\t\t\t_doing_it_wrong( __FUNCTION__, esc_html( sprintf( __( '%s does not exist.', 'astra-addon' ), '<code>' . $located . '</code>' ) ), '1.0.0' );\n\t\t\treturn;\n\t\t}\n\n\t\t// Allow 3rd party plugin filter template file from their plugin.\n\t\t$located = apply_filters( 'astra_addon_get_template', $located, $template_name, $args, $template_path, $default_path );\n\n\t\tdo_action( 'astra_addon_before_template_part', $template_name, $template_path, $located, $args );\n\n\t\tinclude $located;\n\n\t\tdo_action( 'astra_addon_after_template_part', $template_name, $template_path, $located, $args );\n\t}", "function sat_load_templates( $original_template ) \n{\n /*\n get_query_var( $var, $default )\n \n Retrieves public query variable in the WP_Query class of the global $wp_query object.\n\n $var (string) (required) The variable key to retrieve. Default: None\n \n $default (mixed) (optional) Value to return if the query variable is not set. \n Default: empty string\n\n returns $default if var is not set\n */\n //when a page loads, if it is not equal to 'task', return nothing and exits function immediatly.\n if ( get_query_var( 'post_type' ) !== 'task' ) \n {\n return;\n }\n\n /*\n is_search();\n\n This Conditional Tag checks if search result page archive is being displayed. This is a boolean function, meaning it returns either TRUE or FALSE.\n\n is_archive();\n\n This Conditional Tag checks if any type of Archive page is being displayed. An Archive is a Category, Tag, Author, Date, Custom Post Type or Custom Taxonomy based pages. This is a boolean function, meaning it returns either TRUE or FALSE\n\n is_archive() does not accept any parameters. If you want to check if this is the archive of a custom post type, use is_post_type_archive( $post_type )\n */\n //using Conditional Tags to trigger code if page is an archive or search page\n if ( is_archive() || is_search() ) \n {\n //If the user adds custom-archive page for 'task'-custom post-type to their site's current theme by adding archive-task.php to the root file of the theme, use it!\n if ( file_exists( get_stylesheet_directory(). '/archive-task.php' ) ) \n {\n return get_stylesheet_directory() . '/archive-task.php';\n }\n\n //If not use the archive-task.php file located within this plugin's file directory\n else \n {\n return plugin_dir_path( __FILE__ ) . 'templates/archive-task.php';\n }\n\n } \n\n /*\n is_singular( $post_types );\n\n This conditional tag checks if a singular post is being displayed, which is the case when one of the following returns true: is_single(), is_page() or is_attachment(). If the $post_types parameter is specified, the function will additionally check if the query is for one of the post types specified.\n\n $post_types (string/array) (optional) Post type or types to check in current query. Default: None\n */\n\n //using Conditional Tags to trigger code if page is a single post\n elseif(is_singular('task')) \n {\n //If the user adds custom-single post for 'task'-custom post-type to their site's current theme by adding archive-task.php to the root file of the theme, use it!\n if ( file_exists( get_stylesheet_directory(). '/single-task.php' ) ) \n {\n return get_stylesheet_directory() . '/single-task.php';\n } \n\n //If not use the single-task.php file located within this plugin's file directory\n else \n {\n return plugin_dir_path( __FILE__ ) . 'templates/single-task.php';\n }\n }\n\n else\n {\n \t\treturn get_page_template();\n }\n\n return $original_template;\n}", "function youpzt_store_load_template($template_path){\n if (is_page('shop')) {\n return $template_path = UPSTORE_PLUGIN_DIR.'/templates/shop.php';\n }elseif (is_page('youpzt-store')) {\n return $template_path = UPSTORE_PLUGIN_DIR.'/templates/youpzt-store.php';\n }elseif (is_single()&&get_post_type()=='product') {\n return $template_path = UPSTORE_PLUGIN_DIR.'/templates/single-product.php';\n }else{\n return $template_path; \n }\n}", "function init() {\n require config('template_path') . '/template.php';\n}", "public function populateDefaultTemplateSets()\n {\n $root_dir = Core::getRootDir();\n\n $data_folder = \"$root_dir/modules/form_builder/default_template_sets\";\n $dh = opendir($data_folder);\n\n if (!$dh) {\n return array(false, \"You appear to be missing the default_template_sets folder, or your \\$g_root_dir settings is invalid.\");\n }\n\n $template_set_files = array();\n while (($file = readdir($dh)) !== false) {\n $parts = pathinfo($file);\n if ($parts[\"extension\"] !== \"json\") {\n continue;\n }\n\n $template_set = json_decode(file_get_contents(\"$data_folder/$file\"));\n $schema = json_decode(file_get_contents(\"$root_dir/modules/form_builder/schemas/template_set-1.0.0.json\"));\n $response = Schemas::validateSchema($template_set, $schema);\n\n if ($response[\"is_valid\"]) {\n $template_set_files[$file] = $template_set;\n } else {\n // TODO\n }\n }\n\n // now install the template sets. Ensure the \"default-*.json\" one is set first\n TemplateSets::importTemplateSetData($template_set_files[$this->defaultTemplateSet]);\n\n foreach ($template_set_files as $filename => $template_set) {\n if ($filename === $this->defaultTemplateSet) {\n continue;\n }\n TemplateSets::importTemplateSetData($template_set);\n }\n }", "function init()\n{\n require config('template_path') . '/template.php';\n}", "public function Load() : void\n {\n do_action('template_redirect');\n\n $this->Template === self::VIRTUAL_PAGE_TEMPLATE ? $Template = self::VIRTUAL_PAGE_TEMPLATE : $Template = locate_template(array_filter($this->Templates));\n $filtered = apply_filters('template_include', apply_filters('WP_Plugin_virtual_page_template', $Template));\n if(empty($filtered) || file_exists($filtered))\n {\n $Template = $filtered;\n }\n if(!empty($Template) && file_exists($Template)) \n {\n add_action('wp_enqueue_scripts',function (){$this->Define_Resources();});\n require_once $Template;\n }\n }", "protected function installDefaultPageTemplates($bundle)\n {\n // Configuration templates\n $dirPath = $this->container->getParameter('kernel.project_dir') . '/config/kunstmaancms/pagetemplates/';\n $skeletonDir = sprintf('%s/Resources/config/pagetemplates/', GeneratorUtils::getFullSkeletonPath('/common'));\n\n // Only copy templates over when the folder does not exist yet...\n if (!$this->filesystem->exists($dirPath)) {\n $files = [\n 'default-one-column.yml',\n 'default-two-column-left.yml',\n 'default-two-column-right.yml',\n 'default-three-column.yml',\n ];\n foreach ($files as $file) {\n $this->filesystem->copy($skeletonDir . $file, $dirPath . $file, false);\n GeneratorUtils::replace('~~~BUNDLE~~~', $bundle->getName(), $dirPath . $file);\n }\n }\n\n // Twig templates\n $dirPath = $this->getTemplateDir($bundle) . '/Pages/Common/';\n\n $skeletonDir = sprintf('%s/Resources/views/Pages/Common/', GeneratorUtils::getFullSkeletonPath('/common'));\n\n if (!$this->filesystem->exists($dirPath)) {\n $files = [\n 'one-column-pagetemplate.html.twig',\n 'two-column-left-pagetemplate.html.twig',\n 'two-column-right-pagetemplate.html.twig',\n 'three-column-pagetemplate.html.twig',\n ];\n foreach ($files as $file) {\n $this->filesystem->copy($skeletonDir . $file, $dirPath . $file, false);\n }\n $this->filesystem->copy($skeletonDir . 'view.html.twig', $dirPath . 'view.html.twig', false);\n }\n\n $contents = file_get_contents($dirPath . 'view.html.twig');\n\n $twigFile = \"{% extends 'Layout/layout.html.twig' %}\\n\";\n\n if (strpos($contents, '{% extends ') === false) {\n GeneratorUtils::prepend(\n $twigFile,\n $dirPath . 'view.html.twig'\n );\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 }", "function emscvupload_locate_template( $template_names, $load = false, $require_once = true, $atts=array() ) {\n\tglobal $emscvupload_template_folder;\n\n\t// No file found yet\n\t$located = false;\n\n\t// Try to find a template file\n\tforeach ( (array) $template_names as $template_name ) {\n\n\t\t// Continue if template is empty\n\t\tif ( empty( $template_name ) )\n\t\t\tcontinue;\n\n\t\t// Trim off any slashes from the template name\n\t\t$template_name = ltrim( $template_name, '/' );\n\n\t\t// Check child theme first\n\t\tif ( file_exists( trailingslashit( get_stylesheet_directory() ) . $emscvupload_template_folder . $template_name ) ) {\n\t\t\t$located = trailingslashit( get_stylesheet_directory() ) . $emscvupload_template_folder . $template_name;\n\t\t\tbreak;\n\n\t\t// Check parent theme next\n\t\t} elseif ( file_exists( trailingslashit( get_template_directory() ) . $emscvupload_template_folder . $template_name ) ) {\n\t\t\t$located = trailingslashit( get_template_directory() ) . $emscvupload_template_folder . $template_name;\n\t\t\tbreak;\n\n\t\t// Check theme compatibility last\n\t\t} elseif ( file_exists( trailingslashit( emscvupload_get_templates_dir() ) . $template_name ) ) {\n\t\t\t$located = trailingslashit( emscvupload_get_templates_dir() ) . $template_name;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( ( true == $load ) && ! empty( $located ) )\n\t\temscvupload_load_template( $located, $require_once, $atts );\n\n\treturn $located;\n}", "function reloadDefaultEmailTemplates($args, &$request) {\n\t\t$this->validate();\n\n\t\t$site =& $request->getSite();\n\t\t$locale = $request->getUserVar('locale');\n\n\t\tif (in_array($locale, $site->getInstalledLocales())) {\n\t\t\t$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');\n\t\t\t$emailTemplateDao->deleteDefaultEmailTemplatesByLocale($locale);\n\t\t\t$emailTemplateDao->installEmailTemplateData($emailTemplateDao->getMainEmailTemplateDataFilename($locale));\n\n\t\t\t$user =& $request->getUser();\n\n\t\t\timport('classes.notification.NotificationManager');\n\t\t\t$notificationManager = new NotificationManager();\n\t\t\t$notificationManager->createTrivialNotification($user->getId());\n\t\t}\n\n\t\t$request->redirect(null, null, 'languages');\n\t}", "public function loadTemplate() {\n if ( current_filter() !== 'template_redirect' ) {\n return FALSE;\n }\n if ( $this->preLoad() ) {\n return $this->loadFile( $this->getTemplate(), TRUE );\n }\n\n return FALSE;\n }", "function cmdeals_get_template($template_name, $require_once = true) {\n\tglobal $cmdeals;\n\tif (file_exists( STYLESHEETPATH . '/' . WPDEALS_TEMPLATE_URL . $template_name )) load_template( STYLESHEETPATH . '/' . WPDEALS_TEMPLATE_URL . $template_name, $require_once ); \n\telseif (file_exists( STYLESHEETPATH . '/' . $template_name )) load_template( STYLESHEETPATH . '/' . $template_name , $require_once); \n\telse load_template( $cmdeals->plugin_path() . '/cmdeals-templates/' . $template_name , $require_once);\n}", "public function get_default_template() {\n\t\t\t$file = file_get_contents( dirname( __FILE__ ).'/assets/template.html' );\n\t\t\treturn $file;\n\t\t}" ]
[ "0.68796265", "0.6864075", "0.6720494", "0.6702375", "0.66320956", "0.6627882", "0.66188306", "0.6613141", "0.6591195", "0.65862477", "0.6579832", "0.6513114", "0.64753884", "0.6458532", "0.6446248", "0.6442429", "0.64404786", "0.6395148", "0.6390259", "0.63387877", "0.6325982", "0.6322979", "0.6312554", "0.6299881", "0.62841344", "0.6266126", "0.6254094", "0.6251126", "0.6244974", "0.6243327" ]
0.7047659
0
Properly enqueues Javascript files into WP. 1) jquery 2) Bootstrap 3) Google Maps API 4) Bootstrap Validator
function load_scripts() { global $redux_options; wp_enqueue_script("jquery"); $bs = $redux_options['opt-bootstrap']; if ( $bs == 1 ) { //Load from CDN// wp_enqueue_script( 'bootstrap-script', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true ); } elseif ( $bs == 2 ) { //Load from plugin// wp_enqueue_script( 'bootstrap-script', dirname( __FILE__ ).'/assets/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true ); } elseif ( $bs == 3 ) { //load from nowhere... They have it loaded elsewhere... lets check to be sure though } else { //load from plugin. (fallback)// wp_enqueue_script( 'bootstrap-script', dirname( __FILE__ ).'/assets/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true ); } wp_enqueue_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false', array(), '3', false ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function wp_enqueue_scripts() {\n global $slplus_plugin;\n \n if (isset($slplus_plugin) && $slplus_plugin->ok_to_show()) { \n $api_key=$slplus_plugin->driver_args['api_key'];\n $google_map_domain=(get_option('sl_google_map_domain')!=\"\")? \n get_option('sl_google_map_domain') : \n \"maps.google.com\"; \n $sl_map_character_encoding='&oe='.get_option('sl_map_character_encoding','utf8'); \n \n //------------------------\n // Register our scripts for later enqueue when needed\n //\n //wp_register_script('slplus_functions',SLPLUS_PLUGINURL.'/core/js/functions.js');\n\t\t\t\tif (isset($api_key))\n\t\t\t\t{\n\t\t\t\t\twp_register_script(\n\t\t\t\t\t\t\t'google_maps',\n\t\t\t\t\t\t\t\"http://$google_map_domain/maps/api/js?v=3.9&amp;key=$api_key&amp;sensor=false\" //todo:character encoding ???\n\t\t\t\t\t\t\t//\"http://$google_map_domain/maps?file=api&amp;v=2&amp;key=$api_key&amp;sensor=false{$sl_map_character_encoding}\" \n\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\twp_register_script(\n\t\t\t\t\t\t'google_maps',\n\t\t\t\t\t\t\"http://$google_map_domain/maps/api/js?v=3.9&amp;sensor=false\"\n\t\t\t\t\t);\n\t\t\t\t}\n //wp_register_script(\n // 'slplus_map',\n // SLPLUS_PLUGINURL.'/core/js/store-locator-map.js',\n // array('google_maps','jquery')\n // ); \n\t\t\t\t\t\t\n\t\t\t\twp_register_script('csl_script', SLPLUS_PLUGINURL.'/core/js/csl.js', array('jquery'));\n \n // Setup Email Form Script If Selected\n // \n //if (get_option(SLPLUS_PREFIX.'_email_form')==1) {\n // wp_register_script(\n // 'slplus_emailform',\n // SLPLUS_PLUGINURL.'/core/js/store-locator-emailform.js',\n // array('google_maps','slplus_map')\n // ); \n //} \n } \n }", "static function wp_enqueue_scripts() {\n global $slplus_plugin; \n $api_key= (isset($slplus_plugin) && $slplus_plugin->ok_to_show()) ?\n $slplus_plugin->driver_args['api_key'] :\n ''\n ;\n $force_load = (\n isset($slplus_plugin) ?\n $slplus_plugin->settings->get_item('force_load_js',true) :\n false\n );\n\n $sl_google_map_domain=(get_option('sl_google_map_domain','')!=\"\")?\n get_option('sl_google_map_domain') : \n \"maps.google.com\"; \n $sl_map_character_encoding='&oe='.get_option('sl_map_character_encoding','utf8'); \n\n //------------------------\n // Register our scripts for later enqueue when needed\n //\n //wp_register_script('slplus_functions',SLPLUS_PLUGINURL.'/core/js/functions.js');\n if (isset($api_key))\n {\n wp_enqueue_script(\n 'google_maps',\n \"http://$sl_google_map_domain/maps/api/js?v=3.9&amp;key=$api_key&amp;sensor=false\" //todo:character encoding ???\n //\"http://$sl_google_map_domain/maps?file=api&amp;v=2&amp;key=$api_key&amp;sensor=false{$sl_map_character_encoding}\"\n );\n }\n else {\n wp_enqueue_script(\n 'google_maps',\n \"http://$sl_google_map_domain/maps/api/js?v=3.9&amp;sensor=false\"\n );\n }\n\n wp_enqueue_script(\n 'csl_script',\n SLPLUS_PLUGINURL.'/core/js/csl.js',\n array('jquery'),\n false,\n !$force_load\n );\n\n //--------------------\n // Localize The Script\n //--------------------\n // Prepare some data for JavaScript injection...\n //\n $slplus_home_icon = get_option('sl_map_home_icon');\n $slplus_end_icon = get_option('sl_map_end_icon');\n $slplus_home_icon_file = str_replace(SLPLUS_ICONURL,SLPLUS_ICONDIR,$slplus_home_icon);\n $slplus_end_icon_file = str_replace(SLPLUS_ICONURL,SLPLUS_ICONDIR,$slplus_end_icon);\n $slplus_home_size=(function_exists('getimagesize') && file_exists($slplus_home_icon_file))?\n getimagesize($slplus_home_icon_file) :\n array(0 => 20, 1 => 34);\n $slplus_end_size =(function_exists('getimagesize') && file_exists($slplus_end_icon_file)) ?\n getimagesize($slplus_end_icon_file) :\n array(0 => 20, 1 => 34);\n // Lets get some variables into our script\n //\n $scriptData = array(\n 'debug_mode' => (get_option(SLPLUS_PREFIX.'-debugging') == 'on'),\n 'disable_scroll' => (get_option(SLPLUS_PREFIX.'_disable_scrollwheel')==1),\n 'disable_dir' => (get_option(SLPLUS_PREFIX.'_disable_initialdirectory' )==1),\n 'distance_unit' => esc_attr(get_option('sl_distance_unit'),'miles'),\n 'load_locations' => (get_option('sl_load_locations_default')==1),\n 'map_3dcontrol' => (get_option(SLPLUS_PREFIX.'_disable_largemapcontrol3d')==0),\n 'map_country' => SetMapCenter(),\n 'map_domain' => get_option('sl_google_map_domain','maps.google.com'),\n 'map_home_icon' => $slplus_home_icon,\n 'map_home_sizew' => $slplus_home_size[0],\n 'map_home_sizeh' => $slplus_home_size[1],\n 'map_end_icon' => $slplus_end_icon,\n 'map_end_sizew' => $slplus_end_size[0],\n 'map_end_sizeh' => $slplus_end_size[1],\n 'use_sensor' => (get_option(SLPLUS_PREFIX.\"_use_location_sensor\")==1),\n 'map_scalectrl' => (get_option(SLPLUS_PREFIX.'_disable_scalecontrol')==0),\n 'map_type' => get_option('sl_map_type','roadmap'),\n 'map_typectrl' => (get_option(SLPLUS_PREFIX.'_disable_maptypecontrol')==0),\n 'show_tags' => (get_option(SLPLUS_PREFIX.'_show_tags')==1),\n 'overview_ctrl' => get_option('sl_map_overview_control',0),\n 'use_email_form' => (get_option(SLPLUS_PREFIX.'_email_form')==1),\n 'use_pages_links' => ($slplus_plugin->settings->get_item('use_pages_links')=='on'),\n 'use_same_window' => ($slplus_plugin->settings->get_item('use_same_window')=='on'),\n 'website_label' => esc_attr(get_option('sl_website_label','Website')),\n 'zoom_level' => get_option('sl_zoom_level',4),\n 'zoom_tweak' => get_option('sl_zoom_tweak',1),\n );\n wp_localize_script('csl_script','slplus',$scriptData);\n wp_localize_script('csl_script','csl_ajax',array('ajaxurl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('em')));\n }", "function aitAdminEnqueueScriptsAndStyles()\n{\n\t$mapLanguage = get_locale();\n\taitAddScripts(array(\n\t\t'ait-googlemaps-api' => array(\n\t\t\t\t\t\t\t\t\t //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'deps' => array('jquery')\n\t\t\t\t\t\t\t\t\t ),\n\t\t'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),\n\t));\n}", "function loadup_scripts() {\n $key = get_option('google_api_key');\n wp_enqueue_script( 'mapStyle-js', get_template_directory_uri().'/js/map-styles.js', array('jquery'), '1.0.0', true );\n if(is_front_page() || is_page_template('templates/template-property.php')){\n wp_enqueue_script( 'google-map-api', 'https://maps.googleapis.com/maps/api/js?key='.$key, array('jquery'), '1.0.0', true );\n //wp_enqueue_script( 'mapfull-js', get_template_directory_uri().'/js/home-map.js', array('jquery'), '1.0.0', true );\n \n }\n\n if(is_front_page()){\n wp_enqueue_script( 'mapfull-js', get_template_directory_uri().'/js/home-map.js', array('jquery'), '1.0.0', true );\n }\n\n if(is_page_template('templates/template-property.php')){\n wp_enqueue_script( 'singlemap-js', get_template_directory_uri().'/js/single-map.js', array('jquery'), '1.0.0', true );\n }\n //wp_enqueue_script( 'vue-js', '//cdnjs.cloudflare.com/ajax/libs/vue/2.4.4/vue.js', array('jquery'), '1.0.0', true );\n //wp_enqueue_script( 'smoothstate-js', '//cdnjs.cloudflare.com/ajax/libs/smoothState.js/0.7.2/jquery.smoothState.min.js', array('jquery'), '1.0.0', true );\n wp_enqueue_script( 'slick-js', get_template_directory_uri().'/js/slick.min.js', array('jquery'), '1.0.0', true );\n\twp_enqueue_script( 'theme-js', get_template_directory_uri().'/js/mesh.js', array('jquery'), '1.0.0', true );\n\n wp_enqueue_style( 'slick-css', get_template_directory_uri().'/css/slick.css', '1.0.0', true );\n wp_enqueue_style( 'slick-theme-css', get_template_directory_uri().'/css/slick-theme.css', '1.0.0', true ); \n}", "function scriptsCerrado() {\n\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '1.0');\n wp_enqueue_style('cerrado-less', get_template_directory_uri() . '/css/cerrado.css', array(), '1.0');\n wp_enqueue_style('bootstrap-responsive', get_template_directory_uri() . '/css/responsive.css', array(), '1.0');\n\n\n wp_deregister_script('jquery');\n wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', array(), null, true);\n wp_register_script('jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js', array('jquery'), null, true);\n wp_register_script('google-jsapi', 'https://www.google.com/jsapi?key=AIzaSyDPBKirC56WlHkkHZyLMe10U8HT8TleA38', array(), null);\n wp_register_script('google-maps', '//maps.googleapis.com/maps/api/js?sensor=true&language=es&region=ES', array(), null, true);\n wp_register_script('google-maps-clusterer', get_template_directory_uri() . '/js/marker-clusterer-plus/markerclusterer_packed.js', array('google-maps'), '2.0.15', true);\n\n wp_enqueue_script('google-jsapi');\n wp_enqueue_script('google-maps');\n\n wp_enqueue_script('jquery');\n\n wp_enqueue_script('jquery-ui');\n\n wp_enqueue_script('google-maps-clusterer');\n\n wp_enqueue_script('hogan');\n\n wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), '2.3.0', true);\n wp_enqueue_script('cerrado', get_template_directory_uri() . '/js/cerrado.js', array('jquery'), '1.24', true);\n\n //array para variables javascript\n $cprVars = array('is_single' => is_single() && get_post_type(), 'is_archive'=>is_archive(), 'siteUrl'=> site_url('/'));\n wp_localize_script('cerrado', 'cprVars', $cprVars);\n}", "function register_js_script() {\n wp_enqueue_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js'); \n \n wp_register_script('bootstrap-js', plugins_url(PLUGIN_FOLDER.'/assets/vendor/bootstrap-3.3.7-dist/js/bootstrap.min.js'));\n\n wp_register_script('jquery2-js', plugins_url(PLUGIN_FOLDER.'/assets/js/jquery2.js')); \n wp_register_script('prism-js', plugins_url(PLUGIN_FOLDER.'/assets/js/prism.js')); \n wp_register_script('underscore-js', plugins_url(PLUGIN_FOLDER.'/assets/js/underscore.js')); \n wp_register_script('moment-js', plugins_url(PLUGIN_FOLDER.'/assets/js/moment.js')); \n wp_register_script('clndr-js', plugins_url(PLUGIN_FOLDER.'/assets/js/clndr.js')); \n wp_register_script('site-js', plugins_url(PLUGIN_FOLDER.'/assets/js/site.js')); \n wp_register_script('main-js', plugins_url(PLUGIN_FOLDER.'/assets/js/main.js')); \n \n\n wp_enqueue_script('jquery-ui-autocomplete', '');\n wp_enqueue_script('main-js');\n wp_enqueue_script('bootstrap-js');\n wp_enqueue_script('jquery2-js');\n wp_enqueue_script('prism-js'); \n wp_enqueue_script('underscore-js'); \n wp_enqueue_script('moment-js'); \n wp_enqueue_script('clndr-js'); \n wp_enqueue_script('site-js'); \n \n}", "function cinerama_edge_admin_scripts_init() {\n\t\t\n\t\t//This part is required for field type address\n\t\t$enable_google_map_in_admin = apply_filters('cinerama_edge_filter_google_maps_in_backend', false);\n\t\tif($enable_google_map_in_admin) {\n\t\t\t//include google map api script\n\t\t\t$google_maps_api_key = cinerama_edge_options()->getOptionValue( 'google_maps_api_key' );\n\t\t\t$google_maps_extensions = '';\n\t\t\t$google_maps_extensions_array = apply_filters( 'cinerama_edge_filter_google_maps_extensions_array', array() );\n\t\t\tif ( ! empty( $google_maps_extensions_array ) ) {\n\t\t\t\t$google_maps_extensions .= '&libraries=';\n\t\t\t\t$google_maps_extensions .= implode( ',', $google_maps_extensions_array );\n\t\t\t}\n\t\t\tif ( ! empty( $google_maps_api_key ) ) {\n wp_enqueue_script( 'edgtf-admin-maps', '//maps.googleapis.com/maps/api/js?key=' . esc_attr( $google_maps_api_key ) . $google_maps_extensions, array(), false, true );\n wp_enqueue_script( 'geocomplete', get_template_directory_uri() . '/framework/admin/assets/js/jquery.geocomplete.min.js', array('edgtf-admin-maps'), false, true );\n\t\t\t}\n\t\t}\n\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/framework/admin/assets/js/bootstrap.min.js', array(), false, true );\n\t\twp_enqueue_script( 'bootstrap-select', get_template_directory_uri() . '/framework/admin/assets/js/bootstrap-select.min.js', array(), false, true );\n\t\twp_enqueue_script( 'select2', get_template_directory_uri() . '/framework/admin/assets/js/select2.min.js', array(), false, true );\n\t\twp_enqueue_script( 'edgtf-ui-admin', get_template_directory_uri() . '/framework/admin/assets/js/edgtf-ui/edgtf-ui.js', array(), false, true );\n\n\n\t\twp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/framework/admin/assets/css/font-awesome/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'select2', get_template_directory_uri() . '/framework/admin/assets/css/select2.min.css' );\n\n\t\t/**\n\t\t * @see CineramaEdgeClassSkinAbstract::registerScripts - hooked with 10\n\t\t * @see CineramaEdgeClassSkinAbstract::registerStyles - hooked with 10\n\t\t */\n\t\tdo_action( 'cinerama_edge_action_admin_scripts_init' );\n\t}", "function onetyone_scripts() {\n wp_enqueue_script('wpestate_ajaxcalls', '/wp-content/themes/onetyone'.'/js/ajaxcalls.js',array('jquery'), '1.0', true);\n wp_enqueue_script('wpestate_property', '/wp-content/themes/onetyone'.'/js/property.js',array('jquery'), '1.0', true);\n if(is_page(2081) || is_page(254))\n {\n // wp_enqueue_script( 'map-script', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBN2tzJmAQ_r3QTeWKT23Mw3rB-v5Y5zBU', array(), null, true );\n wp_enqueue_script( 'map-js-script', '/wp-content/themes/onetyone' . '/js/map.js', array(), null, true );\n }\n}", "function ale_map_load_scripts() {\n wp_register_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false' );\n }", "function upcode_loadJS(){\n if (!is_admin()){\n\t\t// desregistrando o jquery nativo e registrando o do CDN do Google.\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', '//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js', false, '3.2.1');\n\t\twp_enqueue_script('jquery');\n\n\t\t$js = get_template_directory_uri() . '/assets/js/';\n\t\twp_enqueue_script('propper',\t\t\t\t'//cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js', ['jquery']);\n\t\twp_enqueue_script('bootstrap-min',\t'//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js', ['jquery','propper']);\n\t\twp_enqueue_script('fancybox',\t\t\t\t'//cdn.rawgit.com/fancyapps/fancybox/master/dist/jquery.fancybox.min.js', ['jquery']);\n\t\twp_enqueue_script('slick',\t\t\t\t\t'//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.7.1/slick.min.js', ['jquery']);\n\t\twp_enqueue_script('fontawesome',\t\t'//use.fontawesome.com/releases/v5.0.8/js/all.js', ['jquery']);\n\t\twp_enqueue_script('v4-shims',\t\t\t\t'//use.fontawesome.com/releases/v5.0.8/js/v4-shims.js', ['jquery']);\n\n\t\twp_enqueue_script('offcanvas',\t\t$js . 'bootstrap.offcanvas.min.js', ['jquery']);\n\t\twp_enqueue_script('acf-maps', \t\t$js . 'maps.js', ['jquery']);\n\t\twp_enqueue_script('mask', \t\t\t\t$js . 'jquery.mask.min.js', ['jquery']);\n\t\twp_enqueue_script('codigo', \t\t\t$js . 'codigo.js', ['jquery']);\n }\n}", "public function enqueue()\n {\n wp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?key=' . $this->apiKey, array(), '3', true);\n wp_enqueue_script('google-map-init');\n }", "function flexiauto_scripts_loader() {\n\t\t/* Load custom styles */\n\t\twp_enqueue_style('reset', TPL_DIR . '/assets/css/vendor/reset.css');\n\t\twp_enqueue_style('bootstrap-styles', TPL_DIR . '/assets/css/vendor/bootstrap.min.css');\n\t\twp_enqueue_style('flexi-styles', TPL_DIR . '/assets/css/flexi.min.css');\n\n\t\t/* Load custom scripts */\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', TPL_DIR . '/assets/js/vendor/jquery.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_enqueue_script('bootstrap-scripts', TPL_DIR . '/assets/js/vendor/bootstrap.min.js', array(), false, true);\n\t\twp_enqueue_script('nicescroll', TPL_DIR . '/assets/js/vendor/jquery.nicescroll.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery-validate', TPL_DIR . '/assets/js/vendor/jquery.validate.min.js', array(), false, true);\n\t\twp_enqueue_script('match-height', TPL_DIR . '/assets/js/vendor/jquery.matchHeight.min.js', array(), false, true);\n\t\twp_enqueue_script('flexi-scripts', TPL_DIR . '/assets/js/flexi.min.js', array(), false, true);\n\n\t}", "public static function enqueues() {\n\t\twp_enqueue_script( 'wc-country-select' ) ;\n\t\twp_enqueue_script( 'wc-address-i18n' ) ;\n\t}", "function wpg_enqueue() {\n\n //css\n wp_enqueue_style( 'wpg-style', get_stylesheet_uri() );\n wp_enqueue_style( 'ie8', get_stylesheet_directory_uri() . \"/css/ie8.css\");\n wp_style_add_data( 'ie8', 'conditional', 'lt IE 9' );\n\n //deregister\n wp_deregister_script( 'jquery' );\n\n //register\n wp_register_script( 'mapa-api', add_query_arg( 'key', get_theme_mod('wpg_map_apikey', ''), 'https://maps.googleapis.com/maps/api/js?'));\n wp_register_script('google-map', get_template_directory_uri() . '/js/mapa.min.js','', '1.0.1', true);\n\n //enqueue\n wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\n // lt IE 9\n wp_enqueue_script( 'html5', get_template_directory_uri() . '/js/assets/html5shiv.min.js', array('jquery'), '20120206', false );\n wp_script_add_data( 'html5', 'conditional', 'lt IE 9' );\n\n wp_enqueue_script( 'imgGallery', get_template_directory_uri() . '/js/assets/imgGallery.min.js', array('jquery'), '1.0.1', true );\n wp_enqueue_script( 'slick', get_template_directory_uri() . '/js/assets/slick.min.js', array('jquery'), '1.0.1', true );\n\n wp_enqueue_script( 'wpg-main-js', get_template_directory_uri() . '/js/main.min.js', array('jquery'), '1.0.1', true );\n\n wp_localize_script( 'wpg-main-js', 'datalanuge', array(\n 'next' => __('Previous Image (left arrow key)', 'wpg_theme'),\n 'prev' => __('Next Image (right arrow key)', 'wpg_theme'),\n 'of'=> __('of','wpg_theme'),\n 'close' => __('Close (Escape key)', 'wpg_theme'),\n 'load' => __('Loading ...', 'wpg_theme'),\n 'image' => __('Image', 'wpg_theme'),\n 'error_image' => __('it cannot be loaded.', 'wpg_theme'),\n )\n);\n\n// Google map\nif (get_theme_mod('wpg_contact_maps') == true){\n wp_enqueue_script('mapa-api');\n wp_enqueue_script('google-map');\n}\n\n// Comment\nif ( is_single() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n}\n}", "function WBootStrap_load_js(){\n\t$JS_Files = array(\n\t\t'prettify' => 'google-code-prettify/prettify.js',\n\t\t'transition' => 'bootstrap-transition.js',\n\t\t'alert' => 'bootstrap-alert.js',\n\t\t'modal' => 'bootstrap-modal.js',\n\t\t'dropdown' => 'bootstrap-dropdown.js',\n\t\t'scrollspy' => 'bootstrap-scrollspy.js',\n\t\t'tab' => 'bootstrap-tab.js',\n\t\t'tooltip' => 'bootstrap-tooltip.js',\n\t\t'popover' => 'bootstrap-popover.js',\n\t\t'button' => 'bootstrap-button.js',\n\t\t'collapse' => 'bootstrap-collapse.js',\n\t\t'carousel' => 'bootstrap-carousel.js',\n\t\t'typeahead' => 'bootstrap-typeahead.js',\n\t);\n\t$JS_Files = apply_filters('WBootStrap_js_enqueue_filter',$JS_Files);\n\tforeach ($JS_Files as $key => $value) {\n\t\twp_enqueue_script($key, get_template_directory_uri().'/assets/js/'.$value, array('jquery'),theme_version, true );\n\t}\n\t\n\t/*\n\t\t//to load manually each script use:\n\twp_enqueue_script('prettify', get_template_directory_uri().'/assets/js/google-code-prettify/prettify.js', array('jquery'),theme_version, true );\n wp_enqueue_script('transition', get_template_directory_uri().'/assets/js/bootstrap-transition.js', array('jquery'),theme_version, true );\n wp_enqueue_script('alert', get_template_directory_uri().'/assets/js/bootstrap-alert.js', array('jquery'),theme_version, true );\n wp_enqueue_script('modal', get_template_directory_uri().'/assets/js/bootstrap-modal.js', array('jquery'),theme_version, true );\n wp_enqueue_script('dropdown', get_template_directory_uri().'/assets/js/bootstrap-dropdown.js', array('jquery'),theme_version, true );\n wp_enqueue_script('scrollspy', get_template_directory_uri().'/assets/js/bootstrap-scrollspy.js', array('jquery'),theme_version, true );\n wp_enqueue_script('tab', get_template_directory_uri().'/assets/js/bootstrap-tab.js', array('jquery'),theme_version, true );\n wp_enqueue_script('tooltip', get_template_directory_uri().'/assets/js/bootstrap-tooltip.js', array('jquery'),theme_version, true );\n wp_enqueue_script('popover', get_template_directory_uri().'/assets/js/bootstrap-popover.js', array('tooltip.js'),theme_version, true );\n wp_enqueue_script('button', get_template_directory_uri().'/assets/js/bootstrap-button.js', array('jquery'),theme_version, true );\n wp_enqueue_script('collapse', get_template_directory_uri().'/assets/js/bootstrap-collapse.js', array('jquery'),theme_version, true ); \n wp_enqueue_script('carousel', get_template_directory_uri().'/assets/js/bootstrap-carousel.js', array('jquery'),theme_version, true ); \n wp_enqueue_script('typeahead', get_template_directory_uri().'/assets/js/bootstrap-typeahead.js', array('jquery'),theme_version, true );\n */\n}", "function mpfy_enqueue_gmaps() {\n\twp_dequeue_script('google_map_api');\n\twp_dequeue_script('google-maps');\n\twp_dequeue_script('cspm_google_maps_api');\n\twp_dequeue_script('gmaps');\n\twp_deregister_script('gmaps');\n\n\t// load our own version of gmaps as we require the geometry library\n\t$api_key = carbon_get_theme_option('mpfy_google_api_key');\n\t$api_key_param = $api_key ? '&key=' . $api_key : '';\n\twp_enqueue_script('gmaps', '//maps.googleapis.com/maps/api/js?libraries=geometry' . $api_key_param, array(), false, true);\n}", "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "function plugin_frontend_scripts_styles()\r\r\n{\r\r\n $options = get_option('oneclick');\r\r\n $gmap_iconizer_apikey = $options['gmap_iconizer_apikey'];\r\r\n if ($gmap_iconizer_apikey != \"\") {\r\r\n wp_enqueue_script('gmap_main_js', 'https://maps.googleapis.com/maps/api/js?v=3key=' . $gmap_iconizer_apikey, '', '', false);\r\r\n }\r\r\n else {\r\r\n wp_enqueue_script('sensor_js', 'http://maps.googleapis.com/maps/api/js?sensor=false', '', false);\r\r\n }\r\r\n}", "function wpeHeaderScripts()\n{\n wp_register_script('jquery', '//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js', array(), '3.4.1');\n wp_enqueue_script('jquery');\n\n wp_register_script('popper', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js', array(), '1.14.7', true);\n wp_enqueue_script('popper');\n\n wp_register_script('bootstrap', '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js', array(), '4.3.1', true);\n wp_enqueue_script('bootstrap');\n\n wp_register_script('maps', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCZF31krTQH_5QnEpdIsEgmsBV-Iy884rE', array(), '7.7.7', true);\n wp_enqueue_script('maps');\n\n // wp_register_script('vue', '//cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array(), '2.6.10');\n // wp_enqueue_script('vue');\n\n wp_register_script('selectric', get_template_directory_uri() . '/js/jquery.selectric.js', array(), '1.0.0', true);\n wp_enqueue_script('selectric');\n\n // wp_register_script('owl.carousel', get_template_directory_uri() . '/js/owl.carousel.js', array(), '2.3.4', true);\n wp_register_script('owl.carousel', '//cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js', array(), '2.3.4', true);\n wp_enqueue_script('owl.carousel');\n\n // Load footer scripts (footer.php)\n wp_register_script('wpeScripts', get_template_directory_uri() . '/js/scripts.js', array(), '1.7.0', true);\n wp_enqueue_script('wpeScripts');\n wp_localize_script('wpeScripts', 'adminAjax', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'templatePath' => get_template_directory_uri(),\n 'posts_per_page' => get_option('posts_per_page'),\n 'loadingmessage' => __('Sending user info, please wait...')\n ));\n}", "function register_my_jscripts() {\n\n \t wp_register_script( 'googleapi', 'https://maps.googleapis.com/maps/api/js?libraries=geometry&key=AIzaSyA21ZwPY6xqz4gvkdil2wGGBRWSGEayq78', array( 'jquery' ), NULL, false );wp_enqueue_script( 'googleapi' );\n\n\n\t wp_register_script( 'niceScroll', THEME_DIR .'/js/jquery.nicescroll.min.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'niceScroll' );\n \t wp_register_script( 'fancyboxm', THEME_DIR .'/js/fancybox/jquery.mousewheel-3.0.6.pack.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'fancyboxm' );\n \t wp_register_script( 'fancybox', THEME_DIR .'/js/fancybox/jquery.fancybox.pack.js?v=2.1.5', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'fancybox' );\n \t wp_register_script( 'moment', THEME_DIR .'/js/moment.min.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'moment' );\n \t wp_register_script( 'calendar', THEME_DIR .'/js/fullcalendar.min.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'calendar' );\n \t if(is_rtl()){\n \t \t\twp_register_script( 'hecalendar', THEME_DIR .'/js/he.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'hecalendar' );\n \t }\n\t wp_register_script( 'swiper', THEME_DIR .'/js/swiper.min.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'swiper' );\n\n\t\twp_register_script(\"addthis\",\"//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-57e21979bdebcfe3\",array('jquery'),NULL,true);\n\t\twp_enqueue_script( 'addthis' );\n\n\t wp_register_script( 'functions', THEME_DIR .'/js/functions.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'functions' );\n\t wp_register_script( 'accessibility', THEME_DIR .'/js/accessibility.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'accessibility' );\n\n\t if( is_archive('event') )\n\t \t\twp_localize_script( 'functions', 'allPostsObject', get_all_events() );\n\n\t}", "function mocca_script_files() {\n\n wp_deregister_script('jquery'); // Remove Registeration Old JQuery\n wp_register_script('jquery', includes_url('/js/jquery/jquery.js'), false, '', true); // Register a New JQuery in Footer\n wp_enqueue_script('jquery'); // Enqueue New JQuery\n wp_enqueue_script('popper-js', get_template_directory_uri() . '/js/popper.min.js', array(), false, true);\n wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), false, true);\n }", "function enqueue_javascript() {\n\n // TODO : only if needed for cities drop down\n //\n if ( file_exists( $this->addon->dir . 'include/widgets/slp_widgets.js' ) ) {\n $this->js_settings['ajaxurl'] = admin_url( 'admin-ajax.php' );\n wp_enqueue_script( $this->addon->slug . '_widgets' , $this->addon->url . '/include/widgets/slp_widgets.js' , array( 'jquery' ) );\n wp_localize_script( $this->addon->slug . '_widgets' , 'slp_experience' , $this->js_settings );\n }\n }", "function pegasus_child_bootstrap_js() {\r\n\t\t\r\n\t\twp_enqueue_script( 'pegasus_custom_js', get_stylesheet_directory_uri() . '/js/pegasus-custom.js', array(), '', true );\r\n\t\t\r\n\t\t//wp_enqueue_script( 'matchHeight_js', get_stylesheet_directory_uri() . '/js/jquery.matchHeight-min.js', array(), '', true );\r\n\t\t\r\n\t\t\r\n\t}", "function ajout_scripts() {\n wp_register_script('bootstrap_script', get_template_directory_uri() . '/assets/scripts/bootstrap.min.js', array('jquery'),'1.1', true);\n wp_enqueue_script('bootstrap_script');\n \n wp_register_script('main_js', get_template_directory_uri() . '/assets/scripts/main.js', array('jquery'),'1.1', true);\n wp_enqueue_script('main_js');\n \n // enregistrement des styles\n wp_register_style( 'google_font', 'https://fonts.googleapis.com/css?family=Anton|Oxygen' );\n wp_enqueue_style( 'google_font' );\n \n wp_register_style( 'bootstrap_style', get_template_directory_uri() . '/assets/styles/bootstrap.min.css' );\n wp_enqueue_style( 'bootstrap_style' );\n \n // enregistrement des styles\n wp_register_style( 'main_style', get_template_directory_uri() . '/assets/styles/main.css' );\n wp_enqueue_style( 'main_style' );\n}", "public function scripts() {\n // Make sure scripts are only added once via shortcode\n $this->add_scripts = true;\n\n wp_register_script('jquery-form-validation', SWPM_FORM_BUILDER_URL . '/js/jquery.validate.min.js', array('jquery'), '1.9.0', true);\n wp_register_script('swpm-form-builder-validation', SWPM_FORM_BUILDER_URL . \"/js/swpm-validation$this->load_dev_files.js\", array('jquery', 'jquery-form-validation'), '20140412', true);\n wp_register_script('swpm-form-builder-metadata', SWPM_FORM_BUILDER_URL . '/js/jquery.metadata.js', array('jquery', 'jquery-form-validation'), '2.0', true);\n wp_register_script('swpm-ckeditor', SWPM_FORM_BUILDER_URL . '/js/ckeditor/ckeditor.js', array('jquery'), '4.1', true);\n\n wp_enqueue_script('jquery-form-validation');\n wp_enqueue_script('swpm-form-builder-validation');\n wp_enqueue_script('swpm-form-builder-metadata');\n\n $locale = get_locale();\n $translations = array(\n 'cs_CS', // Czech\n 'de_DE', // German\n 'el_GR', // Greek\n 'en_US', // English (US)\n 'en_AU', // English (AU)\n 'en_GB', // English (GB)\n 'es_ES', // Spanish\n 'fr_FR', // French\n 'he_IL', // Hebrew\n 'hu_HU', // Hungarian\n 'id_ID', // Indonseian\n 'it_IT', // Italian\n 'ja_JP', // Japanese\n 'ko_KR', // Korean\n 'nl_NL', // Dutch\n 'pl_PL', // Polish\n 'pt_BR', // Portuguese (Brazilian)\n 'pt_PT', // Portuguese (European)\n 'ro_RO', // Romanian\n 'ru_RU', // Russian\n 'sv_SE', // Swedish\n 'tr_TR', // Turkish\n 'zh_CN', // Chinese\n 'zh_TW', // Chinese (Taiwan)\n );\n\n // Load localized vaidation and datepicker text, if translation files exist\n if (in_array($locale, $translations)) {\n wp_register_script('swpm-validation-i18n', SWPM_FORM_BUILDER_URL . \"/js/i18n/validate/messages-$locale.js\", array('jquery-form-validation'), '1.9.0', true);\n wp_register_script('swpm-datepicker-i18n', SWPM_FORM_BUILDER_URL . \"/js/i18n/datepicker/datepicker-$locale.js\", array('jquery-ui-datepicker'), '1.0', true);\n\n wp_enqueue_script('swpm-validation-i18n');\n }\n // Otherwise, load English translations\n else {\n wp_register_script('swpm-validation-i18n', SWPM_FORM_BUILDER_URL . \"/js/i18n/validate/messages-en_US.js\", array('jquery-form-validation'), '1.9.0', true);\n wp_register_script('swpm-datepicker-i18n', SWPM_FORM_BUILDER_URL . \"/js/i18n/datepicker/datepicker-en_US.js\", array('jquery-ui-datepicker'), '1.0', true);\n\n wp_enqueue_script('swpm-validation-i18n');\n }\n }", "function bootstrap_scripts() {\n\t\t\tif ( ! is_admin() ) {\n\n\t\t\t\t// Twitter Bootstrap CSS.\n\t\t\t\twp_register_style( 'bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css', '', null, 'all' );\n\t\t\t\twp_enqueue_style( 'bootstrap' );\n\n\t\t\t\t// Load jQuery.\n\t\t\t\twp_enqueue_script( 'jquery' );\n\n\t\t\t\t// Twitter Bootstrap Javascript.\n\t\t\t\twp_register_script( 'bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', 'jquery', null, true );\n\t\t\t\twp_enqueue_script( 'bootstrap' );\n\n\t\t\t\t// Google Webfont.\n\t\t\t\twp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', null, null, true );\n\t\t\t\twp_enqueue_script( 'webfont' );\n\n\t\t\t\t// Load Font Awesome via Google Webfont.\n\t\t\t\twp_add_inline_script( 'webfont', 'WebFont.load({custom:{families:[\"font-awesome\"],urls:[\"https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css\"]}});' );\n\n\t\t\t}\n\t\t}", "function jk_scripts(){\n\twp_register_script('materialize-js',get_stylesheet_directory_uri().'/js/bootstrap.min.js',array('jquery'),true);\n\twp_enqueue_script('materialize-js');\n\twp_register_script('myjs',get_stylesheet_directory_uri().'/js/myjs.js',array('jquery'),true);\n\twp_enqueue_script('myjs');\n}", "public function enqueue_scripts($hook) {\n $screen = get_current_screen();\n switch(true){\n case ('wpcf7_contact_form' == $screen->post_type && 'post' == $screen->base):\n case ('toplevel_page_wpcf7' == $hook || 'contact_page_wpcf7-new' == $hook):\n\n $plugin_dir = plugin_dir_url( __DIR__ );\n $google_map_api_key = get_option('cf7_googleMap_api_key','');\n $airplane_mode = true;\n if(! class_exists( 'Airplane_Mode_Core' ) || !Airplane_Mode_Core::getInstance()->enabled()){\n $scheme = 'http';\n if(is_ssl()) $scheme = 'https';\n wp_enqueue_script( 'google-maps-api-admin', $scheme.'://maps.google.com/maps/api/js?key='. $google_map_api_key, array( 'jquery' ), null, true );\n $airplane_mode = false;\n }\n wp_enqueue_script( 'gmap3-admin', $plugin_dir . '/assets/gmap3/gmap3.min.js', array( 'jquery', 'google-maps-api-admin' ), $this->version, true );\n \twp_enqueue_script( 'arrive-js', $plugin_dir . '/assets/arrive/arrive.min.js', array( 'jquery' ), $this->version, true );\n \twp_enqueue_script( $this->plugin_name, $plugin_dir . '/admin/js/admin_settings_map.js', array( 'jquery' ), $this->version, true );\n wp_localize_script( $this->plugin_name, 'cf7_map_admin_settings', array(\n \t\t'theme_dir' \t\t\t=> plugin_dir_url( __DIR__ ),\n 'marker_lat' => '12.007089',\n 'marker_lng' => '79.810600',\n 'map_zoom' => '3',\n 'airplane'=>$airplane_mode\n \t) );\n break;\n }\n\t}", "function bootstrap_theme_enqueue_scripts() {\n $template_url = get_template_directory_uri();\n\n // jQuery.\n wp_enqueue_script('jquery');\n\n // JS \n wp_enqueue_script('jquery-script', $template_url . '/js/jquery-1.10.2.js', array('jquery'), null, true);\n wp_enqueue_script('bootstrap-script', $template_url . '/js/bootstrap.min.js', array('jquery'), null, true);\n wp_enqueue_script('wow-script', $template_url . '/js/wow.js', array('jquery'), null, true);\n wp_enqueue_script('jquery-ui', $template_url . '/js/jquery-ui.min.js', array('jquery'), null, true);\n wp_enqueue_script('waypoints', $template_url . '/js/waypoints.min.js', array('jquery'), null, true);\n wp_enqueue_script('magnific-popup', $template_url . '/js//jquery.magnific-popup.min.js', array('jquery'), null, true);\n wp_enqueue_script('isotope', $template_url . '/js/isotope.pkgd.min.js', array('jquery'), null, true);\n wp_enqueue_script('custom', $template_url . '/js/custom.js', array('jquery'), null, true);\n\n // CSS\n wp_enqueue_style('bootstrap-style', $template_url . '/css/bootstrap.min.css', array(), null, 'all');\n wp_enqueue_style('animate', $template_url . '/css/animate.css', array(), null, 'all');\n wp_enqueue_style('magnific-popup-css', $template_url . '/css/magnific-popup.css', array(), null, 'all');\n wp_enqueue_style('font-awesome', $template_url . '/font-awesome/css/font-awesome.min.css', array(), null, 'all');\n wp_enqueue_style('preloader', $template_url . '/css/preloader.css', array(), null, 'all');\n\n //Main Style\n wp_enqueue_style('main-style', get_stylesheet_uri());\n\n //Google Fonts\n wp_enqueue_style('google-fonts', '//fonts.googleapis.com/css?family=Arvo|Oswald:300|Open+Sans:300,400,700');\n\n // Load Thread comments WordPress script.\n if (is_singular() && get_option('thread_comments')) {\n wp_enqueue_script('comment-reply');\n }\n}", "function themesflat_shortcode_register_assets() {\t\t\n\t\twp_enqueue_style( 'vc_extend_shortcode', plugins_url('assets/css/shortcodes.css', __FILE__), array() );\t\n\t\twp_enqueue_style( 'vc_extend_style', plugins_url('assets/css/shortcodes-3rd.css', __FILE__),array() );\n\t\twp_register_script( 'themesflat-carousel', plugins_url('assets/3rd/owl.carousel.js', __FILE__), array(), '1.0', true );\n\t\twp_register_script( 'themesflat-flexslider', plugins_url('assets/3rd/jquery.flexslider-min.js', __FILE__), array(), '1.0', true );\t\t\n\t\twp_register_script( 'themesflat-manific-popup', plugins_url('assets/3rd/jquery.magnific-popup.min.js', __FILE__), array(), '1.0', true );\t\t\n\t\twp_register_script( 'themesflat-counter', plugins_url('assets/3rd/jquery-countTo.js', __FILE__), array(), '1.0', true );\n\t\twp_enqueue_script( 'flat-shortcode', plugins_url('assets/js/shortcodes.js', __FILE__), array(), '1.0', true );\n\t\twp_register_script( 'themesflat-google', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCIm1AxfRgiI_w36PonGqb_uNNMsVGndKo&v=3.7', array(), '1.0', true );\n\t\twp_register_script( 'themesflat-gmap3', plugins_url('assets/3rd/gmap3.min.js', __FILE__), array(), '1.0', true );\t\n\t}" ]
[ "0.7688724", "0.7506284", "0.7400612", "0.7400038", "0.73943806", "0.7343996", "0.7318699", "0.7288863", "0.72575504", "0.72565913", "0.71974033", "0.71854246", "0.7171689", "0.71642244", "0.71556664", "0.7153486", "0.71473545", "0.7145843", "0.7135006", "0.7132085", "0.71201026", "0.711158", "0.7107954", "0.7084126", "0.7081276", "0.70797485", "0.70784694", "0.70635325", "0.70192504", "0.7018553" ]
0.7588458
1
/ used on servicegroups page creates arrays of service details organized by groupnames
function build_servicegroups_array() { global $NagiosData; global $NagiosUser; $servicegroups = $NagiosData->getProperty('servicegroups'); $services = $NagiosData->getProperty('services'); $services = user_filtering($services,'services'); $servicegroups_details = array(); //multi-dim array to hold servicegroups foreach($servicegroups as $groupname => $members) { $servicegroups_details[$groupname] = array(); //array_dump($members); foreach($services as $service) { if(isset($members[$service['host_name']]) && in_array($service['service_description'],$members[$service['host_name']])) { process_service_status_keys($service); $servicegroups_details[$groupname][] = $service; } } } return $servicegroups_details; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build_host_servicegroup_details($group_members) \n{\n\tglobal $NagiosData;\n\tglobal $NagiosUser; \n\t$hosts = $NagiosData->getProperty('hosts');\n\t\n\n\t$servicegroup_details = array();\n\tforeach($group_members as $member)\n\t{\n\t\tif($NagiosUser->is_authorized_for_host($member)) //user-level filtering \n\t\t{\n\t\t\tif (isset($hosts[$member]['services']))\n\t\t\t\tforeach ($hosts[$member]['services'] as $service) \n\t\t\t\t{\n\t\t\t\t\tif($NagiosUser->is_authorized_for_service($member,$service)) //user-level filtering \n\t\t\t\t\t\t$servicegroup_details[] = $service;\t\n\t\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t}\n\treturn $servicegroup_details;\n}", "public function findServiceGroups(): array;", "function build_hostgroup_details($group_members) //make this return the totals array for hosts and services \n{\n\tglobal $NagiosData;\n\tglobal $NagiosUser; \n\t\n\t$hosts = $NagiosData->getProperty('hosts');\n\t\n//\t//add filter for user-level filtering \n//\tif(!$NagiosUser->is_admin()) {\n\t\t//print $type; \n//\t\t$hosts = user_filtering($hosts,'hosts'); \t\n//\t}\n\n\t$hostgroup_details = array();\n\tforeach($group_members as $member)\n\t{\n\t\tif($NagiosUser->is_authorized_for_host($member)) //user-level filtering \n\t\t\t$hostgroup_details[] = $hosts[$member];\n\t}\n\n\treturn $hostgroup_details;\n}", "function get_hostgroup_data()\n{\n\tglobal $NagiosData;\n\tglobal $NagiosUser; \n\n\t$hostgroups = $NagiosData->getProperty('hostgroups');\n\t$hosts = $NagiosData->getProperty('hosts');\n\n\t$hostgroup_data = array();\n\tforeach ($hostgroups as $group => $members) \n\t{\n\t\t\n\t\t\n\t\t$hostgroup_data[$group] = array(\n\t\t\t'member_data' => array(),\n\t\t\t'host_counts' => get_state_of('hosts', build_hostgroup_details($members)),\n\t\t\t'service_counts' => get_state_of('services', build_host_servicegroup_details($members))\n\t\t\t);\n\t\t\n\t\t//skip ahead if there are no authorized hosts\t\t\t\n\t\tif(array_sum($hostgroup_data[$group]['host_counts'])==0) continue; //skip empty groups \n\t\t\t\n\t\tforeach ($members as $member) \n\t\t{\n\t\t\n\t\t\tif(!$NagiosUser->is_authorized_for_host($member)) continue; //user-level filtering \t\t\n\t\t\n\t\t\t$host = $hosts[$member];\n\t\t\tprocess_host_status_keys($host); \n\t\t\t$hostgroup_data[$group]['member_data'][$member]['host_name'] = $host['host_name'];\n\t\t\t$hostgroup_data[$group]['member_data'][$member]['host_state'] = $host['current_state'];\n\t\t\t$hostgroup_data[$group]['member_data'][$member]['state_class'] = get_color_code($host);\n\t\t\t$hostgroup_data[$group]['member_data'][$member]['services'] = array();\n\t\t\t$hostgroup_data[$group]['member_data'][$member]['host_url'] = \n\t\t\t\tBASEURL.'index.php?type=hostdetail&name_filter='.urlencode($host['host_name']);\n\n\t\t\t\n\t\t\tif (isset($host['services'])) {\n\t\t\t\tforeach($host['services'] as $service) {\n\t\t\t\t\n\t\t\t\t\tif(!$NagiosUser->is_authorized_for_service($member,$service['service_description'])) continue; //user-level filtering \t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tprocess_service_status_keys($service);\n\t\t\t\t\t$service_data = array(\n\t\t\t\t\t\t'state_class' => get_color_code($service),\n\t\t\t\t\t\t'description' => $service['service_description'],\n\t\t\t\t\t\t'service_url' => htmlentities(BASEURL.'index.php?type=servicedetail&name_filter='.$service['service_id']),\n\t\t\t\t\t);\n\t\t\t\t\t$hostgroup_data[$group]['member_data'][$member]['services'][] = $service_data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}\n\treturn $hostgroup_data;\n}", "function build_group_array($objectarray, $type)\n{\n\t$membersArray = array(); \n\t$index = $type.'group_name';\n\n\tforeach ($objectarray as $object)\n\t{\n\t\t$group = $object[$index];\n\t\tif (isset($object['members']))\n\t\t{\n\t\t\t$members = $object['members'];\n\t\t\t$lineitems = explode(',', trim($members));\n\t\t\t\n\t\t\t//array_walk($lineitems, create_function('$v', '$v = trim($v);')); //XXX BAD to use create_function \n\t\t\tarray_walk($lineitems, 'trim'); \n\t\t\t\n\t\t\t$group_members = NULL;\n\t\t\tif ($type == 'host' || $type == 'contact')\n\t\t\t{\n\t\t\t\t$group_members = $lineitems;\n\t\t\t}\n\t\t\telseif ($type == 'service')\n\t\t\t{\n\t\t\t\tfor ($i = 0; $i < count($lineitems); $i+=2)\n\t\t\t\t{\n\t\t\t\t\t$host = $lineitems[$i];\n\t\t\t\t\t$service = $lineitems[$i+1];\n\t\t\t\t\t$group_members[$host][] = $service; \n\t\t\t\t\t/* (\n\t\t\t\t\t\t'host_name' => $host,\n\t\t\t\t\t\t'service_description' => $service); */\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$membersArray[$group] = $group_members;\n\t\t}\n\t}\n\n\treturn $membersArray;\n}", "public function getServices() {\n $serviceNames = $this->getServiceNames($this->serviceFolderPaths);\n $ret = $ret1 = array();\n// require_once AMFPHP_ROOTPATH.'Plugins/AmfphpDiscovery/CReflection.php';\n foreach ($serviceNames as $serviceName) {\n/* $methods = array();\n $objC = new CReflection(APP_PATH.'/app/controllers/'.$serviceName.'.php');\n $objComment = $objC->getDocComment();\n $arrMethod = $objC->getMethods();\n foreach ($arrMethod as $objMethods)\n {\n $methodComment = $objMethods->getDocComment();\n $parsedMethodComment = $this->parseMethodComment($methodComment);\n $arrParamenter = $objMethods->getParameters();\n foreach ($arrParamenter as $Paramenter)\n {\n $parameterInfo = new AmfphpDiscovery_ParameterDescriptor($Paramenter, '');\n $parameters[] = $parameterInfo;\n }\n $methods[$objMethods->_name] = new AmfphpDiscovery_MethodDescriptor($objMethods->_name, $parameters, $methodComment, $parsedMethodComment['return']);\n }\n\n $ret[$serviceName] = new AmfphpDiscovery_ServiceDescriptor($serviceName, $methods, $objComment); */\n $ret1[] = array('label'=>$serviceName,'date'=>'');\n }\n// var_dump($ret);exit();\n //note : filtering must be done at the end, as for example excluding a Vo class needed by another creates issues\n foreach ($ret as $serviceName => $serviceObj) {\n foreach (self::$excludePaths as $excludePath) {\n if (strpos($serviceName, $excludePath) !== false) {\n unset($ret[$serviceName]);\n break;\n }\n }\n }\n return $ret1;\n }", "public function getServices() {\n $services = Service::active()->get()->toArray();\n $outputArray = array();\n if ($services) {\n foreach ($services as $key => $value) {\n $begin = new DateTime($value['start_date']);\n $end = new DateTime($value['end_date']);\n if ($value['service_type'] == 'daily') {\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#605ca8\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n if ($value['service_type'] == 'weekly') {\n\n $schedule = Schedule::where('service_id', $value['id'])->get()->toArray();\n\n $weekNumber = array();\n for ($i = 0; $i < count($schedule); $i++) {\n $weekNumber[] = $schedule[$i]['week_number'];\n }\n\n $interval = DateInterval::createFromDateString('1 day');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n if (in_array($dt->format(\"w\"), $weekNumber)) {\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#f012be\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n\n if ($value['service_type'] == 'monthly') {\n $interval = DateInterval::createFromDateString('1 month');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"#00a65a\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n\n if ($value['service_type'] == 'yearly') {\n $interval = DateInterval::createFromDateString('1 year');\n $period = new DatePeriod($begin, $interval, $end);\n\n foreach ($period as $key => $dt) {\n $timestamp = strtotime($dt->format(\"Y-m-d\"));\n $myobj = new \\stdClass();\n $myobj->title = $value['title'];\n $myobj->start = $dt->format(\"Y-m-d\");\n \n $scheduleArray = $this->getScheduleService($value['id'], $timestamp);\n \n if (date(\"Y-m-d\") <= $dt->format(\"Y-m-d\") && !empty($scheduleArray['availability'])) {\n $myobj->color = \"orange\";\n $myobj->url = url(\"/reservation/\" . $value['id'] . '/' . $timestamp);\n } else {\n $myobj->color = \"gray\";\n }\n array_push($outputArray, $myobj);\n }\n }\n }\n }\n// echo \"<pre>\";\n// print_r($outputArray);\n// echo \"</pre>\";\n echo json_encode($outputArray);\n }", "protected function getGroupList() {}", "protected function getGroupList() {}", "public static function get_group_info($grouptype='service', $groupname=false, $hoststatus=false, $servicestatus=false, $service_props=false, $host_props=false, $limit=false, $sort_field=false, $sort_order='DESC')\n\t{\n\t\t$groupname = trim($groupname);\n\t\tif (empty($groupname)) {\n\t\t\treturn false;\n\t\t}\n\t\t$filter_sql = '';\n\t\t$state_filter = false;\n\t\tif (!empty($hoststatus)) {\n\t\t\t$bits = db::bitmask_to_string($hoststatus);\n\t\t\t$filter_sql .= \" AND h.current_state IN ($bits) \";\n\t\t}\n\t\t$service_filter = false;\n\t\t$servicestatus = trim($servicestatus);\n\t\tif ($servicestatus!==false && !empty($servicestatus)) {\n\t\t\t$bits = db::bitmask_to_string($servicestatus);\n\t\t\t$filter_sql .= \" AND s.current_state IN ($bits) \";\n\t\t}\n\n\t\t$limit_str = !empty($limit) ? trim($limit) : '';\n\n\t\t$db = Database::instance();\n\t\t$all_sql = $groupname != 'all' ? \"AND sg.\".$grouptype.\"group_name=\".$db->escape($groupname).\" \" : '';\n\n\t\t# we need to match against different field depending on if host- or servicegroup\n\t\t$member_match = $grouptype == 'service' ? \"s.id=ssg.\".$grouptype : \"h.id=ssg.\".$grouptype;\n\n\t\t$sort_string = \"\";\n\t\tif (empty($sort_field)) {\n\t\t\t$sort_string = \"h.host_name,s.current_state, s.service_description \".$sort_order;\n\t\t} else {\n\t\t\t$sort_string = $sort_field.' '.$sort_order;\n\t\t}\n\n\t\t$service_props_sql = Host_Model::build_service_props_query($service_props, 's.', 'h.');\n\t\t$host_props_sql = Host_Model::build_host_props_query($host_props, 'h.');\n\n\t\t$auth = Nagios_auth_Model::instance();\n\t\t$auth_str = '';\n\t\tif ($auth->view_hosts_root || ($auth->view_services_root && $grouptype == 'service')) {\n\t\t\t$auth_str = \"\";\n\t\t} else {\n\t\t\t$auth_str = \" INNER JOIN contact_access ca ON ca.host = h.id AND ca.contact = \".$db->escape($auth->id).\" \";\n\t\t}\n\t\t$sql = \"SELECT\n\t\t\t\th.host_name,\n\t\t\t\th.address,\n\t\t\t\th.alias,\n\t\t\t\th.current_state AS host_state,\n\t\t\t\t(UNIX_TIMESTAMP() - \".($grouptype == 'service' ? 's' : 'h').\".last_state_change) AS duration,\n\t\t\t\tUNIX_TIMESTAMP() AS cur_time,\n\t\t\t\th.output AS host_output,\n\t\t\t\th.long_output AS host_long_output,\n\t\t\t\th.problem_has_been_acknowledged AS hostproblem_is_acknowledged,\n\t\t\t\th.scheduled_downtime_depth AS hostscheduled_downtime_depth,\n\t\t\t\th.notifications_enabled AS host_notifications_enabled,\n\t\t\t\th.active_checks_enabled AS host_active_checks_enabled,\n\t\t\t\th.action_url AS host_action_url,\n\t\t\t\th.icon_image AS host_icon_image,\n\t\t\t\th.icon_image_alt AS host_icon_image_alt,\n\t\t\t\th.is_flapping AS host_is_flapping,\n\t\t\t\th.notes_url AS host_notes_url,\n\t\t\t\th.display_name AS host_display_name,\n\t\t\t\ts.id AS service_id,\n\t\t\t\ts.current_state AS service_state,\n\t\t\t\t(UNIX_TIMESTAMP() - s.last_state_change) AS service_duration,\n\t\t\t\tUNIX_TIMESTAMP() AS service_cur_time,\n\t\t\t\ts.active_checks_enabled,\n\t\t\t\ts.current_state,\n\t\t\t\ts.problem_has_been_acknowledged,\n\t\t\t\t(s.scheduled_downtime_depth + h.scheduled_downtime_depth) AS scheduled_downtime_depth,\n\t\t\t\ts.last_check,\n\t\t\t\ts.output,\n\t\t\t\ts.long_output,\n\t\t\t\ts.notes_url,\n\t\t\t\ts.action_url,\n\t\t\t\ts.current_attempt,\n\t\t\t\ts.max_check_attempts,\n\t\t\t\ts.should_be_scheduled,\n\t\t\t\ts.next_check,\n\t\t\t\ts.notifications_enabled,\n\t\t\t\ts.service_description,\n\t\t\t\ts.display_name AS display_name\n\t\t\tFROM host h\n\t\t\tLEFT JOIN service s ON h.host_name=s.host_name\n\t\t\tINNER JOIN {$grouptype}_{$grouptype}group ssg ON {$member_match}\n\t\t\tINNER JOIN {$grouptype}group sg ON sg.id = ssg.{$grouptype}group\n\t\t\t$auth_str\n\t\t\tWHERE 1 = 1\n\t\t\t\t{$all_sql} {$filter_sql} {$service_props_sql}\n\t\t\t\t{$host_props_sql}\n\t\t\tORDER BY \".$sort_string.\" \".$limit_str;\n\t\treturn $db->query($sql);\n\t}", "function getServicesList()\n {\n//JOIN sub_services_list ON services_categery.services_catagery_id=sub_services_list.services_catagery_id \";\n//\n// $query = $this->db->query($sql);\n// $result = $query->result_array();\n//\n// $serviceArray = [];\n// foreach ($result as $value) {\n// $serviceArray[$value['services_group']] [$value['services_categery_list']][] = [\n// $value['services_list'], $value['service_fee'], $value['convenience_fee']];\n// }\n\n $query = $this->db->get('services_group');\n $serviceArray ['servGroup'] = $query->result();\n\n//$query1 = $this->db->get('services_categery');\n//$serviceArray ['servCategory']= $query1->result() ;\n $this->db->select('*');\n $this->db->join('services_categery', 'sub_services_list.services_catagery_id=services_categery.services_catagery_id');\n $query2 = $this->db->get('sub_services_list');\n $serviceArray ['servList'] = $query2->result();\n\n// echo \"<pre>\";\n// print_r($serviceArray);die;\n return $serviceArray;\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 }", "function makeServiceList() {\n\n\n $dbMain = $this->dbconnect();\n $stmt = $dbMain ->prepare(\"SELECT service_key, service_type, club_id FROM service_info WHERE service_key ='$this->serviceKey' AND group_type ='$this->groupType'\");\n\n $stmt->execute(); \n $stmt->store_result(); \n $stmt->bind_result($service_key, $service_type, $club_id); \n \n \n \n while ($stmt->fetch()) { \n \n // echo\"$service_key $service_type <br>\";\n \n $result = $dbMain -> query(\"SELECT club_name FROM club_info WHERE club_id = '$club_id'\");\n $row = mysqli_fetch_array($result, MYSQLI_NUM);\n $service_location = $row[0];\n \n\n \n if($club_id == \"0\") {\n $service_location = 'All Locations';\n }\n \n \n $this->serviceType = $service_type; \n \n /* \n //create color rows\n static $cell_count = 1;\n if($cell_count == 2) {\n $color = \"#D8D8D8\";\n $color2 = \"D8D8D8\";\n $cell_count = \"\";\n }else{\n $color = \"#FFFFFF\";\n $color2 = \"FFFFFF\";\n }\n $cell_count = $cell_count + 1;\n \n //$this->cellCount++;\n */\n \n$comp_type_a=\"comp_type$this->groupType$this->cellCount\";\n$comp_type_b ='[]';\n$comp_type =\"$comp_type_a$comp_type_b\";\n\n$comp_a =\"comp$this->groupType$this->cellCount\";\n$comp_b ='[]';\n$comp = \"$comp_a$comp_b\";\n\n\n$this->getTerms($service_key, $comp_type, $comp_a); \n\n//f the service month exiss in the available upgrades it allows it to print\nif($this->termsArray != null) {\n\n $terms = explode(\"|\", $this->termsArray);\n $term1 = $terms[0];\n $term2 = $terms[1]; \n $term3 = $terms[2];\n $term4 = $terms[3];\n\n$this->termsArray = null;\n\n//this sets up the renewal rate if it is a class or a date string \n$checkString = \"$term1 $term2 $term3 $term4\";\nif(preg_match(\"/Class\\(s\\)/\", $checkString)) {\n $disabled = 'disabled=\"disabled\"';\n $rate_value = 'NA';\n }else{\n $disabled = null;\n $rate_value = null;\n }\n\n //create color rows\n static $cell_count = 1;\n if($cell_count == 2) {\n $color = \"#D8D8D8\";\n $color2 = \"D8D8D8\";\n $cell_count = \"\";\n }else{\n $color = \"#FFFFFF\";\n $color2 = \"FFFFFF\";\n }\n $cell_count = $cell_count + 1;\n\n\n$records =\"<tr id=\\\"a$i\\\" style=\\\"background-color: $color\\\">\n<td align=\\\"left\\\" valign =\\\"top\\\"><font face=\\\"Arial\\\" size=\\\"1\\\" color=\\\"black\\\"><b>$this->cellCount.</b></font></td>\n<td align=\\\"left\\\" valign =\\\"top\\\"><font face=\\\"Arial\\\" size=\\\"1\\\" color=\\\"black\\\"><b>$service_type<br><span class=\\\"locationColor\\\">$service_location</span></b></font></td>\n<td align=\\\"left\\\" valign =\\\"top\\\"><font face=\\\"Arial\\\" size=\\\"1\\\" color=\\\"black\\\"><b>$term1</b></font></td>\n<td align=\\\"left\\\" valign =\\\"top\\\"><font face=\\\"Arial\\\" size=\\\"1\\\" color=\\\"black\\\"><b>$term2</b></font></td>\n<td align=\\\"left\\\" valign =\\\"top\\\"><font face=\\\"Arial\\\" size=\\\"1\\\" color=\\\"black\\\"><b>$term3</b></font></td>\n<td align=\\\"left\\\" valign =\\\"top\\\"><font face=\\\"Arial\\\" size=\\\"1\\\" color=\\\"black\\\"><b>$term4</b></font></td>\n<td align=\\\"left\\\" valign =\\\"top\\\"><input type=\\\"text\\\" name=\\\"$comp\\\" id=\\\"$comp_a\\\" value=\\\"\\\" size=\\\"8\\\" maxlength=\\\"8\\\" disabled=\\\"disabled\\\" onClick=\\\"return fieldChange(this.value, '$this->cellCount$this->groupType', this.name);\\\"/ >\n</td>\n<td align=\\\"left\\\" valign =\\\"top\\\"><input type=\\\"text\\\" name=\\\"$comp\\\" id=\\\"$comp_a\\\" value=\\\"$rate_value\\\" size=\\\"8\\\" maxlength=\\\"8\\\" $disabled onClick=\\\"return fieldChange2(this.value, this.name)\\\"/ >\n</td>\n<td align=\\\"left\\\" valign =\\\"top\\\"><input type=\\\"text\\\" name=\\\"$comp\\\" id=\\\"$comp_a\\\" value=\\\"$rate_value\\\" size=\\\"8\\\" maxlength=\\\"8\\\" disabled=\\\"disabled\\\"/ >\n</td>\n\n<td align=\\\"left\\\" valign =\\\"top\\\"><input type=\\\"button\\\" name=\\\"save1\\\" value=\\\"Clear\\\" onClick=\\\"clearRowGroup('$comp_type','$comp','$this->cellCount$this->groupType')\\\"/>\n</td>\n</tr>\n\";\n\n$this->cellCount++;\n$this->cellRows++;\n}\n\n\n\n$checkString = null;\n}\n\n\n\n//this sets up the number of rows of a grouptype and creates the summary divs to delete in javascript\n switch($this->groupType) { \n case\"S\":\n $this->singleRows = $this->cellCount-1;\n $this->singleSummaryDivs= $this->createSummaryDivs($this->singleRows, $this->groupType);\n break;\n case\"F\":\n $this->familyRows = $this->cellRows-1;\n $this->familySummaryDivs= $this->createSummaryDivs($this->familyRows, $this->groupType);\n break;\n case\"B\":\n $this->businessRows = $this->cellRows-1;\n $this->businessSummaryDivs= $this->createSummaryDivs($this->businessRows, $this->groupType);\n break;\n case\"O\":\n $this->organizationRows = $this->cellRows-1;\n $this->organizationSummaryDivs= $this->createSummaryDivs($this->organizationRows, $this->groupType);\n break;\n }\n\nreturn \"$records\";\n\n\n\n}", "public function getServices(): array;", "public function getGroups() {}", "private function getServiceGroups(int $serviceId)\n {\n $host = Host::getInstance($this->dependencyInjector);\n $servicegroup = ServiceGroup::getInstance($this->dependencyInjector);\n $this->serviceCache[$serviceId]['sg'] = $servicegroup->getServiceGroupsForStpl($serviceId);\n foreach ($this->serviceCache[$serviceId]['sg'] as &$sg) {\n if ($host->isHostTemplate($this->currentHostId, $sg['host_host_id'])) {\n $servicegroup->addServiceInSg(\n $sg['servicegroup_sg_id'],\n $this->currentServiceId,\n $this->currentServiceDescription,\n $this->currentHostId,\n $this->currentHostName\n );\n Relations\\ServiceGroupRelation::getInstance($this->dependencyInjector)->addRelationHostService(\n $sg['servicegroup_sg_id'],\n $sg['host_host_id'],\n $serviceId\n );\n }\n }\n }", "function projectgroups_to_soap($pg_arr) {\n\t$return = array();\n\tfor ($i=0; $i<count($pg_arr); $i++) {\n\t\tif (!is_a($pg_arr[$i], 'ProjectGroup') || $pg_arr[$i]->isError()) {\n\t\t\t//skip if error\n\t\t} else {\n\t\t\t$return[]=array(\n\t\t\t\t'group_project_id'=>$pg_arr[$i]->data_array['group_project_id'],\n\t\t\t\t'group_id'=>$pg_arr[$i]->data_array['group_id'],\n\t\t\t\t'name'=>$pg_arr[$i]->data_array['project_name'],\n\t\t\t\t'description'=>$pg_arr[$i]->data_array['description'],\n\t\t\t\t'is_public'=>$pg_arr[$i]->data_array['is_public'],\n\t\t\t\t'send_all_posts_to'=>$pg_arr[$i]->data_array['send_all_posts_to']\n\t\t\t);\n\t\t}\n\t}\n\treturn $return;\n}", "public function getGroups(): array;", "public function postProcess(): void {\n $groupsToAddTo = (array) $this->getSubmittedValue('groups');\n $summaryInfo = ['groups' => [], 'tags' => []];\n foreach ($groupsToAddTo as $groupID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which groups were created vs already existed.\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => Group::get(FALSE)\n ->addWhere('id', '=', $groupID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n\n if ($this->getSubmittedValue('newGroupName')) {\n /* Create a new group */\n $groupsToAddTo[] = $groupID = Group::create(FALSE)->setValues([\n 'title' => $this->getSubmittedValue('newGroupName'),\n 'description' => $this->getSubmittedValue('newGroupDesc'),\n 'group_type' => $this->getSubmittedValue('newGroupType') ?? [],\n 'is_active' => TRUE,\n ])->execute()->first()['id'];\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => $this->getSubmittedValue('newGroupName'),\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n $tagsToAdd = (array) $this->getSubmittedValue('tag');\n foreach ($tagsToAdd as $tagID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which tags were created vs already existed.\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => Tag::get(FALSE)\n ->addWhere('id', '=', $tagID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n if ($this->getSubmittedValue('newTagName')) {\n $tagsToAdd[] = $tagID = Tag::create(FALSE)->setValues([\n 'name' => $this->getSubmittedValue('newTagName'),\n 'description' => $this->getSubmittedValue('newTagDesc'),\n 'is_selectable' => TRUE,\n 'used_for' => 'civicrm_contact',\n //NYSS new tags during import should be imported as keywords\n 'parent_id'\t=> 296,\n ])->execute()->first()['id'];\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => $this->getSubmittedValue('newTagName'),\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n // Store the actions to take on each row & the data to present at the end to the userJob.\n $this->updateUserJobMetadata('post_actions', [\n 'group' => $groupsToAddTo,\n 'tag' => $tagsToAdd,\n ]);\n $this->updateUserJobMetadata('summary_info', $summaryInfo);\n\n // If ACL applies to the current user, update cache before running the import.\n if (!CRM_Core_Permission::check('view all contacts')) {\n $userID = CRM_Core_Session::getLoggedInContactID();\n CRM_ACL_BAO_Cache::deleteEntry($userID);\n CRM_ACL_BAO_Cache::deleteContactCacheEntry($userID);\n }\n\n $this->runTheImport();\n }", "public function getServices()\n\t{\n\t\t$senddata= array();\n\t\t$finalsenddata= array();\n\t\t$services = Contactuspage::get()->toArray();\n\t\tforeach($services as $key=>$service)\n\t\t{\n\t\t\t$senddata['id'] \t\t\t= $service['id'];\n\t\t\t$senddata['title'] \t\t\t= $service['title'];\n\t\t\t$senddata['content'] \t\t= $service['content'];\n\t\t\tarray_push($finalsenddata,$senddata);\n\t\t}\n\t\t$siteSettings = SiteSettings::find(1)->toArray();\n\t\t$data['status'] = 1;\n\t\t$data['msg'] = 'Successfull.';\n\t\t$data['heading_text'] = $siteSettings['service_header'];\n\t\t$data['data'] = $finalsenddata;\n\t\techo json_encode($data);\n\t}", "function nice_names($groups){\n\n $group_array=array();\n for ($i=0; $i<$groups[\"count\"]; $i++) { //for each group\n if (isset($groups[$i])) { // Patched by SysCo/al\n $line=trim($groups[$i]);\n \n if (strlen($line)>0){ \n //more presumptions, they're all prefixed with CN= (but no more yet, patched by SysCo/al\n //so we ditch the first three characters and the group\n //name goes up to the first comma\n $bits=explode(\",\",$line);\n if (1== count($bits)) {\n $group_array[]=$bits[0]; // Patched by SysCo/al\n } else {\n $prefix_len=strpos($bits[0], \"=\"); // Patched by SysCo/al to allow also various length (not only 3)\n if (FALSE === $prefix_len) {\n $group_array[]=$bits[0];\n } else {\n $group_array[]=substr($bits[0],$prefix_len+1); // Patched by SysCo/al\n }\n }\n }\n }\n }\n return ($group_array);\t\n }", "public function get_all_services_listing($data) {\n $this->db->select('*');\n $this->db->from('business_programs');\n $this->db->where('business_id', $data->business_id);\n $query = $this->db->get();\n $query_result = $query->result();\n $details = array();\n foreach ($query_result as $result) {\n $this->db->select('business_services.*,business_services_details.*');\n $this->db->from('business_services');\n $this->db->join('business_services_details', 'business_services.id = business_services_details.service_id');\n $this->db->where('business_services.program_id', $result->id);\n $query1 = $this->db->get();\n $query_result1 = $query1->result();\n array_push($details, $query_result1);\n }\n\n return $details;\n }", "public function getServices();", "protected function renderServicesList() {}", "function get_services($username) {\n\t\t$conn = db_connect();\n\t\t$result = $conn->query(\"select id,photo,service_name from services\");\n\t\tif (!$result)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t//create an array of the services\n\t\t$url_array = array();\n\t\tfor ($count = 1; $row = $result->fetch_row(); ++$count) {\n\t\t\t$url_array[$count][0] = $row[0];\n\t\t\t$url_array[$count][1] = $row[1];\n\t\t\t$url_array[$count][2] = $row[2];\t\n\t\t}\n\t\treturn $url_array;\n\t}", "private function createResourceGroups()\n {\n foreach ($this->api->getServices() as $service) {\n $this->resourceGroups[] = new ResourceGroup($service);\n }\n }", "public function groups();", "public function groups();", "function listServices()\n{\n global $LANG_ADMIN, $LANG_TRB, $_CONF, $_IMAGE_TYPE, $_TABLES;\n\n require_once $_CONF['path_system'] . 'lib-admin.php';\n\n $retval = '';\n\n $header_arr = array( # display 'text' and use table field 'field'\n array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false),\n array('text' => $LANG_TRB['service'], 'field' => 'name', 'sort' => true),\n array('text' => $LANG_TRB['ping_method'], 'field' => 'method', 'sort' => true),\n array('text' => $LANG_TRB['service_ping_url'], 'field' => 'ping_url', 'sort' => true),\n array('text' => $LANG_ADMIN['enabled'], 'field' => 'is_enabled', 'sort' => false)\n );\n\n $defsort_arr = array('field' => 'name', 'direction' => 'asc');\n\n $menu_arr = array (\n array('url' => $_CONF['site_admin_url'] . '/trackback.php?mode=editservice',\n 'text' => $LANG_ADMIN['create_new']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home']));\n\n $retval .= COM_startBlock($LANG_TRB['services_headline'], '',\n COM_getBlockTemplate('_admin_block', 'header'));\n\n $retval .= ADMIN_createMenu(\n $menu_arr,\n $LANG_TRB['service_explain'],\n $_CONF['layout_url'] . '/images/icons/trackback.' . $_IMAGE_TYPE\n );\n\n $text_arr = array(\n 'has_extras' => true,\n 'form_url' => $_CONF['site_admin_url'] . '/trackback.php',\n 'help_url' => getHelpUrl() . '#ping'\n );\n\n $query_arr = array(\n 'table' => 'pingservice',\n 'sql' => \"SELECT * FROM {$_TABLES['pingservice']} WHERE 1=1\",\n 'query_fields' => array('name', 'ping_url'),\n 'default_filter' => \"\",\n 'no_data' => $LANG_TRB['no_services']\n );\n\n // this is a dummy variable so we know the form has been used if all services\n // should be disabled in order to disable the last one.\n $form_arr = array('bottom' => '<input type=\"hidden\" name=\"serviceChanger\" value=\"true\"' . XHTML . '>');\n\n $retval .= ADMIN_list('pingservice', 'ADMIN_getListField_trackback',\n $header_arr, $text_arr, $query_arr, $defsort_arr,\n '', SEC_createToken(), '', $form_arr);\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n\n if ($_CONF['trackback_enabled']) {\n $retval .= freshTrackback ();\n }\n if ($_CONF['pingback_enabled']) {\n $retval .= freshPingback ();\n }\n\n return $retval;\n}", "private function _getServiceList()\n {\n Modules_CustomServices_DataLayer::init();\n $configs = Modules_CustomServices_DataLayer::loadServiceConfigurations();\n\n // Configs are objects, but the list view needs associative arrays.\n $config_to_array = function($config) {\n return [\n 'name' => '<a href=\"' . htmlspecialchars(pm_Context::getActionUrl('index', 'view') . '/id/' . urlencode($config->unique_id)) . '\">' . htmlspecialchars($config->display_name) . '</a>',\n 'type' => self::_configTypeName($config->config_type),\n 'plesk_service_id' => '<code>' . htmlspecialchars('ext-' . pm_Context::getModuleId() . '-' . $config->unique_id) . '</code>',\n 'run_as_user' => $config->run_as_user\n ];\n };\n $data = array_map($config_to_array, $configs);\n\n // Prepare the list for presentation.\n $list = new pm_View_List_Simple($this->view, $this->_request);\n $list->setData($data);\n $list->setColumns([\n 'name' => [\n 'title' => 'Name',\n 'noEscape' => TRUE,\n 'searchable' => TRUE,\n 'sortable' => TRUE\n ],\n 'type' => [\n 'title' => 'Type',\n 'noEscape' => FALSE,\n 'searchable' => FALSE,\n 'sortable' => FALSE\n ],\n 'plesk_service_id' => [\n 'title' => 'Service ID',\n 'noEscape' => TRUE,\n 'searchable' => TRUE,\n 'sortable' => FALSE\n ],\n 'run_as_user' => [\n 'title' => 'System user',\n 'noEscape' => FALSE,\n 'searchable' => TRUE,\n 'sortable' => TRUE\n ]\n ]);\n $list->setDataUrl(['action' => 'list-data']);\n $list->setTools([\n [\n 'title' => 'Add service (simple)',\n 'description' => 'Add a new service that wraps a process',\n 'class' => 'sb-add-new',\n 'link' => pm_Context::getActionUrl('index', 'add') . '/type/process'\n ],\n [\n 'title' => 'Add service (manual)',\n 'description' => 'Add a new manually controlled service',\n 'class' => 'sb-add-new',\n 'link' => pm_Context::getActionUrl('index', 'add') . '/type/manual'\n ]\n ]);\n return $list;\n }" ]
[ "0.7273374", "0.6778936", "0.6749087", "0.6406331", "0.62079006", "0.6124561", "0.59665525", "0.59389305", "0.59389305", "0.5936661", "0.5882174", "0.5875401", "0.58657116", "0.5856064", "0.58487016", "0.58009297", "0.5778471", "0.5732113", "0.5716035", "0.5713535", "0.56948304", "0.5686499", "0.56815195", "0.56740105", "0.56707895", "0.5668116", "0.56383055", "0.56383055", "0.5621682", "0.56177944" ]
0.802006
0
/ Preprocess all of the data for hostgroups display/output
function get_hostgroup_data() { global $NagiosData; global $NagiosUser; $hostgroups = $NagiosData->getProperty('hostgroups'); $hosts = $NagiosData->getProperty('hosts'); $hostgroup_data = array(); foreach ($hostgroups as $group => $members) { $hostgroup_data[$group] = array( 'member_data' => array(), 'host_counts' => get_state_of('hosts', build_hostgroup_details($members)), 'service_counts' => get_state_of('services', build_host_servicegroup_details($members)) ); //skip ahead if there are no authorized hosts if(array_sum($hostgroup_data[$group]['host_counts'])==0) continue; //skip empty groups foreach ($members as $member) { if(!$NagiosUser->is_authorized_for_host($member)) continue; //user-level filtering $host = $hosts[$member]; process_host_status_keys($host); $hostgroup_data[$group]['member_data'][$member]['host_name'] = $host['host_name']; $hostgroup_data[$group]['member_data'][$member]['host_state'] = $host['current_state']; $hostgroup_data[$group]['member_data'][$member]['state_class'] = get_color_code($host); $hostgroup_data[$group]['member_data'][$member]['services'] = array(); $hostgroup_data[$group]['member_data'][$member]['host_url'] = BASEURL.'index.php?type=hostdetail&name_filter='.urlencode($host['host_name']); if (isset($host['services'])) { foreach($host['services'] as $service) { if(!$NagiosUser->is_authorized_for_service($member,$service['service_description'])) continue; //user-level filtering process_service_status_keys($service); $service_data = array( 'state_class' => get_color_code($service), 'description' => $service['service_description'], 'service_url' => htmlentities(BASEURL.'index.php?type=servicedetail&name_filter='.$service['service_id']), ); $hostgroup_data[$group]['member_data'][$member]['services'][] = $service_data; } } } } return $hostgroup_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function preprocessData() {}", "function build_hostgroup_details($group_members) //make this return the totals array for hosts and services \n{\n\tglobal $NagiosData;\n\tglobal $NagiosUser; \n\t\n\t$hosts = $NagiosData->getProperty('hosts');\n\t\n//\t//add filter for user-level filtering \n//\tif(!$NagiosUser->is_admin()) {\n\t\t//print $type; \n//\t\t$hosts = user_filtering($hosts,'hosts'); \t\n//\t}\n\n\t$hostgroup_details = array();\n\tforeach($group_members as $member)\n\t{\n\t\tif($NagiosUser->is_authorized_for_host($member)) //user-level filtering \n\t\t\t$hostgroup_details[] = $hosts[$member];\n\t}\n\n\treturn $hostgroup_details;\n}", "private function organize_data(){\n\t\t$this->grab_data();\n\t\t$this->adjust_graph_dimensions();\n\t\t$this->draw_graphs();\n\t\t$this->draw_axes();\n\t\treturn;\n\t}", "function process_host_disp($desmhash, $summary_data_array, $dev_data_array)\n{\n global $data_totals;\n global $config;\n\n $devs = $activedevs = $max_temp = $fivesmhash = $fivesmhashper = $avgmhper = 0;\n $fivesmhashcol = $avgmhpercol = $rejectscol = $discardscol = $stalescol = $getfailscol = $remfailscol = \"\";\n $rejects = $discards = $stales = $getfails = $remfails = '---';\n $row = \"\";\n\n if ($summary_data_array != null)\n {\n if ($dev_data_array != null)\n $devs = process_host_devs($dev_data_array, $activedevs, $fivesmhash, $max_temp);\n\n $thisstatus = $summary_data_array['STATUS'][0]['STATUS'];\n $avgmhash = $summary_data_array['SUMMARY'][0]['MHS av'];\n $accepted = $summary_data_array['SUMMARY'][0]['Accepted'];\n $rejected = $summary_data_array['SUMMARY'][0]['Rejected'];\n $discarded = $summary_data_array['SUMMARY'][0]['Discarded'];\n $stale = $summary_data_array['SUMMARY'][0]['Stale'];\n $getfail = $summary_data_array['SUMMARY'][0]['Get Failures'];\n $remfail = $summary_data_array['SUMMARY'][0]['Remote Failures'];\n $utility = $summary_data_array['SUMMARY'][0]['Utility'];\n\n if (isset($accepted) && $accepted !== 0)\n {\n $rejects = round(100 / $accepted * $rejected, 1) . \" %\";\n $discards = round(100 / $accepted * $discarded,1) . \" %\";\n $stales = round(100 / $accepted * $stale, 1) . \" %\";\n $getfails = round(100 / $accepted * $getfail, 1) . \" %\";\n $remfails = round(100 / $accepted * $remfail, 1) . \" %\";\n \n $rejectscol = set_color_high($rejects, $config->yellowrejects, $config->maxrejects); // Rejects\n $discardscol = set_color_high($discards, $config->yellowdiscards, $config->maxdiscards); // Discards\n $stalescol = set_color_high($stales, $config->yellowstales, $config->maxstales); // Stales\n $getfailscol = set_color_high($getfails, $config->yellowgetfails, $config->maxgetfails); // Get fails\n $remfailscol = set_color_high($remfails, $config->yellowremfails, $config->maxremfails); // Rem fails\n }\n\n if ($desmhash > 0)\n {\n // Desired Mhash vs. 5s mhash\n $fivesmhashper = round(100 / $desmhash * $fivesmhash, 1);\n $fivesmhashcol = set_color_low($fivesmhashper, $config->yellowgessper, $config->maxgessper);\n\n // Desired Mhash vs. avg mhash\n $avgmhper = round(100 / $desmhash * $avgmhash, 1);\n $avgmhpercol = set_color_low($avgmhper, $config->yellowavgmhper, $config->maxavgmhper);\n }\n\n $tempcol = set_color_high($max_temp, $config->yellowtemp, $config->maxtemp); // Temperature\n $thisstatuscol = ($thisstatus == \"S\") ? \"class=green\" : \"class=yellow\"; // host status\n $thisdevcol = ($activedevs == $devs) ? \"class=green\" : \"class=red\"; // active devs\n\n\t$row = \"\n <td $thisstatuscol>$thisstatus</td>\n <td $thisdevcol>$activedevs/$devs</td>\n <td $tempcol>$max_temp</td>\n <td>$desmhash</td>\n <td>$utility</td>\n <td $fivesmhashcol>$fivesmhash<BR>$fivesmhashper %</td>\n <td $avgmhpercol>$avgmhash<BR>$avgmhper %</td>\n <td $rejectscol>$rejected<BR>$rejects</td>\n <td $discardscol>$discarded<BR>$discards</td>\n <td $stalescol>$stale<BR>$stales</td>\n <td $getfailscol>$getfail<BR>$getfails</td>\n <td $remfailscol>$remfail<BR>$remfails</td>\";\n\n // Sum Stuff\n $data_totals['hosts']++;\n $data_totals['devs'] += $devs;\n $data_totals['activedevs'] += $activedevs;\n $data_totals['maxtemp'] = ($data_totals['maxtemp'] > $max_temp) ? $data_totals['maxtemp'] : $max_temp;\n $data_totals['desmhash'] += $desmhash;\n $data_totals['utility'] += $utility;\n $data_totals['fivesmhash'] += $fivesmhash;\n $data_totals['avemhash'] += $avgmhash;\n $data_totals['accepts'] += $accepted;\n $data_totals['rejects'] += $rejects;\n $data_totals['discards'] += $discards;\n $data_totals['stales'] += $stales;\n $data_totals['getfails'] += $getfails;\n $data_totals['remfails'] += $remfails;\n }\n\n return $row;\n}", "protected function collectDataGroup()\n {\n $url = $this->getGroupURI();\n $this->collectDeals($url);\n }", "function get_host_summary($host_data)\n{\n $hostid = $host_data['id'];\n $name = $host_data['name'];\n $host = $host_data['address'];\n $hostport = $host_data['port'];\n $desmhash = $host_data['mhash_desired'];\n $host_row = \"\";\n\n $arr = array ('command'=>'summary','parameter'=>'');\n $summary_arr = send_request_to_host($arr, $host_data);\n\n if ($summary_arr != null)\n {\n $arr = array ('command'=>'devs','parameter'=>'');\n $dev_arr = send_request_to_host($arr, $host_data);\n\n $host_row = process_host_disp($desmhash, $summary_arr, $dev_arr);\n }\n else\n {\n // No data from host\n $error = socket_strerror(socket_last_error());\n $msg = \"Connection to $host:$hostport failed: \";\n $host_row = \"<td colspan='12'>$msg '$error'</td>\";\n }\n\n $host_row = \"<tbody><tr>\n <td><table border=0><tr>\n <td><a href=\\\"edithost.php?id=$hostid\\\"><img src=\\\"images/edit.png\\\" border=0></a></td>\n <td><a href=\\\"edithost.php?id=$hostid\\\">$name</a></td></td>\n </tr></table></td>\"\n . $host_row .\n \"</tr></tbody>\";\n\n return $host_row;\n}", "private function collectAllData()\n {\n $this->getParsedHeader();\n $this->getServerConfig();\n $this->getPageTitle();\n $this->getLanguage();\n $this->getCharset();\n $this->getHeadingsCount();\n $this->getCanonicalLINKS();\n $this->getAllLinksData();\n }", "function process_devs_disp($host_data)\n{\n global $id;\n\n $i = 0;\n $table = \"\";\n\n $arr = array ('command'=>'devs','parameter'=>'');\n $devs_arr = send_request_to_host($arr, $host_data);\n\n if ($devs_arr != null)\n {\n $id = $host_data['id'];\n while (isset($devs_arr['DEVS'][$i]))\n {\n $table .= process_dev_disp($devs_arr['DEVS'][$i]);\n $i++;\n }\n }\n\n return $table;\n}", "private function parse()\n\t{\n\t\t// parse datagrids\n\t\tif(!empty($this->datagrids)) $this->tpl->assign('datagrids', $this->datagrids);\n\t}", "function process_pools_disp($host_data, $edit=false)\n{\n $i = 0;\n $table = \"\";\n\n\n $arr = array ('command'=>'pools','parameter'=>'');\n $pool_arr = send_request_to_host($arr, $host_data);\n\n if ($pool_arr != null)\n {\n while (isset($pool_arr['POOLS'][$i]))\n {\n $table .= process_pool_disp($pool_arr['POOLS'][$i], $edit);\n $i++;\n }\n }\n return $table;\n}", "public function postProcess(): void {\n $groupsToAddTo = (array) $this->getSubmittedValue('groups');\n $summaryInfo = ['groups' => [], 'tags' => []];\n foreach ($groupsToAddTo as $groupID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which groups were created vs already existed.\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => Group::get(FALSE)\n ->addWhere('id', '=', $groupID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n\n if ($this->getSubmittedValue('newGroupName')) {\n /* Create a new group */\n $groupsToAddTo[] = $groupID = Group::create(FALSE)->setValues([\n 'title' => $this->getSubmittedValue('newGroupName'),\n 'description' => $this->getSubmittedValue('newGroupDesc'),\n 'group_type' => $this->getSubmittedValue('newGroupType') ?? [],\n 'is_active' => TRUE,\n ])->execute()->first()['id'];\n $summaryInfo['groups'][$groupID] = [\n 'url' => CRM_Utils_System::url('civicrm/group/search', 'reset=1&force=1&context=smog&gid=' . $groupID),\n 'name' => $this->getSubmittedValue('newGroupName'),\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n $tagsToAdd = (array) $this->getSubmittedValue('tag');\n foreach ($tagsToAdd as $tagID) {\n // This is a convenience for now - really url & name should be determined at\n // presentation stage - ie the summary screen. The only info we are really\n // preserving is which tags were created vs already existed.\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => Tag::get(FALSE)\n ->addWhere('id', '=', $tagID)\n ->addSelect('name')\n ->execute()\n ->first()['name'],\n 'new' => TRUE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n if ($this->getSubmittedValue('newTagName')) {\n $tagsToAdd[] = $tagID = Tag::create(FALSE)->setValues([\n 'name' => $this->getSubmittedValue('newTagName'),\n 'description' => $this->getSubmittedValue('newTagDesc'),\n 'is_selectable' => TRUE,\n 'used_for' => 'civicrm_contact',\n //NYSS new tags during import should be imported as keywords\n 'parent_id'\t=> 296,\n ])->execute()->first()['id'];\n $summaryInfo['tags'][$tagID] = [\n 'url' => CRM_Utils_System::url('civicrm/contact/search', 'reset=1&force=1&context=smog&id=' . $tagID),\n 'name' => $this->getSubmittedValue('newTagName'),\n 'new' => FALSE,\n 'added' => 0,\n 'notAdded' => 0,\n ];\n }\n // Store the actions to take on each row & the data to present at the end to the userJob.\n $this->updateUserJobMetadata('post_actions', [\n 'group' => $groupsToAddTo,\n 'tag' => $tagsToAdd,\n ]);\n $this->updateUserJobMetadata('summary_info', $summaryInfo);\n\n // If ACL applies to the current user, update cache before running the import.\n if (!CRM_Core_Permission::check('view all contacts')) {\n $userID = CRM_Core_Session::getLoggedInContactID();\n CRM_ACL_BAO_Cache::deleteEntry($userID);\n CRM_ACL_BAO_Cache::deleteContactCacheEntry($userID);\n }\n\n $this->runTheImport();\n }", "function PreProcessItemDataGroups()\n {\n $this->Import_Datas=array(\"Name\",\"Email\");\n array_unshift($this->ItemDataGroupPaths,\"../EventApp/System/Inscriptions\");\n }", "public function doProcessData() {}", "public function process()\n\t{\t\t\n\t\t$sImage = Phpfox::getLib('image.helper')->display(array_merge(array('user' => Phpfox::getService('user')->getUserFields(true)), array(\t\t\t\t\n\t\t\t\t\t'path' => 'core.url_user',\n\t\t\t\t\t'file' => Phpfox::getUserBy('user_image'),\n\t\t\t\t\t'suffix' => '_120',\n\t\t\t\t\t'max_width' => 100,\n\t\t\t\t\t'max_height' => 100\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t$aGroup = Phpfox::getService('user.group')->getGroup(Phpfox::getUserBy('user_group_id'));\n\t\t\n\t\t$this->template()->assign(array(\n\t\t\t\t'aUserGroup' => $aGroup,\n\t\t\t\t'sImage' => $sImage,\t\t\t\t\n\t\t\t\t'aDashboards' => Phpfox::getService('core')->getDashboardLinks(),\n\t\t\t\t'sBlockLocation' => Phpfox::getLib('module')->getBlockLocation('core.dashboard'),\n\t\t\t\t'sTotalUserViews' => Phpfox::getUserBy('total_view'),\n\t\t\t\t'sLastLogin' => Phpfox::getLib('date')->convertTime(Phpfox::getUserBy('last_login'), 'core.profile_time_stamps')\n\t\t\t)\n\t\t);\t\t\n\t\t\n\t\tif (!PHPFOX_IS_AJAX)\n\t\t{\n\t\t\t$aMenus = array();\n\t\t\tforeach (Phpfox::getService('core')->getDashboardMenus() as $sPhrase => $sLink)\n\t\t\t{\n\t\t\t\t$aMenus[Phpfox::getPhrase($sPhrase)] = $sLink;\n\t\t\t}\n\t\t\t\n\t\t\t$this->template()->assign(array(\n\t\t\t\t\t'sHeader' => Phpfox::getPhrase('core.dashboard'),\t\t\t\t\t\n\t\t\t\t\t'aMenu' => $aMenus\n\t\t\t\t)\n\t\t\t);\t\t\t\n\t\t\t\n\t\t\treturn 'block';\n\t\t}\n\t}", "public function fetchGroupData() {}", "public function fetchGroupData() {}", "function process_host_info($host_data)\n{\n global $API_version;\n global $CGM_version;\n\n $arr = array ('command'=>'config','parameter'=>'');\n $config_arr = send_request_to_host($arr, $host_data);\n \n $arr = array ('command'=>'summary','parameter'=>'');\n $summary_arr = send_request_to_host($arr, $host_data);\n \n $up_time = $summary_arr['SUMMARY']['0']['Elapsed'];\n $days = floor($up_time / 86400);\n $up_time -= $days * 86400;\n $hours = floor($up_time / 3600);\n $up_time -= $hours * 3600;\n $mins = floor($up_time / 60);\n $seconds = $up_time - ($mins * 60);\n \n $output = \"\n <tr>\n <th>CGminer version</th>\n <th>API version</th>\n <th>Up time</th>\n <th>Found H/W</th>\n <th>Using ADL</th>\n <th>Pools and Strategy</th>\n </tr>\n <tr>\n <td>\".$CGM_version.\"</td>\n <td>\".$API_version.\"</td>\n <td>\".$days.\"d \".$hours.\"h \".$mins.\"m \".$seconds.\"s</td>\n <td>\".$config_arr['CONFIG']['0']['CPU Count'].\" CPUs, \".$config_arr['CONFIG']['0']['GPU Count'].\" GPUs, \".$config_arr['CONFIG']['0']['BFL Count'].\" BFLs</td>\n <td>\".$config_arr['CONFIG']['0']['ADL in use'].\"</td>\n <td>\".$config_arr['CONFIG']['0']['Pool Count'].\" pools, using \".$config_arr['CONFIG']['0']['Strategy'].\"</td>\n </tr>\";\n\n return $output;\n}", "function _hosts()\n{\n $c = \"# Generated with beatnik on \" . date('Y-m-d h:i:s') . \" by \" . $GLOBALS['username'] . \"\\n\\n\";\n foreach ($GLOBALS['domains'] as $domain) {\n\n $zonename = $domain['zonename'];\n $tld = substr($zonename, strrpos($zonename, '.')+1);\n $domain = substr($zonename, 0, strrpos($zonename, '.'));\n\n foreach ($zonedata['cname'] as $id => $values) {\n extract($values);\n if (!empty($hostname)) {\n $hostname .= '.';\n }\n $c .= \"$pointer $hostname.$domain.$tld\\n\";\n }\n }\n\n return $c;\n}", "private function parseGroups()\n\t{\n\t\t/**\n\t\t * Grupos\n\t\t */\n\t\t$groups = $this->habbo->groups;\n\n\t\t/**\n\t\t * Convertirlos a Entity\n\t\t */\n\t\tforeach( $groups as $group )\n\t\t\t$this->addGroup( new Group( $group ) );\n\t}", "private function processExtraData() {\n $benchsDatasize = $this->dbConnection->get_rows(\"SELECT DISTINCT bench_type,bench,datasize FROM aloja2.execs e WHERE 1 AND valid = 1 AND filter = 0 \".DBUtils::getFilterExecs().\" GROUP BY bench_type,bench,datasize ORDER BY bench ASC \");\n $dataBenchs = array();\n $availDatasizes = array();\n foreach($benchsDatasize as $row) {\n $datasize = $this->roundDatasize($row['datasize']);\n if(!isset($availDatasizes[$row['bench_type']]) ||\n !isset($availDatasizes[$row['bench_type']][$row['bench']]) ||\n !in_array($datasize, $availDatasizes[$row['bench_type']][$row['bench']])) {\n $dataBenchs[$row['bench_type']][$row['bench']][] = $row['datasize'];\n $availDatasizes[$row['bench_type']][$row['bench']][] = $datasize;\n }\n }\n\n $this->additionalFilters['datasizesInfo'] = json_encode($dataBenchs);\n\n //Getting scale factors per bench\n $scaleFactors = array();\n $benchsScaleFactors = $this->dbConnection->get_rows(\"SELECT DISTINCT bench_type,bench,scale_factor FROM aloja2.execs e WHERE 1 AND valid = 1 AND filter = 0 \".DBUtils::getFilterExecs().\" GROUP BY bench_type,bench,scale_factor ORDER BY bench ASC \");\n foreach($benchsScaleFactors as $row) {\n $scaleFactor = $row['scale_factor'];\n $scaleFactors[$row['bench_type']][$row['bench']][] = $scaleFactor;\n }\n\n $this->additionalFilters['scaleFactorsInfo'] = json_encode($scaleFactors);\n\n //Getting providers / clusters\n $providerClusters = array();\n $clusters = $this->dbConnection->get_rows(\"SELECT provider,id_cluster FROM aloja2.clusters ORDER BY provider DESC \");\n foreach($clusters as $row) {\n $providerClusters[$row['provider']][] = $row['id_cluster'];\n }\n\n $this->additionalFilters['providerClusters'] = json_encode($providerClusters);\n }", "function processData() ;", "function build_host_servicegroup_details($group_members) \n{\n\tglobal $NagiosData;\n\tglobal $NagiosUser; \n\t$hosts = $NagiosData->getProperty('hosts');\n\t\n\n\t$servicegroup_details = array();\n\tforeach($group_members as $member)\n\t{\n\t\tif($NagiosUser->is_authorized_for_host($member)) //user-level filtering \n\t\t{\n\t\t\tif (isset($hosts[$member]['services']))\n\t\t\t\tforeach ($hosts[$member]['services'] as $service) \n\t\t\t\t{\n\t\t\t\t\tif($NagiosUser->is_authorized_for_service($member,$service)) //user-level filtering \n\t\t\t\t\t\t$servicegroup_details[] = $service;\t\n\t\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t}\n\treturn $servicegroup_details;\n}", "public function processData() {}", "function PostProcessItemDataGroups()\n {\n $this->AddEventQuestDataGroups();\n }", "protected function parse()\n\t{\n\t\tparent::parse();\n\n\t\t// assign the datagrid\n\t\t$this->tpl->assign('dataGrid', ($this->dataGrid->getNumResults() != 0) ? $this->dataGrid->getContent() : false);\n\t}", "function fillGroups() \n\t{\n\t\t$this->groups[] = array(-1,\"<\".\"Admin\".\">\");\n\t\t$this->groupFullChecked[] = true;\n\t\t\n\t\t$trs = db_query(\"select , from `uggroups` order by \",$this->conn);\n\t\twhile($tdata = db_fetch_numarray($trs))\n\t\t{\n\t\t\t$this->groups[] = array($tdata[0],$tdata[1]);\n\t\t\t$this->groupFullChecked[] = true;\n\t\t}\n\t}", "private function normalize()\n {\n $field_id = isset($this->columns[0]) ? $this->columns[0] : 'id';\n\n $field_text = isset($this->columns[1]) ? $this->columns[1] : $field_id;\n\n $groups = [];\n\n $has_empty_groups = false;\n\n foreach ($this->data as $key => $datum) {\n $has_empty_groups = !is_numeric($key);\n }\n\n foreach ($this->data as $key => $datum) {\n if (is_array($datum) && isset($datum['id']) && isset($datum['text'])) {\n $this->push($datum);\n\n continue;\n }\n\n if (is_numeric($key)) {\n if (is_string($datum)) {\n $datum = [$datum];\n }\n\n $id = multi_dot_call($datum, $field_id);\n $id = $id === null ? (string) multi_dot_call($datum, '0') : (string) $id;\n\n $text = multi_dot_call($datum, $field_text);\n if (is_array($text)) {\n $lang = App::getLocale();\n $text = $text[$lang] ?? implode($this->separator, $text);\n }\n $text = $text === null ? (string) multi_dot_call($datum, '0') : (string) $text;\n\n if ($id && $text) {\n $text = $id . \") \" . $text;\n }\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n if ($t) {\n $text .= $this->separator.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n if (!$has_empty_groups) {\n $this->push($item);\n } else {\n $groups['Other'][] = $item;\n }\n } else {\n $groups[ucfirst($key)] = $datum;\n }\n }\n\n foreach ($groups as $group_name => $group) {\n $this->push([\n 'text' => $group_name,\n 'children' => collect($group)->map(function ($datum) use ($field_id, $field_text) {\n if (is_string($datum)) {\n $datum = [$field_id => $datum, $field_text => $datum];\n }\n\n $id = (string) multi_dot_call($datum, $field_id);\n\n $text = (string) multi_dot_call($datum, $field_text);\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n\n if ($t) {\n $text .= ' '.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n return $item;\n })->toArray()\n ]);\n }\n }", "function setupNewsgroups() {\n\t\t$this->setIfNot('hdr_group', 'free.pt');\n\t\t$this->setIfNot('nzb_group', 'alt.binaries.ftd');\n\t\t$this->setIfNot('comment_group', 'free.usenet');\n\t\t$this->setIfNot('report_group', 'free.willey');\n\t\t$this->setIfNot('report_group', 'free.willey');\n\t}", "function automap_filter_by_group(&$obj, $params) {\n if(!isset($params['filter_group']) || $params['filter_group'] == '')\n return;\n\n global $_BACKEND;\n $_BACKEND->checkBackendExists($params['backend_id'][0], true);\n $_BACKEND->checkBackendFeature($params['backend_id'][0], 'getHostNamesInHostgroup', true);\n $hosts = $_BACKEND->getBackend($params['backend_id'][0])->getHostNamesInHostgroup($params['filter_group']);\n\n $allowed_ids = array_flip(automap_hostnames_to_object_ids($hosts));\n automap_filter_tree($allowed_ids, $obj);\n}", "protected function preProcess() {}" ]
[ "0.6212292", "0.5999573", "0.5980784", "0.59661335", "0.58540326", "0.57325333", "0.5715561", "0.570567", "0.55291766", "0.54855925", "0.54754", "0.54718333", "0.54636836", "0.54618704", "0.5395558", "0.5395558", "0.5338626", "0.53002626", "0.5298223", "0.5285552", "0.5221871", "0.52135575", "0.51702374", "0.5165483", "0.513577", "0.5111183", "0.5103645", "0.51015", "0.50697094", "0.5057907" ]
0.6840964
0
Determine whether the user can update the hour.
public function update($user, Hour $hour) { //Admin update: handled by middleware //Clock in & Mark here return isAdmin() || $hour->user_id === $user->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }", "public function update(): bool\n {\n return $this->isAllowed(self::UPDATE);\n }", "function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}", "static function canUpdate() {\n // as users can update their onw items\n return Session::haveRightsOr(self::$rightname, [\n CREATE,\n UPDATE,\n self::MANAGE_BG_EVENTS\n ]);\n }", "public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function canUpdate()\n {\n return $this->hasStrategy(self::STRATEGY_UPDATE);\n }", "function canUpdateItem() {\n\n $ticket = new Ticket();\n if (!$ticket->getFromDB($this->fields['tickets_id'])) {\n return false;\n }\n\n // you can't change if your answer > 12h\n if (!is_null($this->fields['date_answered'])\n && ((strtotime(\"now\") - strtotime($this->fields['date_answered'])) > (12*HOUR_TIMESTAMP))) {\n return false;\n }\n\n if ($ticket->isUser(CommonITILActor::REQUESTER, Session::getLoginUserID())\n || ($ticket->fields[\"users_id_recipient\"] === Session::getLoginUserID() && Session::haveRight('ticket', Ticket::SURVEY))\n || (isset($_SESSION[\"glpigroups\"])\n && $ticket->haveAGroup(CommonITILActor::REQUESTER, $_SESSION[\"glpigroups\"]))) {\n return true;\n }\n return false;\n }", "function updatesAllowed() {\n\t\treturn $this->getupdatable() == 1 ? true : false;\n\t}", "protected function _isAllowed()\r\n {\r\n return $this->_authorization->isAllowed('AAllen_PriceUpdate::update');\r\n }", "public function markUserAsUpdated(): bool\n {\n return $this->fill([$this->UPDATECOLUMN, Chronos::date()->stamp()])\n ->save();\n }", "public function isUpdateSecurityRelevant() {}", "public function executeUpdate(): bool\n {\n $this->updateDaysallowedField();\n return true;\n }", "function canUpdateUser($userid){\r\n\t\t$permissions = new dkpUserPermissions();\r\n\t\t$permissions->loadUserPermissions($userid);\r\n\r\n\t\t//make sure we are trying to edit a user who really belongs to our guild\r\n\t\tif($permissions->guildid != $this->guild->id || !$this->HasPermission(\"AccountSecondaryUsers\"))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public function update(User $user)\n {\n return $user->hasAccess(['update-zones']);\n }", "public function isNeedUpdate()\n {\n if (is_null($this['episode_update_date'])){\n return true;\n }\n if (Carbon::now()->diffInDays(new Carbon($this['episode_update_date'])) > 3){\n return true;\n }\n return false;\n }", "public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\t$this->workFunction = $this->route('workFunction');\n\t\treturn $this->user()->can('update', $this->workplace) && $this->user()->can('update', $this->workFunction);\n\t}", "public function view(User $user, Hour $hour)\n {\n //Handled by controller\n return $user->isAdmin() || $user->id === $hour->user_id;\n }", "public function needUpdate()\n\t{\n\t\treturn ($this->getLastUpdate() == null || time() - $this->getLastUpdate()->format('U') > 1 * 60);\n\t}", "public function isUpdateRequired();", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "protected function canUpdate(){\n $emptyComment = $this->getEmptyComment();\n\n return $this->canUserModify() &&\n ($this->isActive() || $this->isPending() ||\n ($this->isSuspended() && parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $emptyComment))) &&\n !$this->isDeleted() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE, $emptyComment);\n }", "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "public function hasUserUpdated(): bool\n {\n return !is_null($this->getUserUpdatedDate());\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "public function authorize()\n {\n return $this->user()->can('update_users');\n }", "public function hasUpdateFor($user) \n {\n return $this->updated_at > cache()->store('redis')->get($user->getCacheKeyName($this));\n }", "public function authorize()\n {\n return $this->user()->canUpdateSecurity();\n }", "function is_updated($updated_at)\n{\n $now = time() - 60;\n $updated_at = strtotime($updated_at);\n if ($updated_at > $now) {\n return true;\n }\n\n return false;\n}" ]
[ "0.6577235", "0.6414075", "0.63316137", "0.6286341", "0.6232825", "0.61627585", "0.6065074", "0.60233814", "0.5983474", "0.59746933", "0.5972358", "0.5967766", "0.5873201", "0.58672684", "0.58431685", "0.5793943", "0.5787063", "0.5767391", "0.576029", "0.5743483", "0.57411474", "0.5727966", "0.57063085", "0.57063085", "0.56981987", "0.5691673", "0.56913096", "0.5690894", "0.5674055", "0.5655672" ]
0.7107028
0
Determine whether the user can delete the hour.
public function delete($user, Hour $hour) { if (!ClubHelper::settings($hour->club->id)->allow_delete && !isAdmin()) { return false; } return (!$hour->end_time) ? $hour->user_id === $user->id : isAdmin() === true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canDelete() {\n return true;\n }", "public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }", "public function canDelete()\n {\n return 1;\n }", "function canDelete($user) {\n if($this->getId() == $user->getId()) {\n return false; // user cannot delete himself\n } // if\n\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false; // only administrators can delete administrators\n } // if\n\n return $user->isPeopleManager();\n }", "function CanDelete()\n\t{\t\n\t\t\n\t\tif ($this->id && !$this->GetLocations() && $this->CanAdminUserDelete())\n\t\t{\n\t\t\t// courses\n\t\t\t$sql = \"SELECT cid FROM courses WHERE city=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->NumRows($result))\n\t\t\t\t{\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }", "function userCanDeleteUser( $sessionID, $username ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }", "public function canDelete()\n {\n return $this->canGet();\n }", "function canDelete(User $user) {\n return $user->canManageTrash();\n }", "public function canDelete()\n {\n return in_array('delete', $this->actions);\n }", "public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }", "function userCanDeleteInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}", "protected function canDelete($record) { return false; }", "function CanDelete()\n\t{\treturn !count($this->subpages) && $this->CanAdminUserDelete();\n\t}", "public function canDelete($userId = \"\")\n {\n\n if ($userId == \"\")\n $userId = Yii::$app->user->id;\n\n if ($this->user_id == $userId)\n return true;\n\n if (Yii::$app->user->isAdmin()) {\n return true;\n }\n\n if ($this->container instanceof Space && $this->container->isAdmin($userId)) {\n return true;\n }\n\n return false;\n }", "public function canBeDeleted() : bool\n\t{\n\t\t$countUsers = $this->users()->lockForUpdate()->count();\n\t\t$isFuture = $this->flight_at->isFuture();\n\n\t\tif ($countUsers === 0 && $isFuture) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isDelete();", "public function can_destroy() {\n $query = DB::connection()->prepare('SELECT * FROM Customervisit WHERE customer_id=:id LIMIT 1');\n $query->execute(array('id' => $this->id));\n $row = $query->fetch();\n //There should be no customervisits for customer.\n return empty($row);\n }", "function canDelete($user) {\n if($this->isOwner() || $user->getCompanyId() == $this->getId()) {\n return false; // Owner company cannot be deleted. Also, user cannot delete company he belongs to\n } // if\n return $user->isPeopleManager();\n }", "protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t return Factory::getUser()->authorise(\n\t\t\t\t\"core.delete\",\n\t\t\t\t\"com_dinning_philosophers.dinning_philosophers.\".$record->id\n\t\t\t);\n\t\t}\n\t}", "function canDelete(User $user) {\n return $user->isFinancialManager();\n }", "public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }", "public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }", "protected function canDelete($record)\n {\n return true;\n }", "public function testAllowDelete()\n {\n $this->logOut();\n $deleteFalse = LogEntry::create()->canDelete(null);\n $this->assertFalse($deleteFalse);\n\n $this->logInWithPermission('ADMIN');\n $deleteTrue = LogEntry::create()->canDelete();\n $this->assertTrue($deleteTrue);\n }", "function canTrash(User $user) {\n if ($this->object->getState() == STATE_TRASHED) {\n return false;\n } // if\n\n\t $user_id = $user->getId();\n\n\t if(!array_key_exists($user_id, $this->can_delete)) {\n\t\t if($this->object->isOwner() || $user->getCompanyId() == $this->object->getId()) {\n\t\t\t $this->can_delete[$user_id] = false;\n\t\t } else {\n\t\t\t $has_last_admin = false;\n\n\t\t\t $users = $this->object->users()->get($user);\n\t\t\t if(is_foreachable($users)) {\n\t\t\t\t foreach($users as $v) {\n\t\t\t\t\t if($v->isLastAdministrator()) {\n\t\t\t\t\t\t $this->can_delete[$user_id] = false;\n\n\t\t\t\t\t\t $has_last_admin = true;\n\t\t\t\t\t\t break;\n\t\t\t\t\t } // if\n\t\t\t\t } // foreach\n\t\t\t } // if\n\n\t\t\t if(!$has_last_admin) {\n\t\t\t\t $this->can_delete[$user_id] = $user->isPeopleManager();\n\t\t\t } // if\n\t\t } // if\n\t } // if\n\n\t return $this->can_delete[$user_id];\n }", "public function isDelete(): bool {}", "public function allowDeletion()\n {\n return $this->allowDeletion;\n }", "abstract function allowDeleteAction();" ]
[ "0.6598268", "0.6463188", "0.6421403", "0.6394378", "0.63207173", "0.6305876", "0.62952673", "0.62885714", "0.6287926", "0.6255046", "0.6253038", "0.61979914", "0.6140726", "0.61237246", "0.61187047", "0.6035367", "0.6009626", "0.5997746", "0.5984482", "0.59824955", "0.59698474", "0.5950162", "0.5945832", "0.5939882", "0.5936552", "0.5931771", "0.59313154", "0.5912436", "0.58877575", "0.5868895" ]
0.7176525
0
Determine whether the user can restore the hour.
public function restore(User $user, Hour $hour) { // Handled by admin middleware }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function can_restore() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'restore' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "public function isPasswordRecoveryEnabled();", "protected function isRestoring()\n {\n return $this->option('restore') == 'true';\n }", "public function restore(User $user)\n {\n return config('mailcare.auth') && config('mailcare.automations');\n }", "public function restore(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:restore')\n );\n }", "public function restore(User $user, Interview $interview)\n {\n return $user->hasPermissionTo('restore interview');\n }", "function wp_is_recovery_mode()\n {\n }", "public static function checkHours(): int\n {\n $closeHour = Carbon::createFromTime(17, 0, 0, 'UTC')->getTimestamp();\n $currentHour = Carbon::now('UTC')->getTimestamp();\n $currentDay = Carbon::now('UTC');\n $currentDay = $currentDay->dayOfWeek;\n $websiteSettings = WebsiteSettings::find(1);\n\n if ($currentDay !== 0 && $currentDay !== 6 && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n if ($currentDay === 6 && $currentHour < $closeHour && $websiteSettings['settings']['is_active'] !== 0) {\n return 0;\n }\n\n return 1;\n }", "public function hasValidResetKey()\n {\n return (boolean) $this->isActive() && $this->_getVar('user_resetkey_valid');\n }", "public function restore(User $user): bool\n {\n return $user->can('Restore Role');\n }", "public function restore($user, $model)\n {\n\n if( $user->hasPermissionTo('restore ' . static::$key) ) {\n return true;\n }\n\n return false;\n }", "public function isHour() : bool {\n $hoursArr = $this->taskDetails['hours'];\n $retVal = true;\n\n if ($hoursArr['every-hour'] !== true) {\n $retVal = false;\n $current = TasksManager::getHour();\n $ranges = $hoursArr['at-range'];\n\n foreach ($ranges as $range) {\n if ($current >= $range[0] && $current <= $range[1]) {\n $retVal = true;\n break;\n }\n }\n\n if ($retVal === false) {\n $retVal = $this->isHourHelper($hoursArr, $current);\n }\n }\n\n return $retVal;\n }", "protected function isActivatedViaStartDateAndTime() {}", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "public function remember()\r\n {\r\n $iNewTime = PHPFOX_TIME + (strtotime(\"+\" . Phpfox::getParam('waytime.time_remain_complete_waytime')) - time());\r\n return $this->database()->update(Phpfox::getT('waytime_profile'), array('remind_time' => $iNewTime), 'user_id = '.Phpfox::getUserId());\r\n }", "public function restore(User $user, Show $show): bool\n {\n return $user->isAdmin();\n }", "public function restore(User $user)\n {\n return $user->idquyenhan == 2;\n }", "public function restore(User $user, Participant $participant)\n {\n return $user->role === 2;\n }", "public function is_inspector()\n {\n $session = $this->session->userdata('user');\n if($session)\n {\n if($session['role'] == 'INSPECTOR')\n {\n if(date('H') > 7 AND date('H') < 14)\n {\n $access = FALSE;\n }\n else\n {\n $access = TRUE;\n }\n\n $session['timeAccess'] = $access;\n $this->session->set_userdata($session);\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n $this->log_out();\n }\n }", "public function restore(User $user, Employee $employee)\n {\n return $user->role == 'admin';\n }", "public function canManageBackup();", "protected function isActivatedViaEndDateAndTime() {}", "function hasRecentlyAction() {\n\n\t\t$limit = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]) - (2 * 60 * 60);\n\n\t\tif ($this->isLoged() && $this->getLastAction('U') < $limit)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "protected function is_remembered()\r\n {\r\n return false;\r\n }", "protected function onRestored()\n {\n return true;\n }", "public function restore(User $user, User $model)\n {\n return $user->hasPermissionTo('benutzer-bearbeiten');\n }", "function can_do_edit() {\n global $USER;\n\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n $report_shortname = '';\n\n //try to obtain the report shortname from the report schedule id\n //(applies only during first step of wizard interface)\n $id = $this->optional_param('id', 0, PARAM_INT);\n if ($id !== 0) {\n if ($record = get_record('php_report_schedule', 'id', $id)) {\n if ($record->userid != $USER->id) {\n //disallow access to another user's schedule\n return false;\n }\n $config = unserialize($record->config);\n if (isset($config['report'])) {\n $report_shortname = $config['report'];\n }\n } else {\n //wrong id, so disallow\n return false;\n }\n }\n\n //try to obtain the report shortname from the workflow information\n //(applies only after the first step of the wizard interface)\n if ($report_shortname == '' && isset($this->workflow)) {\n $data = $this->workflow->unserialize_data();\n if ($data !== NULL && isset($data['report'])) {\n $report_shortname = $data['report'];\n }\n }\n\n if ($report_shortname === '') {\n //report info not found, so disallow\n return false;\n }\n\n //check permissions via the report\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n return $report_instance !== false;\n }", "public function restore(User $user, Experience $experience)\n {\n return true;\n }", "public function can_reset_password() {\n return false;\n }" ]
[ "0.6266", "0.5561092", "0.5513173", "0.5437686", "0.54349864", "0.54303133", "0.54150075", "0.5411109", "0.5406016", "0.5375105", "0.53744215", "0.53423584", "0.53105146", "0.5306243", "0.5306243", "0.5293264", "0.5284687", "0.52803653", "0.527373", "0.52682906", "0.5263226", "0.5247518", "0.5240048", "0.5239267", "0.52263194", "0.52195174", "0.52046055", "0.52025586", "0.5191318", "0.5187948" ]
0.56322145
1
Check if tags are linked correctly. We expect tag1 to be linked to 6 items. We expect tag2 to be linked to 4 items. We expect item1 to have 1 tag. We expect item2 to have 2 tags. We expect item3 to have 0 tags.
public function testTag() { $tag1 = $this->objFromFixture('Tag', 'tag1'); $tag2 = $this->objFromFixture('Tag', 'tag2'); $entry1 = $this->objFromFixture('News', 'item1'); $entry2 = $this->objFromFixture('News', 'item2'); $entry3 = $this->objFromFixture('News', 'item3'); $this->assertEquals($tag1->News()->count(), 6, 'Tag 1 to items'); $this->assertEquals($tag2->News()->count(), 4, 'Tag 2 to items'); $this->assertEquals($entry1->Tags()->count(), 1, 'Tags on item 1'); $this->assertEquals($entry2->Tags()->count(), 2, 'Tags on item 2'); $this->assertEquals($entry3->Tags()->count(), 0, 'Tags on item 0'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasUncheckedLinks($list)\n\t{\n\t\t//only checking one list side per call\n\t\tforeach($list as $l)\n\t\t{\n\t\t\tif($l['done'] == 0)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t\t\n\t\t\n\t}", "static public function getLinks($list){\n // This will match only the unique (user added) tag for each artefact\n\n function get_tags($a) {\n $ret = [];\n foreach($a as $b) array_push($ret, ['tag_id' => $b->id, 'tag' => strtolower($b->tag)]);\n return $ret;\n }\n\n function compare_tags($a, $b){\n return strcmp($a['tag'],$b['tag']);\n }\n\n function find_tag($needle, $haystack){\n $size = count($haystack);\n for($i = 0; $i < $size; $i++){\n if($haystack[$i]->tag == $needle['tag']) return $i;\n }\n return FALSE;\n }\n\n $links = [];\n\n foreach($list as $artefact){\n if(!$artefact->hasParent){\n $unique_tags = get_tags($artefact->tags);\n continue;\n } else{\n $artefact_tags = get_tags($artefact->tags);\n $parent_tags = get_tags($artefact->parent->tags);\n $unique_tags = array_udiff($artefact_tags, $parent_tags, 'App\\Http\\Controllers\\\\compare_tags');\n }\n foreach($unique_tags as $unique_tag){\n $key = find_tag($unique_tag, $links);\n if($key === FALSE){\n array_push($links, (object)array('tag_id' => $unique_tag['tag_id'], 'tag' => $unique_tag['tag'], 'items' => (string)$artefact->id, 'count' => 1));\n } else {\n $links[$key]->items = $links[$key]->items.','.(string)$artefact->id;\n $links[$key]->count = $links[$key]->count + 1;\n }\n }\n }\n\n return $links;\n }", "public function testReturnsAValidLink()\n {\n $id = $this->faker->randomNumber();\n $item = $this->createItem($id);\n $this->assertStringEndsWith((string)$id, $item->getLink());\n }", "private function checkLinks( DOMNode $root, array $links )\n {\n $unique = array();\n foreach ( $links as $dataNode )\n {\n if ( ( isset( $dataNode->rel ) && $dataNode->rel === 'alternate' )\n && isset( $dataNode->type )\n && isset( $dataNode->hreflang ) )\n {\n foreach ( $unique as $obj )\n {\n if ( $obj['type'] === $dataNode->type\n && $obj['hreflang'] === $dataNode->hreflang )\n {\n $parentNode = ( $root->nodeName === 'entry' ) ? '/feed' : '';\n $parentNode = ( $root->nodeName === 'source' ) ? '/feed/entry' : $parentNode;\n\n throw new ezcFeedOnlyOneValueAllowedException( \"{$parentNode}/{$root->nodeName}/link@rel=\\\"alternate\\\"\" );\n }\n }\n\n $unique[] = array( 'type' => $dataNode->type,\n 'hreflang' => $dataNode->hreflang );\n\n }\n }\n\n return true;\n }", "public function testGetAllValidTags() {\n\t\t// Count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// Create a new tag and insert to into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// Grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getAllTags($this->getPDO());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Brewcrew\\\\Tag\", $results);\n\n\t\t// Grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t$this->assertEquals($pdoTag->getTagLabel(), $this->VALID_TAG_LABEL);\n\t}", "public function frontendTagVerification($tags, $product)\n {\n if (is_string($tags))\n $tags = $this->_convertTagsStringToArray($tags);\n //Verification in \"My Recent tags\" area\n $this->addParameter('productName', $product);\n foreach ($tags as $tag) {\n $this->navigate('customer_account');\n $this->addParameter('tagName', $tag);\n $this->assertTrue($this->controlIsPresent('link', 'tag'), \"Cannot find tag with name: $tag\");\n $this->clickControl('link', 'tag');\n $this->assertTrue($this->controlIsPresent('pageelement', 'tag_name_box'), \"Cannot find tag $tag in My Tags\");\n $this->assertTrue($this->controlIsPresent('link', 'product_name'),\"Cannot find product $product tagged with $tag\");\n }\n //Verification in \"My Account -> My Tags\"\n foreach ($tags as $tag) {\n $this->navigate('my_account_my_tags');\n $this->addParameter('tagName', $tag);\n $this->assertTrue($this->controlIsPresent('link', 'tag_name'), \"Cannot find tag with name: $tag\");\n $this->clickControl('link', 'tag_name');\n $this->assertTrue($this->controlIsPresent('pageelement', 'tag_name_box'), \"Cannot find tag $tag in My Tags\");\n $this->assertTrue($this->controlIsPresent('link', 'product_name'),\"Cannot find product $product tagged with $tag\");\n }\n }", "public function hasLinks(){\n return $this->_has(9);\n }", "public function testIsTagged(): void\n {\n $models = TestModel::isTagged()->get();\n $keys = $models->modelKeys();\n\n self::assertArrayValuesAreEqual(\n [\n $this->testModel2->getKey(),\n $this->testModel3->getKey(),\n $this->testModel4->getKey(),\n $this->testModel5->getKey(),\n $this->testModel6->getKey(),\n $this->testModel7->getKey(),\n $this->testModel8->getKey(),\n ],\n $keys\n );\n }", "public function testLinkWithPipes()\n {\n // for example: golem.de is expanded to <https://golem.de|golem.de>\n $data = <<<'EOT'\n{\n \"client_msg_id\": \"5510681d-1c33-41aa-a0ee-62779cd9e8ad\",\n \"type\": \"message\",\n \"text\": \"Link mit pipe <https://golem.de|golem.de>\",\n \"user\": \"UF53JT12T\",\n \"ts\": \"1546266336.001000\"\n}\nEOT;\n\n $message = json_decode($data, true);\n $result = Message::extract_links($message);\n\n $this->assertEquals(count($result), 1);\n $this->assertEquals($result[0]['link'], 'https://golem.de');\n $this->assertEquals($result[0]['title'], null);\n $this->assertEquals($result[0]['source'], 'golem.de');\n }", "function _linkReferences() {\n\tif (is_array($this->_haveRefs)) {\n\t\tforeach ($this->_haveRefs as $node) {\n\t\tif (!empty($node->data)) {\n\t\t\t$key = key($node->data);\n\t\t\t// If it's an array, don't check.\n\t\t\tif (is_array($node->data[$key])) {\n\t\t\tforeach ($node->data[$key] as $k => $v) {\n\t\t\t\t$this->_linkRef($node,$key,$k,$v);\n\t\t\t}\n\t\t\t} else {\n\t\t\t$this->_linkRef($node,$key);\n\t\t\t}\n\t\t}\n\t\t}\n\t}\n\treturn true;\n\t}", "public function testGetAllValidTags() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\t\t// create a new Tag and insert to into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAGCONTENT);\n\t\t$tag->insert($this->getPDO());\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getAllTags($this->getPDO());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\t\t\t\t// grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t\t\t$this->assertEquals($pdoTag->getTagName(), $this->VALID_TAGCONTENT);\n\t}", "function checktags() {\n\t\t\n\t\tglobal $post;\n\t\t$tag_ids = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) );\n\t\t\n\t\tif ( !empty($tag_ids) ) {\n\t\t\t\n\t\t\treturn true;\n\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t}", "function validTags($tags){\n $qh = new QueryHelper();\n\n $columnName = \"Value\";\n $selectTag = \"SELECT * FROM Tag;\";\n\n for($i = 0; $i < sizeof($tags); $i++){\n if(!$tags[$i] == 'Tag'){\n if(!$qh -> verifyDropDownInput($tags[$i], $selectFormat, $columnName)){\n echo \"invalid tag: $i\";\n return false;\n }\n }\n }\n return true;\n }", "function checkTagCount(array $openingTags, array $closingTags): bool\n{\n return count($openingTags) == count($closingTags);\n}", "function mymodule_tag_iteminfo(&$items)\r\n{\r\n $items_id = array();\r\n foreach (array_keys($items) as $cat_id) {\r\n // Some handling here to build the link upon catid\r\n // If catid is not used, just skip it\r\n foreach (array_keys($items[$cat_id]) as $item_id) {\r\n // In article, the item_id is \"art_id\"\r\n $items_id[] = intval($item_id);\r\n }\r\n }\r\n $item_handler =& xoops_getmodulehandler(\"item\", \"module\");\r\n $items_obj = $item_handler->getObjects(new Criteria(\"itemid\", \"(\" . implode(\", \", $items_id) . \")\", \"IN\"), true);\r\n \r\n foreach (array_keys($items) as $cat_id) {\r\n foreach (array_keys($items[$cat_id]) as $item_id) {\r\n $item_obj =& $items_obj[$item_id];\r\n $items[$cat_id][$item_id] = array(\r\n \"title\" => $item_obj->getVar(\"item_title\"),\r\n \"uid\" => $item_obj->getVar(\"uid\"),\r\n \"link\" => \"view.item.php?itemid={$item_id}\",\r\n \"time\" => $item_obj->getVar(\"item_time\"),\r\n \"tags\" => tag_parse_tag($item_obj->getVar(\"item_tags\", \"n\")), // optional\r\n \"content\" => \"\",\r\n );\r\n }\r\n }\r\n unset($items_obj); \r\n}", "private function assertValidTags() : void\n {\n if ([] === $this->tags) {\n return;\n }\n\n foreach ($this->tags as $value) {\n InvalidDescriptorArgumentException::assertIsNotEmptyString(\n $value,\n '#[Route.tags] must contain non-empty strings.'\n );\n }\n }", "public static function get_related_tags(Info $info, $badges, $tags) {\n try {\n //NOTE: If you are super admin, dont bother joining in perm tables to get accurate topic_count by permission\n //Since you are super, you can read ALL articles, so just use the topic_count column in tbl_badge_item\n $badges_exist = false;\n $tags_exist = false;\n if ($badges[0] != '' && $badges[0] != '*') $badges_exist = true;\n if ($tags[0] != '' && $tags[0] != '*') $tags_exist = true;\n if ($badges_exist) {\n $db = ADODB::connect();\n if ($info->admin) {\n //This does not take into account permissions on topic_count, becuase Im admin\n $query = \"\n SELECT\n DISTINCT ti.*\n FROM\n tbl_tag_link tl\n LEFT OUTER JOIN tbl_tag_item ti on tl.tag_id = ti.tag_id\n WHERE \";\n if ($tags_exist) {\n $query .= \"\n tl.topic_id IN (\n SELECT\n tl.topic_id\n FROM\n tbl_tag_link tl\n WHERE\n tl.tag_id IN (\".implode(\",\", $tags).\") \n GROUP BY\n tl.topic_id\n HAVING \n count(DISTINCT tl.tag_id) >= \".count($tags).\"\n ) \";\n }\n if ($badges_exist) {\n if ($tags_exist) $query .= \"AND \";\n $query .= \"\n tl.topic_id IN (\n SELECT\n bl.topic_id\n FROM\n tbl_badge_link bl\n WHERE\n bl.badge_id IN (\".implode(\",\", $badges).\") \n GROUP BY\n bl.topic_id\n HAVING \n count(DISTINCT bl.badge_id) >= \".count($badges).\"\n ) \";\n }\n if ($tags_exist) {\n $query .= \"\n AND\n tl.tag_id NOT IN (\".implode(\",\", $tags).\") \";\n }\n $query .= \"ORDER BY ti.tag\";\n } else {\n //This uses a true topic count, taking into account your permissions\n //Holy crap, this ones crazy!\n $query = \"\n SELECT DISTINCT\n mainti.tag_id,\n mainti.tag \";\n /* I took counts off because this is total count, not filtered count\n (\n SELECT count(DISTINCT t.topic_id) FROM\n tbl_topic t LEFT OUTER JOIN tbl_tag_link tl on t.topic_id = tl.topic_id\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n WHERE tl.tag_id = mainti.tag_id AND ((pl.perm_id = \".Config::STATIC_PERM_READ.\" AND pgl.user_id = $user_id) or t.created_by = $user_id)\n ) as topic_count*/\n $query .= \"FROM\n tbl_tag_link maintl\n INNER JOIN tbl_tag_item mainti on maintl.tag_id = mainti.tag_id\n WHERE \";\n if ($tags_exist) {\n $query .= \"\n maintl.topic_id IN (\n SELECT\n tl.topic_id\n FROM \n tbl_topic t\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id and pl.perm_id = \".Config::STATIC_PERM_READ.\"\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n LEFT OUTER JOIN tbl_tag_link tl on t.topic_id = tl.topic_id\n WHERE\n (pgl.user_id = $info->user_id OR t.created_by = $info->user_id) AND\n tl.tag_id IN (\".implode(\",\", $tags).\")\n GROUP BY\n tl.topic_id\n HAVING\n count(DISTINCT tl.tag_id) >= \".count($tags).\"\n ) \";\n }\n if ($badges_exist) {\n if ($tags_exist) $query .= \"AND \";\n $query .=\"\n maintl.topic_id IN (\n SELECT\n bl.topic_id\n FROM \n tbl_topic t\n LEFT OUTER JOIN tbl_perm_link pl on t.topic_id = pl.topic_id and pl.perm_id = \".Config::STATIC_PERM_READ.\"\n LEFT OUTER JOIN tbl_perm_group_link pgl on pl.perm_group_id = pgl.perm_group_id\n LEFT OUTER JOIN tbl_badge_link bl on t.topic_id = bl.topic_id\n WHERE\n (pgl.user_id = $info->user_id OR t.created_by = $info->user_id) AND\n bl.badge_id IN (\".implode(\",\", $badges).\")\n GROUP BY\n bl.topic_id\n HAVING\n count(DISTINCT bl.badge_id) >= \".count($badges).\"\n ) \";\n }\n if ($tags_exist) {\n $query .=\"\n AND\n maintl.tag_id NOT IN (\".implode(\",\", $tags).\")\";\n }\n $query .= \"ORDER BY mainti.tag\"; \n }\n $rs = $db->Execute($query);\n $tag_items = array();\n while (!$rs->EOF) {\n $tag_item = new Tbl_tag;\n $tag_item->tag_id = $rs->fields['tag_id'];\n $tag_item->tag = $rs->fields['tag'];\n $tag_item->image = $rs->fields['image'];\n $tag_item->default_topic_id = $rs->fields['default_topic_id'];\n $tag_items[] = $tag_item; //add this badge_item to array of Tbl_badge\n $rs->MoveNext();\n }\n return $tag_items;\n }\n } catch (exception $e) {\n Info::exception_handler($e, __file__, get_class($this), __FUNCTION__, __LINE__);\n }\n }", "public function test_links_parse(): void\n {\n $request = GroupRequest::ofUserName(self::DEFAULT_GROUP_DEEPLINK);\n $this->resolve($request, function (?int $groupId, ?int $accessHash) {\n $count = 0;\n $handler = function (?MessageModel $message = null) use (&$count) {\n if ($message) {\n $this->assertEquals('qweq', $message->getText());\n $count++;\n }\n };\n $client = new LinkParseScenario(\n new GroupId($groupId, $accessHash),\n $this->clientGenerator,\n new OptionalDateRange(),\n $handler,\n self::USERNAME\n );\n $client->setTimeout(self::TIMEOUT);\n $client->startActions();\n $this->assertEquals(1, $count);\n });\n }", "public function testValidationForTags(): void\n {\n foreach (['ab', str_repeat('a', 41)] as $tag) {\n $errors = $this->Table->newEntity(['tags_as_string' => $tag] + $this->example)->getErrors();\n $this->assertEquals(['tags' => [\n 'validTags' => sprintf('Tag \"%s\": must be between 3 and 40 chars', $tag),\n ]], $errors);\n }\n\n foreach (['Abc', 'ab$', 'ab-c', 'ab_c'] as $tag) {\n $errors = $this->Table->newEntity(['tags_as_string' => $tag] + $this->example)->getErrors();\n $this->assertEquals(['tags' => [\n 'validTags' => sprintf('Tag \"%s\": %s: %s', $tag, lcfirst(I18N_ALLOWED_CHARS), I18N_LOWERCASE_NUMBERS_SPACE),\n ]], $errors);\n }\n\n //Multiple errors\n $tags = ['ab$', str_repeat('a', 41)];\n $errors = $this->Table->newEntity(['tags_as_string' => implode(', ', $tags)] + $this->example)->getErrors();\n $errorsAsArray = explode(PHP_EOL, $errors['tags']['validTags']);\n $this->assertEquals([\n sprintf('Tag \"%s\": %s: %s', $tags[0], lcfirst(I18N_ALLOWED_CHARS), I18N_LOWERCASE_NUMBERS_SPACE),\n sprintf('Tag \"%s\": must be between 3 and 40 chars', $tags[1]),\n ], $errorsAsArray);\n\n foreach ([\n 'abc',\n str_repeat('a', 40),\n 'first, second',\n 'first, second',\n 'first , second',\n 'first ,second',\n 'first ,second',\n 'first,second',\n ' first, second',\n 'first, second ',\n ' first, second ',\n ' first , second ',\n ] as $tags_as_string) {\n $errors = $this->Table->newEntity(compact('tags_as_string') + $this->example)->getErrors();\n $this->assertEmpty($errors);\n }\n }", "public function frontendTagVerificationInCategory($tags, $product, $category)\n {\n if (is_string($tags))\n $tags = $this->_convertTagsStringToArray($tags);\n $category = substr($category, strpos($category, '/') + 1);\n $url = trim(strtolower(preg_replace('#[^0-9a-z]+#i', '-', $category)), '-');\n $this->addParameter('productName', $product);\n $this->addParameter('categoryTitle', $category);\n $this->addParameter('categoryUrl', $url);\n foreach ($tags as $tag) {\n $this->frontend('category_page_before_reindex');\n $this->addParameter('tagName', $tag);\n $this->assertTrue($this->controlIsPresent('link', 'tag_name'), \"Cannot find tag with name: $tag\");\n $this->clickControl('link', 'tag_name');\n $this->assertTrue($this->checkCurrentPage('tags_products'), $this->getParsedMessages());\n $this->assertTrue($this->controlIsPresent('link', 'product_name'));\n }\n }", "private function validateFlowPrime($items) {\n $valid = true;\n\n foreach ($items as $item) {\n if (!isset($item['type']) || !class_exists($item['type'])) {\n continue;\n }\n if (is_subclass_of($item['type'], 'MultiChildNode')) {\n $nodeClass = $item['type'];\n if (isset($item['type'][$nodeClass::getLeftChildName()])) {\n if (!$this->validateFlowPrime($item[$nodeClass::getLeftChildName()])) {\n $valid = false;\n break;\n }\n }\n if (isset($item['type'][$nodeClass::getRightChildName()])) {\n if (!$this->validateFlowPrime($item[$nodeClass::getRightChildName()])) {\n $valid = false;\n break;\n }\n }\n } else {\n $valid = $this->validateFlowItem($item);\n if (!$valid) {\n break;\n }\n }\n }\n return $valid;\n }", "protected function isLink() {}", "public function testMf2DoesNotParseRelTag() {\n\t\t$input = '<div class=\"h-entry\">\n<a rel=\"tag\" href=\"/tags/tests\">Tests</a>\n</div>\n\n<div class=\"h-review\">\n<a rel=\"tag\" href=\"/tags/reviews\">Reviews</a>\n</div>\n';\n\t\t$parser = new Parser($input);\n\t\t$output = $parser->parse();\n\n\t\t$this->assertArrayNotHasKey('category', $output['items'][0]['properties']);\n\t\t$this->assertArrayNotHasKey('category', $output['items'][1]['properties']);\n\t}", "public function checkTags($fields) {\n $fields = array_values($fields);\n if (empty($fields[0]))\n return __('A01120_ERR_MSG009');\n\n if(count(explode(',', $fields['0'])) > 5) {\n return __('A01120_ERR_MSG010');\n }\n\n //get user tags\n $form_tags = preg_split('/[,\\0100]+/', $fields[0], -1, PREG_SPLIT_NO_EMPTY);\n\n //get instance of Tag model\n $TagModel = $this->QuestionTag->Tag;\n\n //get valid tags\n $valid_tags = $TagModel->find('list', array(\n 'conditions' => array(\n 'Tag.name' => $form_tags,\n 'Tag.delete_flag' => FLAG_NOT_DELETED\n )\n ));\n $valid_tags = array_values($valid_tags);\n\n $invalid_tags = array_values(array_diff($form_tags, $valid_tags));\n\n if (empty($invalid_tags)) {\n return true;\n } else {\n return __('A01120_ERR_MSG006', implode(',', $invalid_tags));\n }\n }", "public function testLinkedTo()\n {\n $layer = new Layer($this->pieceRecords);\n $this->assertEquals(5, count($layer->linkedTo('format', 36)->toArray()));\n $this->assertEquals(40, count($layer->linkedTo('format', null)->toArray()));\n $this->assertEquals(0, count($layer->linkedTo('format', 500)->toArray()));\n $this->assertEquals(0, count($layer->linkedTo('junk', 36)->toArray()));\n }", "public function UpdateTagsWithLinks() {\n\t\t$tags = $this->UpdateTags();\n\n\t\t$processed = new ArrayList();\n\n\t\tforeach ($tags as $tag) {\n\t\t\t// Build the link - keep the tag, and date range, but reset month, year and pagination.\n\t\t\t$link = HTTP::setGetVar('tag', $tag->ID, null, '&');\n\t\t\t$link = HTTP::setGetVar('month', null, $link, '&');\n\t\t\t$link = HTTP::setGetVar('year', null, $link, '&');\n\t\t\t$link = HTTP::setGetVar('start', null, $link, '&');\n\n\t\t\t$tag->Link = $link;\n\t\t\t$processed->push($tag);\n\t\t}\n\n\t\treturn $processed;\n\t}", "public function is_valid_link()\r\n {\r\n \t$sql = 'SELECT count(id) from '.$this->get_exercise_table()\r\n\t\t\t\t.' WHERE id = '.$this->get_ref_id();\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\t\t$number=mysql_fetch_row($result);\r\n\t\treturn ($number[0] != 0);\r\n }", "public function testListSharedLinks()\n {\n }", "public function testPrivateTokenErrors() {\n $badData = $this->goodData;\n unset($badData['private_token']);\n $this->assertFalse($this->Links->save($this->Links->newEntity($badData)), 'Private token is required');\n\n $badData['private_token'] = '';\n $this->assertFalse($this->Links->save($this->Links->newEntity($badData)),\n 'Private token is not empty');\n\n //Check private tokens are unique\n $goodData = $this->goodData;\n $goodData['title'] = 'titleTestPrivateTokenErrors';\n $this->Links->save($this->Links->newEntity($goodData));\n $this->Links->save($this->Links->newEntity($goodData));\n $result = $this->Links->find(\"all\")\n ->where(['Links.title =' => $goodData['title']])\n ->toArray();\n $this->assertNotEquals($result[0]->token, $result[1]->token,\n 'Two similar links do not have same tokn');\n }", "public function linkHitCompare() {\n\t\tglobal $db;\n\t\t$user = new User;\n\t\t$lang = new Language;\n\t\t$where = \"AND link_author = '{$user->_user()}'\";\n\t\tif ( $user->can( 'manage_user_items' ) ) {\n\t\t\t$where = null;\n\t\t}\n\t\t$get = $db->customQuery( \"SELECT link_id FROM {$db->tablePrefix()}links WHERE link_hits != '0' $where\" );\n\t\t$return = '';\n\t\twhile ( $array = $get->fetch_array() ) {\n\t\t\t$getLinkHits = $db->customQuery( \"SELECT link_title,link_hits FROM {$db->tablePrefix()}links WHERE link_id = '{$array['link_id']}'\" );\n\t\t\t$linkData = $getLinkHits->fetch_object();\n\t\t\t$return .= \"['{$linkData->link_title}', {$linkData->link_hits}],\";\n\t\t}\n\t\treturn $return;\n\t}" ]
[ "0.54179895", "0.54098463", "0.53071284", "0.53054684", "0.52736783", "0.52710754", "0.5263339", "0.52329594", "0.5226551", "0.52079725", "0.518855", "0.518519", "0.5169399", "0.5158293", "0.5154352", "0.51454395", "0.51210856", "0.5100664", "0.5090498", "0.50653535", "0.5054543", "0.504675", "0.50188124", "0.4966201", "0.49524128", "0.493311", "0.49288955", "0.49133152", "0.49125832", "0.49112934" ]
0.6038376
0
See if the tags get the correct URLSegment. Tests are not deep, because the function used is the same as the News function. In the newstests, this URLSegmentgeneration is tested more thoroughly, if that one returns green, it's pretty sure to say Tags will work fine too.
public function testTagURLSegment() { $tag1 = $this->objFromFixture('Tag', 'tag1'); $tag2 = $this->objFromFixture('Tag', 'tag2'); $this->assertEquals('testtag-' . $tag1->ID, $tag1->URLSegment); $this->assertEquals('testtag-' . $tag2->ID, $tag2->URLSegment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validURLSegment()\n {\n if (self::config()->get('nested_urls') && $this->ParentID) {\n // Guard against url segments for sub-pages\n $parent = $this->Parent();\n if ($controller = ModelAsController::controller_for($parent)) {\n if ($controller instanceof Controller && $controller->hasAction($this->URLSegment)) {\n return false;\n }\n }\n } elseif (in_array(strtolower($this->URLSegment ?? ''), $this->getExcludedURLSegments() ?? [])) {\n // Guard against url segments for the base page\n // Default to '-2', onBeforeWrite takes care of further possible clashes\n return false;\n }\n\n // If any of the extensions return `0` consider the segment invalid\n $extensionResponses = array_filter(\n (array)$this->extend('augmentValidURLSegment'),\n function ($response) {\n return !is_null($response);\n }\n );\n if ($extensionResponses) {\n return min($extensionResponses);\n }\n\n // Check for clashing pages by url, id, and parent\n $source = NestedObject::get()->filter([\n 'ClassName' => $this->ClassName,\n 'URLSegment' => $this->URLSegment,\n ]);\n\n if ($this->ID) {\n $source = $source->exclude('ID', $this->ID);\n }\n\n if (self::config()->get('nested_urls')) {\n $source = $source->filter('ParentID', $this->ParentID ? $this->ParentID : 0);\n }\n\n return !$source->exists();\n }", "public function testAllEntitiesUrlResolverRequestHasCorrectTags(): void\n {\n $categoryUrlKey = 'cat-1.html';\n $productUrlKey = 'p002.html';\n $productSku = 'p002';\n /** @var ProductRepositoryInterface $productRepository */\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n /** @var Product $product */\n $product = $productRepository->get($productSku, false, null, true);\n $storeId = (string) $product->getStoreId();\n\n /** @var UrlFinderInterface $urlFinder */\n $urlFinder = $this->objectManager->get(UrlFinderInterface::class);\n $actualUrls = $urlFinder->findOneByData(\n [\n 'request_path' => $categoryUrlKey,\n 'store_id' => $storeId\n ]\n );\n $categoryId = (string) $actualUrls->getEntityId();\n $categoryQuery = $this->buildQuery($categoryUrlKey);\n\n $productQuery = $this->buildQuery($productUrlKey);\n\n /** @var GetPageByIdentifierInterface $page */\n $page = $this->objectManager->get(GetPageByIdentifierInterface::class);\n /** @var PageInterface $cmsPage */\n $cmsPage = $page->execute('page100', 0);\n $cmsPageId = (string) $cmsPage->getId();\n $requestPath = $cmsPage->getIdentifier();\n $pageQuery = $this->buildQuery($requestPath);\n\n // query category for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheMISSWithTagsForCategory($categoryId, $response);\n\n // query product for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheMISSWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheMISSWithTagsForCmsPage($cmsPageId, $response);\n\n // query category for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheHITWithTagsForCategory($categoryId, $response);\n\n // query product for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheHITWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheHITWithTagsForCmsPage($cmsPageId, $response);\n\n $product->setUrlKey('something-else-that-invalidates-the-cache');\n $productRepository->save($product);\n $productQuery = $this->buildQuery('something-else-that-invalidates-the-cache.html');\n\n // query category for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $categoryQuery]);\n $this->assertCacheMISSWithTagsForCategory($categoryId, $response);\n\n // query product for MISS\n $response = $this->dispatchGraphQlGETRequest(['query' => $productQuery]);\n $this->assertCacheMISSWithTagsForProduct((string) $product->getId(), $response);\n\n // query page for HIT\n $response = $this->dispatchGraphQlGETRequest(['query' => $pageQuery]);\n $this->assertCacheHITWithTagsForCmsPage($cmsPageId, $response);\n }", "public function testTag()\n {\n $tag1 = $this->objFromFixture('Tag', 'tag1');\n $tag2 = $this->objFromFixture('Tag', 'tag2');\n $entry1 = $this->objFromFixture('News', 'item1');\n $entry2 = $this->objFromFixture('News', 'item2');\n $entry3 = $this->objFromFixture('News', 'item3');\n\n $this->assertEquals($tag1->News()->count(), 6, 'Tag 1 to items');\n $this->assertEquals($tag2->News()->count(), 4, 'Tag 2 to items');\n $this->assertEquals($entry1->Tags()->count(), 1, 'Tags on item 1');\n $this->assertEquals($entry2->Tags()->count(), 2, 'Tags on item 2');\n $this->assertEquals($entry3->Tags()->count(), 0, 'Tags on item 0');\n }", "function ViewUrlsByTag( $f_szTags = '' ) {\n\tglobal $db;\n\n\t$g_szTag = $f_szTags;\n\n\t$script = $_SERVER['PHP_SELF'];\n\t$szBasePath = rtrim(dirname($script), '/') . '/';\n\n\t$mobile = isset($_GET['mobile']) || ( isset($_SERVER['HTTP_USER_AGENT']) && is_int(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobi')) );\n\n\t// $arrInTags = explode(' ', $g_szTag);\n\t// $szWhereClause = 1 == count($arrInTags) ? \"(l_tags.tag = '\".$arrInTags[0].\"')\" : \"(l_tags.tag = '\".implode(\"' OR l_tags.tag = '\", $arrInTags).\"')\";\n\n\tif ( '~new' == $g_szTag ) {\n\t\t$szQuery = 'SELECT * FROM l_urls ORDER BY id DESC LIMIT 250;';\n\t}\n\telse {\n\t\t$tags = unaliasTags(preg_split('#[\\/\\s]+#', $g_szTag));\n\t\t$and = !strstr($g_szTag, \"/\");\n\n\t\t$szQuery = $db->replaceholders('\n\t\t\tSELECT u.*, COUNT(1) as matching\n\t\t\tFROM l_links l, l_tags t, l_urls u\n\t\t\tWHERE l.url_id = u.id AND l.tag_id = t.id AND t.tag in (?)\n\t\t\tGROUP BY u.id\n\t\t', array($tags));\n\t\tif ( $and ) {\n\t\t\t$szQuery .= $db->replaceholders(' HAVING matching = ?', array(count($tags)));\n\t\t}\n\t\t$szQuery .= ' ORDER BY u.id DESC';\n\t}\n\n\t$arrUrls = $db->fetch($szQuery)->all();\n\n\trequire 'tpl.index.php';\n\n}", "public function testUrlLikeTags(array $test) {\n $this->performTest($test);\n }", "function valid_news_url($val)\n{\n $news=explode('/',$val);\n if($news[1]=='news'){\n return true;\n }else{\n return false;\n }\n //print_r($news);\n\n}", "public function testTags()\n\t{\n\t\t$this->call('GET', '/api/tags');\n\t}", "public function testGetTags()\n {\n $objects = $this->loadTestFixtures(['@AppBundle/DataFixtures/ORM/Test/Tag/CrudData.yml']);\n\n // Test scope\n $this->restScopeTestCase('/api/tags', [\n 'list' => $this->getScopeConfig('tag/list.yml')\n ], true);\n\n // Test filters\n $listFilterCaseHandler = new ListFilterCaseHandler([\n 'tag-1' => $objects['tag-1']\n ]);\n \n $listFilterCaseHandler->addCase('name', '=Some name', 'tag-1', true);\n\n $this->restListFilterTestCase('/api/tags', $listFilterCaseHandler->getCases());\n }", "public function testFragmentExists()\n {\n self::setupSystems();\n $ret = DALBaker::fragmentExists('MergeSys2', 'getAttributesTextAttribute', 'MergeSys1.getLinks');\n PHPUnit_Framework_Assert::assertTrue($ret);\n\n }", "public function testTagParsing() {\n\t\t$info = Inspector::info(__METHOD__ . '()');\n\t\t$result = Docblock::comment($info['comment']);\n\t\t$this->assertEqual('This is a short description.', $result['description']);\n\n\t\t$expected = \"This is a longer description...\\nThat contains\\nmultiple lines\";\n\t\t$this->assertEqual($expected, $result['text']);\n\n\t\t$tags = $result['tags'];\n\t\t$expected = ['deprecated', 'important', 'discuss', 'link', 'see', 'return'];\n\t\t$this->assertEqual($expected, array_keys($tags));\n\n\t\t$result = \"This is a tag that\\n spans\\n several\\n lines.\";\n\t\t$this->assertEqual($result, $tags['discuss'][0]);\n\t\t$this->assertEqual(\"The second discussion item\", $tags['discuss'][1]);\n\n\t\t$this->assertEqual('void This tag contains a [email protected].', $tags['return']);\n\t\t$this->assertEqual([], Docblock::tags(null));\n\n\t\t$this->assertEqual(['params' => []], Docblock::tags(\"Foobar\\n\\n@param string\"));\n\t}", "function get_segments($ignore_custom_routes=NULL) {\n $psuedo_url = str_replace('://', '', BASE_URL);\n $psuedo_url = rtrim($psuedo_url, '/');\n $bits = explode('/', $psuedo_url);\n $num_bits = count($bits);\n\n if ($num_bits>1) {\n $num_segments_to_ditch = $num_bits-1;\n } else {\n $num_segments_to_ditch = 0;\n }\n\n $assumed_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n if (!isset($ignore_custom_routes)) {\n $assumed_url = attempt_add_custom_routes($assumed_url);\n }\n\n $data['assumed_url'] = $assumed_url;\n\n $assumed_url = str_replace('://', '', $assumed_url);\n $assumed_url = rtrim($assumed_url, '/');\n\n $segments = explode('/', $assumed_url);\n\n for ($i=0; $i < $num_segments_to_ditch; $i++) { \n unset($segments[$i]);\n }\n\n $data['segments'] = array_values($segments); \n return $data;\n}", "public function testGetTags() {\n $this->assertEquals([\n 'example',\n 'template',\n 'templateMissing',\n 'inline',\n 'inlineAllowInline',\n 'inlineAllowBlock',\n 'inlineAllowBoth',\n 'block',\n 'blockAllowInline',\n 'blockAllowBlock',\n 'blockAllowBoth',\n 'attributes',\n 'fooBar',\n 'parent',\n 'parentNoPersist',\n 'parentWhitelist',\n 'parentBlacklist',\n 'whiteChild',\n 'blackChild',\n 'depth',\n 'lineBreaksRemove',\n 'lineBreaksPreserve',\n 'lineBreaksConvert',\n 'pattern',\n 'autoClose',\n 'aliasBase',\n 'aliased'\n ], array_keys($this->object->getTags()));\n }", "public function testGetTags()\n {\n $helix = new Helix(self::$tokenProvider);\n $tagsApi = $helix->tags;\n $tags = $tagsApi->getTags();\n \n $this->assertNotNull($tags);\n $this->assertIsArray($tags);\n\n // Twitch should have more than 20 available tags, so we check that the cursor is available\n $hasMoreResults = $tagsApi->hasMoreTags();\n $this->assertTrue($hasMoreResults);\n\n // Try to get a specific tag by its ID, using the previous results to get the ID.\n $firstTag = reset($tags);\n $onlyTag = $tagsApi->getTags([$firstTag->tag_id]);\n\n $this->assertCount(1, $onlyTag);\n $this->assertEquals($firstTag, reset($onlyTag));\n\n return $firstTag->tag_id;\n }", "function urlSegment($int=''){\n $input = get('url');\n $input = explode('/', $input);\n $int--;\n return $input[$int];\n }", "public function testGetTag() {\n $expected = [\n 'tag' => 'example',\n 'htmlTag' => 'example',\n 'template' => '',\n 'displayType' => Decoda::TYPE_BLOCK,\n 'allowedTypes' => Decoda::TYPE_BOTH,\n 'aliasFor' => '',\n 'attributes' => [],\n 'mapAttributes' => [],\n 'htmlAttributes' => [],\n 'aliasAttributes' => [],\n 'escapeAttributes' => true,\n 'lineBreaks' => Decoda::NL_CONVERT,\n 'autoClose' => false,\n 'preserveTags' => false,\n 'onlyTags' => false,\n 'contentPattern' => '',\n 'stripContent' => false,\n 'parent' => [],\n 'childrenWhitelist' => [],\n 'childrenBlacklist' => [],\n 'maxChildDepth' => -1,\n 'persistContent' => true\n ];\n\n $this->assertEquals($expected, $this->object->getTag('example'));\n\n try {\n $this->object->getTag('fakeTag');\n $this->assertTrue(false);\n } catch (\\Exception $e) {\n $this->assertTrue(true);\n }\n }", "function _get_item_segments()\n{\n$segments = \"musical/instrument/\";\nreturn $segments;\n\n}", "public function testShowSecondTagItemfromIndex()\n {\n $client = static::createClient();\n\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/tag');\n $link= $crawler->selectLink('show')\n ->eq(1)\n ->link();\n\n $this->assertEquals(\n\n $link->getUri(),'http://localhost/tag/2');\n\n }", "private function analyzeURL() {\n\t\tif (!$this->_isAnalyzed) {\n\t\t\t// Don't call this method twice!\n\t\t\t$this->_isAnalyzed = true;\n\t\t\t$this->_isAnalyzing = true;\n\t\t\t\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\t$trunkURL = new URL(Config::getEmptyURLPrefix());\n\t\t\t\t} catch (FormatException $e) {\n\t\t\t\t\tthrow new CorruptDataException('The url prefix is not a valid url: '.\n\t\t\t\t\t\tConfig::getEmptyURLPrefix());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// The request url might not be a valid url...\n\t\t\t\ttry {\n\t\t\t\t\t$requestURL = new URL($this->_url);\n\t\t\t\t} catch (FormatException $e) {\n\t\t\t\t\t$this->_pageNode = new PageNotFoundNode(new StructurePageNode(), '');\n\t\t\t\t\t$this->_relativeRequestURL = '';\n\t\t\t\t\t$this->_isAnalyzing = false;\n\t\t\t\t\t$this->_project = Project::getOrganization();\n\t\t\t\t\t$this->_language = Language::getDefault();\n\t\t\t\t\t$this->_edition = Edition::COMMON;\n\t\t\t\t\treturn; \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// We can't use the URL class here because the template contains\n\t\t\t\t// characters ({ and }) that are now allowed in a url\n\t\t\t\tpreg_match('/[^:]+\\:\\/\\/(?P<host>[^\\/]+)(?<path>.*)/i',\n\t\t\t\t\tConfig::getURLTemplate(), $matches);\n\t\t\t\t$templateHost = $matches['host'];\n\t\t\t\t$templatePath = $matches['path'];\n\t\t\t\t\t\n\t\t\t\t// Goes through all elements and checks if they match to any available\n\t\t\t\t// template.\n\t\t\t\t// Returns the index of the element after the last used one\n\t\t\t\t$walker = function($elements, $templates, $trunkElements,\n\t\t\t\t\t$breakOnFailure, $state)\n\t\t\t\t{\n\t\t\t\t\tif (count($trunkElements)) {\n\t\t\t\t\t\tif (count($elements) > count($trunkElements))\n\t\t\t\t\t\t\tarray_splice($elements, -count($trunkElements));\n\t\t\t\t\t\tif (count($templates) > count($trunkElements))\n\t\t\t\t\t\t\tarray_splice($templates, -count($trunkElements));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor ($i = 0; $i < count($elements); $i++) {\n\t\t\t\t\t\t$element = $elements[$i];\n\t\t\t\t\t\tforeach ($templates as $templateKey => $template) {\n\t\t\t\t\t\t\t// Check if the lement matches the template. Test the strongest\n\t\t\t\t\t\t\t// defined template at first.\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tswitch ($template) {\n\t\t\t\t\t\t\t\tcase '{edition}':\n\t\t\t\t\t\t\t\t\tswitch ($element) {\n\t\t\t\t\t\t\t\t\t\tcase 'mobile':\n\t\t\t\t\t\t\t\t\t\t\t$state->edition = Edition::MOBILE;\n\t\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'print':\n\t\t\t\t\t\t\t\t\t\t\t$state->edition = Edition::PRINTABLE;\n\t\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcase '{language}':\n\t\t\t\t\t\t\t\t\t$lang = Language::getByName($element);\n\t\t\t\t\t\t\t\t\tif ($lang) {\n\t\t\t\t\t\t\t\t\t\t$state->language = $lang;\n\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the element matches the template, \n\t\t\t\t\t\t\tif ($ok) {\n\t\t\t\t\t\t\t\tunset($templates[$templateKey]);\n\t\t\t\t\t\t\t\t// unset does not reorder the indices, so use array_splice\n\t\t\t\t\t\t\t\tarray_splice($elements, 0, 1);\n\t\t\t\t\t\t\t\t$i--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($breakOnFailure && !$ok) {\n\t\t\t\t\t\t\tarray_splice($elements, 0, $i);\n\t\t\t\t\t\t\treturn $elements;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn $elements;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// requestURL - emptyURLPrefix = significant data\n\t\t\t\t// urlTemplate - emptyURLPrefix = template for the data\n\t\t\t\t\n\t\t\t\t$state = (object)\n\t\t\t\t\t(array('edition' => Edition::COMMON, 'language' => null));\n\t\t\t\t\n\t\t\t\t// Domain part\n\t\t\t\t$trunkElements = self::explodeRemoveEmpty($trunkURL->getHost(), '.');\n\t\t\t\t$elements = self::explodeRemoveEmpty($requestURL->getHost(), '.');\n\t\t\t\t$templates = self::explodeRemoveEmpty($templateHost, '.');\n\t\t\t\tcall_user_func($walker, $elements, $templates, $trunkElements, false,\n\t\t\t\t\t$state);\n\t\t\t\t\n\t\t\t\t// Path part\n\t\t\t\t$trunkElements = self::explodeRemoveEmpty($trunkURL->getPath(), '/');\n\t\t\t\t$elements = self::explodeRemoveEmpty($requestURL->getPath(), '/');\n\t\t\t\t$templates = self::explodeRemoveEmpty($templatePath, '/');\n\t\t\t\t$elements = call_user_func($walker, $elements, $templates,\n\t\t\t\t\t$trunkElements, true, $state);\n\t\n\t\t\t\tif (!$state->language) {\n\t\t\t\t\tforeach (self::parseHTTPLanguageHeader() as $code) {\n\t\t\t\t\t\tif ($lang = Language::getByName($code)) {\n\t\t\t\t\t\t\t$state->language = $lang;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!$state->language)\n\t\t\t\t\t\t$state->language = Language::getDefault();\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$this->_language = $state->language;\n\t\t\t\t$this->_edition = $state->edition;\n\t\t\t\t\n\t\t\t\t$this->_relativeRequestURL = implode('/', $elements);\n\t\t\t\t\n\t\t\t\tif (!$node = PageNode::fromPath($elements, $impact, $isBackend)) {\n\t\t\t\t\tif ($isBackend) {\n\t\t\t\t\t\t$rest = $this->_relativeRequestURL;\n\t\t\t\t\t\tif ($impact)\n\t\t\t\t\t\t\t$rest = Strings::substring($rest,\n\t\t\t\t\t\t\t\tStrings::length($impact->getURL()) - ($rest[0] == '!' ? 2 : 0));\n\t\t\t\t\t\t$node = new BackendPageNotFoundNode($impact, $rest);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$node = new PageNotFoundNode($impact,\n\t\t\t\t\t\t\tStrings::substring($this->_relativeRequestURL,\n\t\t\t\t\t\t\t\tStrings::length($impact->getURL())));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_pageNode = $node;\n\t\t\t\t$this->_project = $node->getProject();\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$this->_isAnalyzing = false;\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t\t$this->_isAnalyzing = false;\n\t\t}\n\t}", "public function LookForExistingURLSegment($URLSegment)\n {\n return (Tag::get()->filter(array('URLSegment' => $URLSegment))->exclude(array('ID' => $this->ID))->count() !== 0);\n }", "public function test_getTagRequest() {\n\n }", "public function provideUrlLikeTagTests() {\n $result = [\n [[\n 'descr' => \"[email] gets converted.\",\n 'bbcode' => \"Send complaints to [email][email protected][/email].\",\n 'html' => \"Send complaints to <a href=\\\"mailto:[email protected]\\\" class=\\\"bbcode_email\\\">[email protected]</a>.\",\n ]],\n [[\n 'descr' => \"[email] supports both forms.\",\n 'bbcode' => \"Send complaints to [[email protected]]John Smith[/email].\",\n 'html' => \"Send complaints to <a href=\\\"mailto:[email protected]\\\" class=\\\"bbcode_email\\\">John Smith</a>.\",\n ]],\n [[\n 'descr' => \"Bad addresses in [email] are ignored.\",\n 'bbcode' => \"Send complaints to [email]jo\\\"hn@@@exa:mple.com[/email].\",\n 'html' => \"Send complaints to [email]jo&quot;hn@@@exa:mple.com[/email].\",\n ]],\n /*\n [[\n 'descr' => \"[video=youtube] gets converted.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube]dQw4w9WgXcQ[/video]\",\n 'html' => \"Watch this cute doggy!!! <object width=\\\"480\\\" height=\\\"385\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><param name=\\\"allowscriptaccess\\\" value=\\\"always\\\"></param><embed src=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\" type=\\\"application/x-shockwave-flash\\\" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\" width=\\\"480\\\" height=\\\"385\\\"></embed></object>\",\n ]],\n [[\n 'descr' => \"[video=hulu] gets converted.\",\n 'bbcode' => \"Gleeks: [video=hulu]yuo37ilvL7pUlsKJmA6R0g[/video]\",\n 'html' => \"Gleeks: <object width=\\\"512\\\" height=\\\"288\\\"><param name=\\\"movie\\\" value=\\\"http://www.hulu.com/embed/yuo37ilvL7pUlsKJmA6R0g\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><embed src=\\\"http://www.hulu.com/embed/yuo37ilvL7pUlsKJmA6R0g\\\" type=\\\"application/x-shockwave-flash\\\" width=\\\"512\\\" height=\\\"288\\\" allowFullScreen=\\\"true\\\"></embed></object>\",\n ]],\n [[\n 'descr' => \"[video] ignores unknown video services.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=flarb]abcdefg[/video]\",\n 'html' => \"Watch this cute doggy!!! [video=flarb]abcdefg[/video]\",\n ]],\n [[\n 'descr' => \"[video] ignores bad video IDs.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube]b!:=9_?[/video]\",\n 'html' => \"Watch this cute doggy!!! [video=youtube]b!:=9_?[/video]\",\n ]],\n [[\n 'descr' => \"[video] correctly supports width= and height= modifiers.\",\n 'bbcode' => \"Watch this cute doggy!!! [video=youtube width=320 height=240]dQw4w9WgXcQ[/video]\",\n 'html' => \"Watch this cute doggy!!! <object width=\\\"320\\\" height=\\\"240\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\"></param><param name=\\\"allowFullScreen\\\" value=\\\"true\\\"></param><param name=\\\"allowscriptaccess\\\" value=\\\"always\\\"></param><embed src=\\\"http://www.youtube.com/v/dQw4w9WgXcQ&hl=en_US&fs=1&\\\" type=\\\"application/x-shockwave-flash\\\" allowscriptaccess=\\\"always\\\" allowfullscreen=\\\"true\\\" width=\\\"320\\\" height=\\\"240\\\"></embed></object>\",\n ]],\n */\n [[\n 'descr' => \"The [[wiki]] special tag produces a wiki link.\",\n 'bbcode' => \"This is a test of the [[wiki]] tag.\",\n 'html' => \"This is a test of the <a href=\\\"/?page=wiki\\\" class=\\\"bbcode_wiki\\\">wiki</a> tag.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag does not convert [a-zA-Z0-9'\\\".:_-].\",\n 'bbcode' => \"This is a test of the [[\\\"Ab1cd'Ef2gh_Ij3kl.,Mn4op:Qr9st-Uv0wx\\\"]] tag.\",\n 'html' => \"This is a test of the <a href=\\\"/?page=%22Ab1cd%27Ef2gh_Ij3kl.%2CMn4op%3AQr9st_Uv0wx%22\\\" class=\\\"bbcode_wiki\\\">&quot;Ab1cd'Ef2gh_Ij3kl.,Mn4op:Qr9st-Uv0wx&quot;</a> tag.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag can contain spaces.\",\n 'bbcode' => \"This is a test of the [[northwestern salmon]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">northwestern salmon</a>.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag cannot contain newlines.\",\n 'bbcode' => \"This is a test of the [[northwestern\\nsalmon]].\",\n 'html' => \"This is a test of the [[northwestern<br>\\nsalmon]].\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag can contain a title after a | character.\",\n 'bbcode' => \"This is a test of the [[northwestern salmon|Northwestern salmon are yummy!]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">Northwestern salmon are yummy!</a>.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag doesn't damage anything outside it.\",\n 'bbcode' => \"I really loved reading [[arc 1|the first story arc]] because it was more entertaining than [[arc 2|the second story arc]] was.\",\n 'html' => \"I really loved reading <a href=\\\"/?page=arc_1\\\" class=\\\"bbcode_wiki\\\">the first story arc</a> because it was more entertaining than <a href=\\\"/?page=arc_2\\\" class=\\\"bbcode_wiki\\\">the second story arc</a> was.\",\n ]],\n [[\n 'descr' => \"The [[wiki]] special tag condenses and trims internal whitespace.\",\n 'bbcode' => \"This is a test of the [[ northwestern \\t salmon | Northwestern salmon are yummy! ]].\",\n 'html' => \"This is a test of the <a href=\\\"/?page=northwestern_salmon\\\" class=\\\"bbcode_wiki\\\">Northwestern salmon are yummy!</a>.\",\n ]],\n ];\n return $result;\n }", "function getSegment($n)\n{\n foreach (explode(\"/\", preg_replace(\"|/*(.+?)/*$|\", \"\\\\1\", RURL)) as $val) {\n $val = clearSegment($val);\n if ($val != '') {\n $segments[] = $val;\n }\n }\n\n return isset($segments[$n - 1]) ? $segments[$n - 1] : \"\";\n}", "private function get_category_breaking_segment($segments)\n {\n\n // var_dump($segments);\n }", "function GetURLByTag( $tag ) {\n $url = \"\";\n if( empty( $tag['bookmark_id']) ) {\n $links = $this->find( 'all', array( 'conditions' => array('tag_id' => $tag['id'])));\n }else{\n $links = $this->find( 'all', array( 'conditions' => array('bookmark_id' => $tag['bookmark_id'])));\n if( count($links) == 0 ){\n $links = $this->find( 'all', array( 'conditions' => array('tag_id' => $tag['id'])));\n }\n }\n \n $links = $this->removeArrayWrapper('Link', $links);\n $link_count = count($links);\n if( $link_count == 0 ){\n return $url;\n }\n \n $type = $links[0]['type'];\n if( !isset($type) ){\n return $url;\n }\n switch($type){\n case Bookmark::TYPE_NORMAL :{\n $sub_type = 0;\n }break;\n case Bookmark::TYPE_OS :{ // normal\n $ua = $_SERVER['HTTP_USER_AGENT'];\n \n if (strpos($ua, 'Android') !== false) {\n $sub_type = 1;\n } elseif ( (strpos($ua, 'iPhone') !== false) || (strpos($ua, 'iPad') !== false) ) {\n $sub_type = 2;\n } else {\n $sub_type = 9;\n }\n }break;\n case Bookmark::TYPE_TAILS :{ // tails\n $tag_tag = $tag['tag'];\n $url = \"http://plate.id/tails/tails.php?tag=$tag_tag&atp=___SP_PLATETYPE____\";\n return $url;\n }break;\n case Bookmark::TYPE_RANDOM :{ // randam\n $sub_type = rand(1, $link_count);\n }break;\n case Bookmark::TYPE_ROTATE :{ // rotate\n $data_dir = TMP . '/data/smart_plate/rotate/';\n $file_name = $data_dir.$tag['id'].'.dat';\n \n if( file_exists($file_name) ){\n $rotate_count = file_get_contents($file_name);\n $sub_type = $rotate_count + 1;\n if($link_count < $sub_type ){\n $sub_type = 1;\n }\n }else{\n $sub_type = 1;\n }\n \n $black_list = array( 'ZXing (Android)' );\n $ua = $_SERVER['HTTP_USER_AGENT'];\n \n $write_flag = true;\n foreach ($black_list as $value) {\n if (strpos($ua,$value)!==false){\n $write_flag = false;\n break;\n }\n }\n if($write_flag){\n file_put_contents($file_name, $sub_type,LOCK_EX);\n }\n \n }break;\n } \n \n foreach ($links as $link) {\n if( $link['sub_type'] == $sub_type ){\n $url = $link['url'];\n \n // add by geo\n if( !empty($link['additional']) && $link['additional'] == self::ADDITIONAL_BASE_ID ){\n $url .= self::REPLACE_ACCESS_PLATE.self::REPLACE_USER_TOKEN;\n }\n /* if( empty($links['bookmark_id']) ){\n $url = $link['url'];\n }else{\n $url = BookmarkModel::SelectByID($link['bookmark_id']);\n }*/\n break;\n }\n }\n \n return $url;\n }", "public function testGetItemSubCategoryTags()\n {\n }", "function get_tag_link($tag)\n {\n }", "public function testFindTaggedWithConditions() {\n\t\t$this->Tagged->recursive = -1;\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article',\n\t\t\t'conditions' => array('Article.title LIKE' => 'Second %')));\n\t\t$this->assertEqual(count($result), 0);\n\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article',\n\t\t\t'conditions' => array('Article.title LIKE' => 'First %')));\n\t\t$this->assertEqual(count($result), 1);\n\t\t$this->assertEqual($result[0]['Article']['id'], 'article-1');\n\t}", "function nebula_url_components($segment=\"all\", $url=null) {\n\tif ( !$url ) {\n\t\t$url = nebula_requested_url();\n\t}\n\n\t$url_compontents = parse_url($url);\n\tif ( empty($url_compontents['host']) ) {\n\t\treturn;\n\t}\n\t$host = explode('.', $url_compontents['host']);\n\n\t//Best way to get the domain so far. Probably a better way by checking against all known TLDs.\n\tpreg_match(\"/[a-z0-9\\-]{1,63}\\.[a-z\\.]{2,6}$/\", parse_url($url, PHP_URL_HOST), $domain);\n\t$sld = substr($domain[0], 0, strpos($domain[0], '.'));\n\t$tld = substr($domain[0], strpos($domain[0], '.'));\n\n\tswitch ($segment) {\n\t\tcase ('all') :\n\t\t\treturn $url;\n\t\t\tbreak;\n\n\t\tcase ('protocol') : //Protocol and Scheme are aliases and return the same value.\n\t\tcase ('scheme') : //Protocol and Scheme are aliases and return the same value.\n\t\tcase ('schema') :\n\t\t\tif ( $url_compontents['scheme'] != '' ) {\n\t\t\t\treturn $url_compontents['scheme'];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('host') : //In http://something.example.com the host is \"something.example.com\"\n\t\tcase ('hostname') :\n\t\t\treturn $url_compontents['host'];\n\t\t\tbreak;\n\n\t\tcase ('www') :\n\t\t\tif ( $host[0] == 'www' ) {\n\t\t\t\treturn 'www';\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('subdomain') :\n\t\tcase ('sub_domain') :\n\t\t\tif ( $host[0] != 'www' && $host[0] != $sld ) {\n\t\t\t\treturn $host[0];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('domain') : //In http://example.com the domain is \"example.com\"\n\t\t\treturn $domain[0];\n\t\t\tbreak;\n\n\t\tcase ('basedomain') : //In http://example.com/something the basedomain is \"http://example.com\"\n\t\tcase ('base_domain') :\n\t\t\treturn $url_compontents['scheme'] . '://' . $domain[0];\n\t\t\tbreak;\n\n\t\tcase ('sld') : //In example.com the sld is \"example\"\n\t\tcase ('second_level_domain') :\n\t\tcase ('second-level_domain') :\n\t\t\treturn $sld;\n\t\t\tbreak;\n\n\t\tcase ('tld') : //In example.com the tld is \".com\"\n\t\tcase ('top_level_domain') :\n\t\tcase ('top-level_domain') :\n\t\t\treturn $tld;\n\t\t\tbreak;\n\n\t\tcase ('filepath') : //Filepath will be both path and file/extension\n\t\t\treturn $url_compontents['path'];\n\t\t\tbreak;\n\n\t\tcase ('file') : //Filename will be just the filename/extension.\n\t\tcase ('filename') :\n\t\t\tif ( contains(basename($url_compontents['path']), array('.')) ) {\n\t\t\t\treturn basename($url_compontents['path']);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('path') : //Path should be just the path without the filename/extension.\n\t\t\tif ( contains(basename($url_compontents['path']), array('.')) ) { //@TODO \"Nebula\" 0: This will possibly give bad data if the directory name has a \".\" in it\n\t\t\t\treturn str_replace(basename($url_compontents['path']), '', $url_compontents['path']);\n\t\t\t} else {\n\t\t\t\treturn $url_compontents['path'];\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase ('query') :\n\t\tcase ('queries') :\n\t\t\treturn $url_compontents['query'];\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn $url;\n\t\t\tbreak;\n\t}\n}", "function _get_items_segments()\n{\n$segments = \"music/instruments/\";\nreturn $segments;\n\n}", "public function testGetPostByTags()\n {\n $this->call('Get', '/post/tags/phpunit,test');\n $this->seeHeader('content-type', 'application/json');\n $this->seeStatusCode(200);\n }" ]
[ "0.5788491", "0.56912255", "0.56274784", "0.54460824", "0.53734446", "0.53261805", "0.53124434", "0.5291427", "0.5272944", "0.51850253", "0.5183006", "0.51631624", "0.51494676", "0.5146657", "0.5128138", "0.5122809", "0.50755847", "0.5062033", "0.50506943", "0.5045603", "0.5043349", "0.5030509", "0.49642423", "0.49432802", "0.49313226", "0.49290314", "0.4929017", "0.49210438", "0.49180648", "0.4916962" ]
0.7833238
0
Test getting all albums logic
public function testGetAllAlbums() { for($i = 1; self::ALBUMS_TO_MOCK >= $i; $i++) { // First, mock the object to be used in the test $album = $this->createMock(Album::class); $albums[] = $album; } // Now, mock the repository so it returns the mock of the album $albumRepository = $this ->getMockBuilder(AlbumRepository::class) ->disableOriginalConstructor() ->getMock(); $albumRepository->expects($this->once()) ->method('findAll') ->will($this->returnValue($albums)); // Last, mock the EntityManager to return the mock of the repository $entityManager = $this ->getMockBuilder(ObjectManager::class) ->disableOriginalConstructor() ->getMock(); $entityManager->expects($this->once()) ->method('getRepository') ->will($this->returnValue($albumRepository)); $albumFatsManager = new AlbumManagerService($entityManager, self::$paginator, self::$serializer); $result = json_decode( $albumFatsManager->getAllAlbums(), true); $this->assertArrayHasKey('items', $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFetchAllSongs() {\n $songs = factory(Song::class)->create();\n\n $this->get('/graphql?query={songs{id,name,views,lyrics}}')\n ->assertStatus(200)\n ->assertExactJson([\n 'data' => [\n 'songs' => array([\n 'id' => $songs->id,\n 'name' => $songs->name,\n 'views' => $songs->views,\n 'lyrics' => $songs->lyrics\n ])\n ]\n ]);\n }", "public function getAlbums()\n {\n $url = str_replace(\"[:action]\", \"albums\", self::ImgUrAPI_MINE_URL);\n $url = str_replace(\"[:user_id]\", $this->user_id, $url);\n $result = self::excuteHTTPSRequest($url, $this->accessToken);\n\n $_albums = '';\n\n foreach ($result['data'] as $item) {\n $_album = new ImgUrAlbum();\n $_album->setAttributes($item);\n $_albums[] = $_album;\n }\n\n return $_albums;\n }", "public function testAlbums()\n {\n $widget = 'MeCms.Photos::albums';\n\n $expected = [\n ['div' => ['class' => 'widget mb-4']],\n 'h4' => ['class' => 'widget-title'],\n 'Albums',\n '/h4',\n ['div' => ['class' => 'widget-content']],\n 'form' => ['method' => 'get', 'accept-charset' => 'utf-8', 'action' => '/album/album'],\n ['div' => ['class' => 'form-group input select']],\n 'select' => ['name' => 'q', 'onchange' => 'sendForm(this)', 'class' => 'form-control'],\n ['option' => ['value' => '']],\n '/option',\n ['option' => ['value' => 'another-album-test']],\n 'Another album test (2)',\n '/option',\n ['option' => ['value' => 'test-album']],\n 'Test album (2)',\n '/option',\n '/select',\n '/div',\n '/form',\n '/div',\n '/div',\n ];\n $this->assertHtml($expected, $this->Widget->widget($widget)->render());\n\n //Renders as list\n $expected = [\n ['div' => ['class' => 'widget mb-4']],\n 'h4' => ['class' => 'widget-title'],\n 'Albums',\n '/h4',\n ['div' => ['class' => 'widget-content']],\n 'ul' => ['class' => 'fa-ul'],\n ['li' => true],\n ['i' => ['class' => 'fas fa-caret-right fa-li']],\n ' ',\n '/i',\n ['a' => ['href' => '/album/another-album-test', 'title' => 'Another album test']],\n 'Another album test',\n '/a',\n '/li',\n ['li' => true],\n ['i' => ['class' => 'fas fa-caret-right fa-li']],\n ' ',\n '/i',\n ['a' => ['href' => '/album/test-album', 'title' => 'Test album']],\n 'Test album',\n '/a',\n '/li',\n '/ul',\n '/div',\n '/div',\n ];\n $this->assertHtml($expected, $this->Widget->widget($widget, ['render' => 'list'])->render());\n\n //Empty on albums index\n $request = $this->Widget->getView()->getRequest()->withEnv('REQUEST_URI', Router::url(['_name' => 'albums']));\n $this->Widget->getView()->setRequest($request);\n $this->assertEmpty($this->Widget->widget($widget)->render());\n $this->Widget->getView()->setRequest(new ServerRequest());\n $this->assertEquals(2, Cache::read('widget_albums', $this->Table->getCacheName())->count());\n\n //With no photos\n $this->Table->deleteAll(['id IS NOT' => null]);\n $request = $this->Widget->getView()->getRequest()->withEnv('REQUEST_URI', '/');\n $this->Widget->getView()->setRequest($request);\n $this->assertEmpty($this->Widget->widget($widget)->render());\n $this->assertEmpty($this->Widget->widget($widget, ['render' => 'list'])->render());\n }", "function showAllAlbum() {\n $sql = \"SELECT * FROM `itf_album`\";\n return $this->dbcon->FetchAllResults($sql);\n }", "public function testGetAlbumImages($albumId = 1, $page = 1)\n {\n for($i = 1; 25 >= $i; $i++) {\n // First, mock the object to be used in the test\n $image = $this->createMock(Image::class);\n $images[] = $image;\n }\n\n $paginatorEvent = $this\n ->getMockBuilder(SlidingPagination::class)\n ->setMethods(array('getPageCount', 'getItems'))\n ->disableOriginalConstructor()\n ->getMock();\n $paginatorEvent->expects($this->once())\n ->method('getPageCount')\n ->will($this->returnValue(count($images)/Album::MAX_IMAGES_PER_PAGE));\n $paginatorEvent->expects($this->once())\n ->method('getItems')\n ->will($this->returnValue(array_slice($images, ($page-1)*Album::MAX_IMAGES_PER_PAGE, ($page-1)*Album::MAX_IMAGES_PER_PAGE+Album::MAX_IMAGES_PER_PAGE)));\n \n $paginator = $this\n ->getMockBuilder(Paginator::class)\n ->setMethods(array('paginate'))\n ->disableOriginalConstructor()\n ->getMock();\n $paginator->expects($this->once())\n ->method('paginate')\n ->will($this->returnValue($paginatorEvent));\n\n // Use the Abstract query, which has nearly all needed Methods as the Query.\n $query = $this\n ->getMockBuilder(AbstractQuery::class)\n ->setMethods(array('setParameter', 'getResult'))\n ->disableOriginalConstructor()\n ->getMockForAbstractClass();\n\n $imageRepository = $this\n ->getMockBuilder(ImageRepository::class)\n ->disableOriginalConstructor()\n ->getMock();\n $imageRepository->expects($this->once())\n ->method('getAlbumImagesQuery')\n ->will($this->returnValue($query));\n \n $entityManager = $this\n ->getMockBuilder(ObjectManager::class)\n ->disableOriginalConstructor()\n ->getMock();\n $entityManager->expects($this->once())\n ->method('getRepository')\n ->will($this->returnValue($imageRepository));\n\n $albumFatsManager = new AlbumManagerService($entityManager, $paginator, self::$serializer);\n $result = json_decode($albumFatsManager->getAlbumImages($albumId, $page), true);\n \n $this->assertArrayHasKey('items', $result);\n $this->assertArrayHasKey('paging', $result);\n }", "public function getAlbums()\n\t{\n\t\treturn Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'azgallery_album`');\n\t}", "public function loadAlbums()\n {\n\t\t$json = file_get_contents('https://itunes.apple.com/us/rss/topalbums/limit=100/json');\n \n $albums = json_decode($json, true);\n $category_sql = \"INSERT IGNORE INTO categories (name, category_id, link) VALUES (:name, :category_id, :link)\";\n\t\t$album_sql = \"INSERT IGNORE INTO albums (album_id, name, artist, artist_link, category_id, release_date, rank) VALUES (:album_id, :name, :artist, :artist_link, :category_id, :release_date, :rank)\";\n\t\t$images_sql = \"INSERT IGNORE INTO album_art (album_id, album_image, image_size) VALUES (:album_id, :album_image, :image_size)\";\n\n\t\t//Lets delete whatever is in these tables before adding to them.\n\t\t$this->purgeTables();\n \n foreach($albums['feed']['entry'] as $rank=>$album) {\n\t\t\t\n\t\t\t//Insterts categories\n\t\t\t$stmt= $this->db->prepare($category_sql);\n\t\t\t\n\t\t\t$data = [\n\t\t\t\t'name' => $album['category']['attributes']['label'],\n\t\t\t\t'category_id' => $album['category']['attributes']['im:id'],\n\t\t\t\t'link' => $album['category']['attributes']['scheme'],\n\t\t\t];\n\t\t\t\n\t\t\t$stmt->execute($data);\n\t\t\t\n\t\t\t//Insterts album info\n\t\t\t$stmt= $this->db->prepare($album_sql);\n\t\t\t\n\t\t\t$data = [\n\t\t\t\t'album_id' => $album['id']['attributes']['im:id'],\n\t\t\t\t'name' => $album['title']['label'],\n\t\t\t\t'artist' => $album['im:artist']['label'],\n\t\t\t\t'artist_link' => (isset($album['im:artist']['attributes'])) ? $album['im:artist']['attributes']['href'] : '',\n\t\t\t\t'category_id' => $album['category']['attributes']['im:id'],\n\t\t\t\t'release_date' => $album['im:releaseDate']['label'],\n\t\t\t\t'rank' => $rank,\n\t\t\t];\n\n\t\t\t$stmt->execute($data);\n\t\t\t\n\t\t\t//inserts album images\n\t\t\t$stmt= $this->db->prepare($images_sql);\n\t\t\t\n\t\t\tforeach($album['im:image'] as $image){\n\t\t\t\t$data = [\n\t\t\t\t\t'album_id' => $album['id']['attributes']['im:id'],\n\t\t\t\t\t'album_image' => $image['label'],\n\t\t\t\t\t'image_size' => $image['attributes']['height'],\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\t$stmt->execute($data);\n\t\t\t}\n\t\t}\n\t}", "function getAlbums() {\n\n $ro = new GetAlbumsRO();\n $files = glob('Pics/*');\n $numfiles = count($files);\t\n\n for ($i=0; $i < $numfiles; $i++)\n {\n $onefile = $files[$i];\n $imgs_in_album = glob(\"$onefile/*.[jJ][pP][gG]\");\n if (count($imgs_in_album) > 0)\n $album_image = $imgs_in_album[0];\n else\n $album_image = \"res/GenericAlbum.jpg\";\n $album_name = basename($onefile);\n\n $oneAlbum = new AlbumInfo($album_name, $album_image);\n array_push($ro->albums, $oneAlbum);\n }\n\n return $ro;\n}", "public function getAlbums()\n {\n return $this->albums;\n }", "public function get_album_suite()\n {\n $results = array();\n\n $catalog_where = \"\";\n $catalog_join = \"LEFT JOIN `catalog` ON `catalog`.`id` = `song`.`catalog`\";\n if ($catalog) {\n $catalog_where .= \" AND `catalog`.`id` = '$catalog'\";\n }\n if (AmpConfig::get('catalog_disable')) {\n $catalog_where .= \" AND `catalog`.`enabled` = '1'\";\n }\n\n $sql = \"SELECT DISTINCT `album`.`id` FROM album LEFT JOIN `song` ON `song`.`album`=`album`.`id` $catalog_join \" .\n \"WHERE `album`.`mbid`='$this->mbid' $catalog_where ORDER BY `album`.`disk` ASC\";\n\n $db_results = Dba::read($sql);\n\n while ($r = Dba::fetch_assoc($db_results)) {\n $results[] = $r['id'];\n }\n\n return $results;\n\n }", "public function GetAlbums()\n {\n if ($handle = opendir('albums')) {\n # Loop thrue all entries in the directory handle untill it reads boolean FALSE\n while (false !== ($entry = readdir($handle))) {\n # Check to not display root and return links\n if ($entry != \".\" && $entry != \"..\") {\n # Display entry link\n include \"../private_html/templates/albumCell.php\";\n }\n }\n closedir($handle);\n }\n }", "public function testAlbumPictureRelations()\n {\n $album = Album::all()->first();\n // Check if album owns 5 pictures..\n $this->assertEquals($album->pictures->count(), Picture::all()->count());\n }", "public function getAlbumsAction()\n {\n $em = $this->getDoctrine()->getManager();\n $albums = $em->getRepository(Album::class)->findAll();\n\n return $this->handleView($this->view($albums));\n }", "private function getAlbums($aData)\n {\n /**\n * @var string\n */\n $sAction = (isset($aData['sAction']) && $aData['sAction'] == 'new') ? 'new' : 'more';\n /**\n * @var int\n */\n $iLastTimeStamp = isset($aData['iLastTimeStamp']) ? (int) $aData['iLastTimeStamp'] : 0;\n /**\n * @var string\n */\n $sView = isset($aData['sView']) ? $aData['sView'] : '';\n /**\n * @var int\n */\n $iAmountOfAlbum = isset($aData['iAmountOfAlbum']) ? (int) $aData['iAmountOfAlbum'] : 10;\n /**\n * @var string\n */\n $sSearch = isset($aData['sSearch']) ? $aData['sSearch'] : '';\n /**\n * @var array\n */\n $aCond = array();\n\n if (!empty($sSearch))\n {\n $aCond[] = 'm.name LIKE \"' . Phpfox::getLib('parse.input')->clean('%' . $sSearch . '%') . '\"';\n }\n switch ($sView) {\n case 'my':\n $aCond[] = 'm.user_id = ' . Phpfox::getUserId();\n break;\n\n case 'all':\n default:\n $aCond[] = 'm.view_id = 0';\n $aCond[] = 'm.privacy IN(0)';\n break;\n }\n if ($iLastTimeStamp > 0)\n {\n if ($sAction == 'more')\n {\n $aCond[] = 'm.time_stamp < ' . $iLastTimeStamp;\n }\n else\n {\n $aCond[] = 'm.time_stamp > ' . $iLastTimeStamp;\n }\n }\n $this->database()\n ->select('COUNT(*)')\n ->from(Phpfox::getT('music_album'), 'm');\n /**\n * @var int\n */\n $iCount = $this->database()\n ->where(implode(' AND ', $aCond))\n ->limit(1)\n ->execute('getField');\n if ($iCount == 0)\n {\n return array();\n }\n /**\n * @var array\n */\n $aAlbums = $this->database()\n ->select('lik.like_id AS is_liked, m.*, u.user_id, u.profile_page_id, u.server_id AS user_server_id, u.user_name, u.full_name, u.gender, u.user_image, u.is_invisible, u.user_group_id, u.language_id')\n ->from(Phpfox::getT('music_album'), 'm')\n ->leftJoin(Phpfox::getT('like'), 'lik', 'lik.type_id = \\'music_album\\' AND lik.item_id = m.album_id AND lik.user_id = ' . Phpfox::getUserId())\n ->join(Phpfox::getT('user'), 'u', 'u.user_id = m.user_id')\n ->where(implode(' AND ', $aCond))\n ->order('m.time_stamp DESC')\n ->limit(0, $iAmountOfAlbum, $iCount)\n ->execute('getRows');\n /**\n * @var array\n */\n $aResult = array();\n foreach ($aAlbums as $aAlbum)\n {\n $aResult[] = array(\n 'bIsLiked' => isset($aAlbum['is_liked']) ? (bool) $aAlbum['is_liked'] : false,\n 'iAlbumId' => $aAlbum['album_id'],\n 'iViewId' => $aAlbum['view_id'],\n 'iPrivacy' => $aAlbum['privacy'],\n 'iPrivacyComment' => $aAlbum['privacy_comment'],\n 'bIsFeatured' => (bool) $aAlbum['is_featured'],\n 'bIsSponsor' => (bool) $aAlbum['is_sponsor'],\n 'iUserId' => $aAlbum['user_id'],\n 'sName' => $aAlbum['name'],\n 'iYear' => $aAlbum['year'],\n 'sImagePath' => Phpfox::getLib('image.helper')->display(array(\n 'server_id' => $aAlbum['server_id'],\n 'path' => 'music.url_image',\n 'file' => $aAlbum['image_path'],\n 'suffix' => '_50_square',\n 'return_url' => true\n )\n ),\n 'iTotalTrack' => $aAlbum['total_track'],\n 'iTotalPlay' => $aAlbum['total_play'],\n 'iTotalComment' => $aAlbum['total_comment'],\n 'iTotalLike' => $aAlbum['total_like'],\n 'iTotalDislike' => $aAlbum['total_dislike'],\n 'iTotalScore' => $aAlbum['total_score'],\n 'iTotalRating' => $aAlbum['total_rating'],\n 'iTimeStamp' => $aAlbum['time_stamp'],\n 'sTimeStamp' => date('l, F j', $aAlbum['time_stamp']),\n 'sFullTimeStamp' => date('l, F j', $aAlbum['time_stamp']) . ' at ' . date('g:i a', $aAlbum['time_stamp']),\n 'sModuleId' => isset($aAlbum['module_id']) ? $aAlbum['module_id'] : 0,\n 'iItemId' => $aAlbum['item_id'],\n 'iProfilePageId' => $aAlbum['profile_page_id'],\n 'iUserServerId' => $aAlbum['user_server_id'],\n 'sUsername' => $aAlbum['user_name'],\n 'sFullname' => $aAlbum['full_name'],\n 'iGender' => $aAlbum['gender'],\n 'sUserImage' => Phpfox::getLib('image.helper')->display(array(\n 'server_id' => $aAlbum['user_server_id'],\n 'path' => 'core.url_user',\n 'file' => $aAlbum['user_image'],\n 'suffix' => '_50_square',\n 'return_url' => true\n )\n ),\n 'bIsInvisible' => $aAlbum['is_invisible'],\n 'iUserGroupId' => $aAlbum['user_group_id'],\n 'iLanguageId' => isset($aAlbum['language_id']) ? $aAlbum['language_id'] : 0\n );\n }\n return $aResult;\n }", "function get_top_albums() {\n\t\t$data = $this->_request_data('topalbums');\n\n\t\tif (!$data) return false;\n\n\t\tforeach ($data->album as $album) {\n\t\t\t$album = new LastfmAlbum($album, $this->_connection);\n\t\t\t//$album->artist = $this->name;\n\t\t\t$result[] = $album;\n\t\t}\n\n\t\treturn $result;\n\n\t}", "public function getAlbums($id){\n $artist = Artist::find($id);\n return $artist->albums;\n }", "public function getAlbums()\n {\n return GalleryAlbum::get()->filter('ParentID', $this->ID);\n }", "function getAlbumImages($args)\n{\n global $_zp_current_image;\n if (is_object($login_state = authorize($args))) {\n return $login_state;\n }\n $args = decode64($args);\n logger('getAlbumImages', ($args['loglevel']));\n $albumobject = getItemByID('albums', $args['id']);\n $images = $albumobject->getImages();\n if (!($albumobject || !$args['id'])) {\n return new ZEN_Error(-1, 'No folder with database ID '.$args['id'].' found!');\n }\n makeAlbumCurrent($albumobject);\n $list = [];\n while (next_image(true)) {\n $meta = $_zp_current_image->getmetadata();\n if ($meta['EXIFDateTimeOriginal']) {\n $imagedate = $meta['EXIFDateTimeOriginal'];\n } else {\n $imagedate = false;\n }\n $list[] = entitysave([\n 'id' => $_zp_current_image->getID(),\n 'albumid' => $_zp_current_image->getAlbum()->getID(),\n 'name' => $_zp_current_image->filename,\n 'shortdate' => date('Y-m-d', (strtotime(str_replace(' ', '', (str_replace(':', '', $imagedate)))))),\n 'longdate' => $imagedate,\n 'url' => WEBPATH.'index.php?album='.urlencode($_zp_current_image->album->name).'&image='.urlencode($_zp_current_image->filename),\n 'folder' => $_zp_current_image->getAlbum()->getFolder(),\n // added by monta\n 'thumbnail' => $_zp_current_image->getThumbImageFile(),\n 'description' => $_zp_current_image->getDesc(),\n 'commentcount' => count($_zp_current_image->getComments()),\n ]);\n } //next_image( true )\n //writelog((var_export($list, true)));\n return $list;\n}", "public function testGetGalleries() : void {\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getGalleries()));\n }", "public function allAlbums()\n {\n return $this\n ->select(\"*\", \"artists.slug as slugArtist\", \"albums.slug as slugAlbum\", 'albums.created_at as created_at')\n ->join('artists', 'albums.artist', '=', 'artists.id')\n ->orderBy('albums.released', 'desc')\n ->paginate(10);\n }", "public function gallery_albums()\n {\n $lang = $this->data['lang'];\n $user_id = $this->user_id;\n\n $this->data['page'] = 'gallery' ;\n $this->data['gallery_albums'] = $this->home_m->get_data('gallery_albums')->result_array();\n\n $body = 'gallery_albums' ;\n\n $this->load_pages($body,$this->data);\n }", "public function get_albums()\r\n\t{\r\n\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"?kind=album&alt=rss&prettyprint=true\");\r\n\t\treturn $xml;\r\n\t}", "public function testJson()\n {\n $albums = factory('App\\Models\\Album', 3)->create();\n\n $this->get('/albums');\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $albums, $this->response->getContent());\n\n $this->get('/album/' . $albums[0]->id);\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $albums[0], $this->response->getContent());\n\n $songs = factory('App\\Models\\Song', 9)->create(['album' => $albums[0]->id]);\n // Sort by track. Then splice to reset the keys.\n $songs = $songs->sortBy('track')->splice(0);\n\n $this->get('/album/' . $albums[0]->id . '/songs');\n $this->assertResponseStatus(200);\n $this->assertJsonStringEqualsJsonString((string) $songs, $this->response->getContent());\n }", "function albumsList($albums=array(), $startnum=-1, $modvars=array(), $albumsCount=null)\n\t{\n\t\t// Create output object\n\t\t$pnRender = pnRender :: getInstance('crpCasa');\n\n\t\t$pnRender->assign('startnum',$startnum);\n\t\t$pnRender->assign($modvars);\n\t\t$pnRender->assign('albums',$albums);\n\t\t// Assign the information required to create the pager\n\t\t$pnRender->assign('pager', array (\n\t\t\t'numitems' => $albumsCount,\n\t\t\t'itemsperpage' => $modvars['albumsperpage']\n\t\t));\n\n\t\t// Return the output that has been generated by this function\n\t\treturn $pnRender->fetch('crpcasa_user_albums_list.htm');\n\t}", "function albums_get_albums($only_return_title = FALSE) {\n\t$files = read_dir_contents(ALBUMS_DIR, 'files');\n\n\tif ($files) {\n\t\tnatcasesort($files);\n\t\tforeach ($files as $album) {\n\t\t\tinclude(ALBUMS_DIR.'/'.$album);\n\t\t\tif ($only_return_title == TRUE)\n\t\t\t\t$albums[] = $album_name;\n\t\t\telse {\n\t\t\t\t$albums[] = array(\n\t\t\t\t\t'title' => $album_name,\n\t\t\t\t\t'seoname' => str_replace('.php', '', $album)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tunset($album);\n\n\t\treturn $albums;\n\t}\n\n\telse\n\t\treturn false;\n}", "public function test_images_all()\n {\n $response = $this->getJson('/api/images');\n $response\n ->assertStatus(200);\n }", "public function testGetAll()\n {\n $contentCategories = factory(ContentCategory::class, 2)->create();\n $results = $this->contentCategoryService->getAll();\n\n $this->assertTrue( $contentCategories->count() == $results->count() );\n $contentCategories->each( function($contentCategory, $index) use ($results) {\n $this->assertTrue($contentCategory->id == $results[$index]->id);\n });\n }", "public function testGetImages() : void {\n $galleryId = 0;\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getImages($galleryId)));\n }", "public function getAlbumsForArtist($artist_id,$artist_role){\r\n\t\tif($artist_id){\r\n\t\t\t$container = new container_db_dto();\r\n\t\t\t\r\n\t\t\t$limit = (int)$this->messenger[\"query\"][\"limit\"];\r\n\t\t\t$start = (int)$this->messenger[\"query\"][\"start\"];\r\n\t\t\t$orderBy = \"\";\r\n\t\t\tif(\t$this->messenger['query']['sf'] != '' ){\r\n\t\t\t\t$orderBy = \" ORDER BY am.\".$this->messenger['query']['sf'].\" \".$this->messenger['query']['so'];\r\n\t\t\t}\r\n\t\t\t$where = ' where am.status = 1 and aa.artist_id = '.$artist_id;\r\n\t\t\tif($artist_role!=null && key_exists($artist_role,$this->aConfig['artist_type'])){\r\n\t\t\t\t$artist_role_id = $this->aConfig['artist_type'][$artist_role];\r\n\t\t\t\tif($artist_role_id)\r\n\t\t\t\t\t$where = $where.\" and aa.artist_role & \".$artist_role_id.\"=\".$artist_role_id;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$this->apply_where_criteria($where);\r\n\t\t\t$this->sSql = \"select count(aa.album_id) as cnt\r\n\t\t\t\t\t\tfrom artist_album aa left join album_mstr am on am.album_id=aa.album_id\r\n\t\t\t\t\t\tleft join language_mstr lm on lm.language_id=am.language_id \r\n\t\t\t\t\t\tLEFT JOIN label_mstr lb ON lb.label_id=am.label_id \r\n\t\t\t\t\t\t\".$where;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$res = $this->oMysqli->query($this->sSql);\r\n\t\t\tif($res!=-1 and sizeof($res)>0){\r\n\t\t\t\t$container->settotal_count($res[0]->cnt);\r\n\t\t\t\t$this->sSql = \"SELECT am.broadcast_year,am.content_type,am.film_rating,am.grade,lm.language_id,\r\n\t\t\t\t\t\tam.music_release_date,am.album_id,am.album_name,lm.language_name,am.music_release_date,am.title_release_date,am.album_image,\r\n\t\t\t\t\tam.album_type,lb.label_name @@@album_desc@@@ @@@album_excerpt@@@\r\n\t\t\t\t\tfrom artist_album aa left join album_mstr am on am.album_id=aa.album_id\r\n\t\t\t\t\t\tleft join language_mstr lm on lm.language_id=am.language_id \r\n\t\t\t\t\t\tLEFT JOIN label_mstr lb ON lb.label_id=am.label_id \r\n\t\t\t\t\t\t\".$where.\" \".$orderBy .\" LIMIT $start, $limit\";\r\n\t\t\t\t$this->apply_includes();\r\n\t\t\t\t$res = $this->oMysqli->query($this->sSql);\r\n\t\t\t\t$data = array();\r\n\t\t\t\t$album_ids_arr = array();\r\n\t\t\t\tif(sizeof($res)>0 && $res!=-1){\r\n\t\t\t\t\tforeach ($res as $resValue){\r\n\t\t\t\t\t\t$album = new album_db_dto();\r\n\t\t\t\t\t\t$album->setalbum_id($resValue->album_id);\r\n\t\t\t\t\t\t$album_ids_arr[] = $resValue->album_id;\r\n\t\t\t\t\t\t$album->setalbum_name($resValue->album_name);\r\n\t\t\t\t\t\t$album->setalbum_language($resValue->language_name);\r\n\t\t\t\t\t\t$album->setalbum_language_id($resValue->language_id);\r\n\t\t\t\t\t\t$album->setalbum_music_rel_dt($resValue->music_release_date);\r\n\t\t\t\t\t\t$album->setalbum_label($resValue->label_name);\r\n\t\t\t\t\t\t$album->setalbum_type($this->oCommon->getalbumtype($resValue->album_type));\r\n\t\t\t\t\t\t$album->setalbum_title_rel_dt($resValue->title_release_date);\r\n\t\t\t\t\t\t$album->setalbum_df_image($resValue->album_image);\r\n\t\t\t\t\t\t$album->setalbum_broadcast_year($resValue->broadcast_year);\r\n\t\t\t\t\t\t$album->setalbum_content_type($this->oCommon->getalbumcontenttype($resValue->content_type));\r\n\t\t\t\t\t\t$album->setalbum_film_rating($resValue->film_rating);\r\n\t\t\t\t\t\t$album->setalbum_grade($resValue->grade);\r\n\t\t\t\t\t\tif(in_array(\"album_description\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t\t$album->setalbum_description($resValue->album_desc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(in_array(\"album_excerpt\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t\t$album->setalbum_excerpt($resValue->album_excerpt);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$data[]=$album;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$artist_album_map=array();\r\n\t\t\t\t\t$artist_album_map = $this->oCommon->getArtistForAlbum($album_ids_arr);\r\n\t\t\t\t\t$album_tag_map = array();\r\n\t\t\t\t\tif(in_array(\"album_tags\",$this->req_includes_arr)){\r\n\t\t\t\t\t\t$album_tag_map = $this->oCommon->getAlbumTags($album_ids_arr);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tforeach($data as $album){\r\n\t\t\t\t\t\t$id = $album->getalbum_id();\r\n\t\t\t\t\t\tif(key_exists($id,$artist_album_map))\r\n\t\t\t\t\t\t\t$album->setalbum_artist($artist_album_map[$id]);\r\n\t\t\t\t\t\tif(key_exists($id,$album_tag_map))\r\n\t\t\t\t\t\t\t$album->setalbum_tags($album_tag_map[$id]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$container->setdata($data);\r\n\t\t\t\t\r\n\t\t\t\treturn $container->to_array();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "function getSubAlbums($album)\n{\n $list = [];\n $albumObj = new Album($album);\n $albumID = $albumObj->getID();\n $parentID = getItemByID('albums', $albumID);\n if ($albumObj->isDynamic() || !$albumID) {\n return $list;\n }\n $subalbums = $albumObj->getAlbums(null, null, null, null, true);\n $subalbums = $parentID->getAlbums(null, null, null, null, true);\n if (is_array($subalbums)) {\n foreach ($subalbums as $subalbum) {\n $list[] = $subalbum;\n $list = array_merge($list, getSubAlbums($subalbum));\n } //$subalbums as $subalbum\n } //is_array($subalbums)\n return $list;\n}" ]
[ "0.71964335", "0.71896136", "0.718029", "0.7131615", "0.6999202", "0.69774485", "0.6926548", "0.6881394", "0.68349713", "0.6700103", "0.6645254", "0.66048896", "0.6491147", "0.64903736", "0.64357173", "0.64257026", "0.6390221", "0.6379052", "0.63738424", "0.63686156", "0.63390857", "0.6324818", "0.6303906", "0.62948793", "0.62736934", "0.6249781", "0.62480366", "0.62438107", "0.62219393", "0.6213162" ]
0.8215138
0
Construct the content of the MyJobs Tab Container
function MyJobsTabContainer() { global $current_user ; // The container content is either a GUIDataList of // the jobs which have been defined OR form processor // content to add, delete, or update jobs. Wbich type // of content the container holds is dependent on how // the page was reached. $div = html_div() ; $div->add(html_br(), html_h3('My Swim Team Jobs')) ; get_currentuserinfo() ; $season = new SwimTeamSeason() ; $active = $season->getActiveSeasonId() ; $seasonlabel = SwimTeamTextMap::__MapSeasonIdToText($active) ; $jobs = array() ; $jobs[$active] = new SwimTeamUserJobsInfoTable('My Jobs - ' . $seasonlabel['label'], '100%') ; $myjobs = &$jobs[$active] ; $myjobs->setSeasonId($active) ; $myjobs->setUserId($current_user->ID) ; $myjobs->constructSwimTeamUserJobsInfoTable() ; // Report credits versus team requirements $required = get_option(WPST_OPTION_JOB_CREDITS_REQUIRED) ; if ($required === false) $required = 0 ; $div->add($myjobs) ; // Summarize credits versus requirements $div->add(html_h5(sprintf('%s credits assigned / %s credits required.', $myjobs->getCredits(), $required))) ; if ($myjobs->getCredits() < $required) { $notice = html_div('error fade', html_h4(sprintf('Notice: You have not met your team Jobs requirement of %s credits.', $required))) ; $div->add($notice) ; } // Summarize prior seasons if they exist $seasonIds = $season->getAllSeasonIds() ; $div->add(html_h3('Prior Season Jobs')) ; foreach ($seasonIds as $seasonId) { if ((int)$seasonId['seasonid'] != (int)$active) { $seasonlabel = SwimTeamTextMap::__MapSeasonIdToText($seasonId['seasonid']) ; $jobs[$seasonId['seasonid']] = new SwimTeamUserJobsInfoTable('My Jobs - ' . $seasonlabel['label'], '100%') ; $myjobs = &$jobs[$seasonId['seasonid']] ; $myjobs->setUserId($current_user->ID) ; $myjobs->setSeasonId($seasonId['seasonid']) ; $myjobs->constructSwimTeamUserJobsInfoTable() ; $div->add($myjobs, html_br()) ; } } $this->add($div) ; $this->setShowInstructions() ; $this->setInstructionsHeader($this->__ch_instructions_header) ; $this->add($this->buildContextualHelp()) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SwimTeamJobsTabContainer()\n {\n // The container content is either a GUIDataList of \n // the jobs which have been defined OR form processor\n // content to add, delete, or update jobs. Wbich type\n // of content the container holds is dependent on how\n // the page was reached.\n \n $div = html_div() ;\n $div->set_style('clear: both;') ;\n $div->add(html_h3('Swim Team Jobs')) ;\n\n // This allows passing arguments eithers as a GET or a POST\n\n $scriptargs = array_merge($_GET, $_POST) ;\n\n // The jobid is the argument which must be\n // dealt with differently for GET and POST operations\n\n if (array_key_exists(WPST_DB_PREFIX . 'radio', $scriptargs))\n $jobid = $scriptargs[WPST_DB_PREFIX . 'radio'][0] ;\n else if (array_key_exists('_jobid', $scriptargs))\n $jobid = $scriptargs['_jobid'] ;\n else if (array_key_exists('jobid', $scriptargs))\n $jobid = $scriptargs['jobid'] ;\n else\n $jobid = null ;\n\n // So, how did we get here? If $_POST is empty\n // then it wasn't via a form submission.\n\n // Show the list of swim clubs or process an action.\n // If there is no $_POST or if there isn't an action\n // specififed, then simply display the GDL.\n\n if (array_key_exists('_action', $scriptargs))\n $action = $scriptargs['_action'] ;\n else if (array_key_exists('_form_action', $scriptargs))\n $action = $scriptargs['_form_action'] ;\n else\n $action = null ;\n\n // If one of the GDL controls was selected, then\n // the action maybe confusing the processor. Flush\n // any action that doesn't make sense.\n\n if ($action == WPST_ACTION_SELECT_ACTION) $action = null ;\n $actions_allowed_without_jobid = array(\n WPST_ACTION_ADD\n ) ;\n\n if (empty($scriptargs) || is_null($action))\n {\n $div->add($this->__buildGDL()) ;\n $this->setShowActionSummary() ;\n $this->setActionSummaryHeader('Jobs Action Summary') ;\n }\n else if (is_null($jobid) && !in_array($action, $actions_allowed_without_jobid))\n {\n $div->add(html_div('error fade',\n html_h4('You must select a job in order to perform this action.'))) ;\n $div->add($this->__buildGDL()) ;\n $this->setShowActionSummary() ;\n $this->setActionSummaryHeader('Jobs Action Summary') ;\n }\n else // Crank up the form processing process\n {\n switch ($action)\n {\n case WPST_ACTION_PROFILE:\n $c = container() ;\n $profile = new SwimTeamJobProfileInfoTable('Swim Team Job Profile', '500px') ;\n $profile->setJobId($jobid) ;\n $profile->constructSwimTeamJobProfile() ;\n $c->add($profile) ;\n\n break ;\n\n case WPST_ACTION_ADD:\n $form = new WpSwimTeamJobAddForm('Add Swim Team Job',\n $_SERVER['HTTP_REFERER'], 600) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Add Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_UPDATE:\n $form = new WpSwimTeamJobUpdateForm('Update Swim Team Job',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Update Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_DELETE:\n $form = new WpSwimTeamJobDeleteForm('Delete Swim Team Job',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Delete Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_ALLOCATE:\n $form = new WpSwimTeamJobsAllocateForm('Allocate Swim Team Jobs',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Allocate Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_REALLOCATE:\n $form = new WpSwimTeamJobsReallocateForm('Reallocate Swim Team Jobs',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Reallocate Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_DEALLOCATE:\n $form = new WpSwimTeamJobsDeallocateForm('Deallocate Swim Team Jobs',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Deallocate Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_DELETE:\n $form = new WpSwimTeamJobDeleteForm('Delete Swim Team Job',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Delete Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n case WPST_ACTION_SIGN_UP:\n $form = new WpSwimTeamJobAssignForm('Job Sign Up',\n $_SERVER['HTTP_REFERER'], 600) ;\n $form->setJobId($jobid) ;\n $this->setShowFormInstructions() ;\n $this->setFormInstructionsHeader('Sign Up Job Instructions') ;\n $this->setFormInstructionsContent($form->get_form_help()) ;\n break ;\n\n default:\n $div->add(html_h4(sprintf('Unsupported action \"%s\" requested.', $action))) ;\n break ;\n }\n\n // Not all actions are form based ...\n\n if (isset($form))\n {\n // Create the form processor\n\n $fp = new FormProcessor($form) ;\n $fp->set_form_action(SwimTeamUtils::GetPageURI()) ;\n\n // Display the form again even if processing was successful.\n\n $fp->set_render_form_after_success(false) ;\n\n // If the Form Processor was succesful, display\n // some statistics about the action that was performed.\n\n if ($fp->is_action_successful())\n {\n // Need to show a different GDL based on whether or\n // not the end user has a level of Admin ability.\n\n $gdl = $this->__buildGDL() ;\n\n $div->add($gdl, html_br(2)) ;\n\n\t $div->add(html_br(2), $form->form_success()) ;\n\n $this->setShowActionSummary() ;\n $this->setActionSummaryHeader('Jobs Action Summary') ;\n }\n else\n {\n\t $div->add(html_br(), $fp) ;\n }\n }\n else if (isset($c))\n {\n $div->add(html_br(2), $c) ;\n $div->add(SwimTeamGUIButtons::getButton('Return to Jobs')) ;\n }\n else\n {\n $div->add(html_br(2), html_h4('No content to display.')) ;\n }\n }\n\n $this->add($div) ;\n $this->add($this->buildContextualHelp()) ;\n }", "protected function createTabs() {}", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "function register_zijcareebuilderjobswidget() {\n register_widget( 'ZijCareerBuilderJobs' );\n}", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "function ch_widget_tabcontent($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_tabcontent');\n\t\n\tinclude(TEMPLATEPATH . '/tabcontent.php');\n\t\n}", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}", "function elodin_do_jobs_sidebar_genesis() {\n\tdynamic_sidebar( 'jobs' );\n}", "function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}", "private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n $tabParent->class_name = 'AdminLengow';\n $tabParent->id_parent = 0;\n $tabParent->add();\n } else {\n $tabParent = new Tab(Tab::getIdFromClassName('AdminCatalog'));\n $tab = new Tab();\n $tab->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tab->module = 'lengow';\n $tab->class_name = 'AdminLengowHome14';\n $tab->id_parent = $tabParent->id;\n $tab->add();\n $tabParent = $tab;\n }\n foreach ($this->tabs as $name => $values) {\n if (_PS_VERSION_ < '1.5' && $values['name'] === 'AdminLengowHome') {\n continue;\n }\n $tab = new Tab();\n if (_PS_VERSION_ < '1.5') {\n $tab->class_name = $values['name'] . '14';\n $tab->id_parent = $tabParent->id;\n } else {\n $tab->class_name = $values['name'];\n $tab->id_parent = $tabParent->id;\n $tab->active = $values['active'];\n }\n $tab->module = $this->lengowModule->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $tab->name[$language['id_lang']] = LengowMain::decodeLogMessage($name, $language['iso_code']);\n }\n $tab->add();\n LengowMain::log(\n LengowLog::CODE_INSTALL,\n LengowMain::setLogMessage('log.install.install_tab', array('class_name' => $tab->class_name))\n );\n }\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "public function jobs()\n {\n $this->validateManagerType('dtc_queue.manager.job');\n $this->checkDtcGridBundle();\n $managerType = $this->container->getParameter('dtc_queue.manager.job');\n $rendererFactory = $this->container->get('dtc_grid.renderer.factory');\n $renderer = $rendererFactory->create('datatables');\n $gridSource = $this->container->get('dtc_queue.grid_source.jobs_waiting.'.('mongodb' === $managerType ? 'odm' : $managerType));\n $renderer->bind($gridSource);\n $params = $renderer->getParams();\n $this->addCssJs($params);\n\n $params['worker_methods'] = $this->container->get('dtc_queue.manager.job')->getWorkersAndMethods();\n $params['prompt_message'] = 'This will archive all non-running jobs';\n\n return $this->render('@DtcQueue/Queue/jobs.html.twig', $params);\n }", "function __construct()\n\t{\n\t\tparent::__construct(\n\t\t\t'jetty_widget_horizontal_tab',\n\t\t\t__('Jetty Horizontal Tabs', 'jetty'),\n\t\t\tarray( 'description' => __( 'This widget for display horizontal tab on certain page', 'jetty' ), )\n\t\t);\n\t}", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "public function page_content() {\n\t\t$tab = empty( $_REQUEST['tab'] ) ? 'new' : wp_strip_all_tags( wp_unslash( $_REQUEST['tab'] ) ); // Input var okay.\n\t\t$paged = ! empty( $_REQUEST['paged'] ) ? (int) $_REQUEST['paged'] : 1; // Input var okay.\n\n\t\t$tab = esc_attr( $tab );\n\t\t$paged = esc_attr( $paged );\n\n\t\t$filters = _appthemes_get_addons_mp_page_args( $this->args['page_slug'], 'filters' );\n\t\t$defaults = _appthemes_get_addons_mp_page_args( $this->args['page_slug'], 'defaults' );\n\n\t\t$args = array(\n\t\t\t'tab' => $tab,\n\t\t\t'page' => $paged,\n\t\t\t'filters' => $filters,\n\t\t\t'defaults' => $defaults,\n\t\t);\n\n\t\t$table = $this->create_list_table( $this->args['page_slug'], $this->args['parent'], $args );\n\n\t\t// Outputs the tabs, filters and search bar.\n\t\t$table->views();\n\n\t\t/**\n\t\t * Fires on the Add-ons browser tab after the top navigation bar.\n\t\t *\n\t\t * The dynamic part of the hook name refers to the tab slug (i.e. new or popular)\n\t\t *\n\t\t * @param APP_Addons_List_Table $table The content generator instance.\n\t\t */\n\t\tdo_action( \"appthemes_addons_mp_{$tab}\", $table );\n\t}", "protected function init_tabs() {\r\n\t\t$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'firstrun' ), $_SERVER['REQUEST_URI'] );\r\n\r\n\t\tadd_action( 'qc_settings_head', 'qc_status_colors_css' );\r\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\r\n\r\n\t\t$this->tabs->add( 'general', __( 'General', APP_TD ) );\r\n\r\n\t\t$this->tab_sections['general']['main'] = array(\r\n\t\t\t'title' => __( 'General Settings', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Permissions', APP_TD ),\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'name' => 'assigned_perms',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'protected' => __( 'Users can only view their own tickets and tickets they are assigned to.', APP_TD ),\r\n\t\t\t\t\t\t'read-only' => __( 'Users can view all tickets.', APP_TD ),\r\n\t\t\t\t\t\t'read-write' => __( 'Users can view and updated all tickets.', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Lock Site from Visitors', APP_TD ),\r\n\t\t\t\t\t'name' => 'lock_site',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'desc' => __( 'Yes', APP_TD ),\r\n\t\t\t\t\t'tip' => __( 'Visitors will be asked to login, and will not be able to browse site. Also content of the sidebars and menus will be hidden.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['states'] = array(\r\n\t\t\t'title' => __( 'States', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Default State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'This state will be selected by default when creating a ticket.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_new',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Resolved State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'Tickets in this state are assumed to no longer need attention.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_closed',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\t\t$this->tab_sections['general']['colors'] = array(\r\n\t\t\t'fields' => $this->status_colors_options(),\r\n\t\t\t'renderer' => array( $this, 'render_status_colors' ),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['modules'] = array(\r\n\t\t\t'title' => __( 'Modules', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Enable Modules', APP_TD ),\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'name' => 'modules',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'assignment' => __( 'Assignment', APP_TD ),\r\n\t\t\t\t\t\t'attachments' => __( 'Attachments', APP_TD ),\r\n\t\t\t\t\t\t'categories' => __( 'Categories', APP_TD ),\r\n\t\t\t\t\t\t'changesets' => __( 'Changesets', APP_TD ),\r\n\t\t\t\t\t\t'milestones' => __( 'Milestones', APP_TD ),\r\n\t\t\t\t\t\t'priorities' => __( 'Priorities', APP_TD ),\r\n\t\t\t\t\t\t'tags' => __( 'Tags', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'tip' => __( 'Choose the modules that you want to use on your site.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t}", "private function createTablesTab()\n {\n $tab = $this->createTab(\n 'tables_tab',\n '__responsive_tab_tables__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetTables = $this->createFieldSet(\n 'tables_fieldset',\n '__responsive_tab_tables_fieldset_tables__',\n ['attributes' => $attributes]\n );\n\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-bg',\n '@panel-table-header-bg',\n $this->themeColorDefaults['panel-table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-color',\n '@panel-table-header-color',\n $this->themeColorDefaults['panel-table-header-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-bg',\n '@table-row-bg',\n $this->themeColorDefaults['table-row-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-color',\n '@table-row-color',\n $this->themeColorDefaults['table-row-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-highlight-bg',\n '@table-row-highlight-bg',\n $this->themeColorDefaults['table-row-highlight-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-bg',\n '@table-header-bg',\n $this->themeColorDefaults['table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-color',\n '@table-header-color',\n $this->themeColorDefaults['table-header-color']\n )\n );\n\n $tab->addElement($fieldSetTables);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetBadges = $this->createFieldSet(\n 'badges_fieldset',\n '__responsive_tab_tables_fieldset_badges__',\n ['attributes' => $attributes]\n );\n\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-bg',\n '@badge-discount-bg',\n $this->themeColorDefaults['badge-discount-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-color',\n '@badge-discount-color',\n $this->themeColorDefaults['badge-discount-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-bg',\n '@badge-newcomer-bg',\n $this->themeColorDefaults['badge-newcomer-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-color',\n '@badge-newcomer-color',\n $this->themeColorDefaults['badge-newcomer-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-bg',\n '@badge-recommendation-bg',\n $this->themeColorDefaults['badge-recommendation-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-color',\n '@badge-recommendation-color',\n $this->themeColorDefaults['badge-recommendation-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-bg',\n '@badge-download-bg',\n $this->themeColorDefaults['badge-download-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-color',\n '@badge-download-color',\n $this->themeColorDefaults['badge-download-color']\n )\n );\n\n $tab->addElement($fieldSetBadges);\n\n return $tab;\n }", "public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Ensure tab title\r\n\t\t// Do shortcode\r\n\t\tforeach($data['tabs'] as $index=>$tab) {\r\n\t\t\t$ttl = trim(str_replace(\"\\n\", '', $tab['title']));\r\n\t\t\tif (empty($ttl)) {\r\n\t\t\t\t$tab['title'] = 'Tab ' . ($index + 1);\r\n\t\t\t}\r\n\t\t\t$tab['content'] = $this->_do_shortcode($tab['content']);\r\n\t\t\t$data['tabs'][$index] = $tab;\r\n\t\t}\r\n\r\n\t\tif (!$data['preset']) {\r\n\t\t\t$data['preset'] = 'default';\r\n\t\t}\r\n\r\n\t\t$data['wrapper_id'] = str_replace('utabs-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('utabs', $data, dirname(dirname(__FILE__)) . '/tpl/utabs.html');\r\n\r\n\t\t// upfront_add_element_style('upfront_tabs', array('css/utabs.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('upfront_tabs', array('js/utabs-front.js', dirname(__FILE__)));\r\n\r\n\t\treturn $markup;\r\n\t}", "function render_tabs( $attributes ) {\n\t\t\t\tglobal $post;\n\t\t\t\t// If a page, then do split\n\t\t\t\t// Get ids of children\n\t\t\t\t$children = get_pages( array(\n\t\t\t\t\t\t'child_of' => $post->ID\n\t\t\t\t\t\t, 'parent' => $post->ID\n\t\t\t\t\t\t, 'sort_column' => 'menu_order'\n\t\t\t\t) );\n\n\t\t\t\t$child_titles = array();\n\t\t\t\t$child_contents = \"\n\";\n// TODO: start jquery 'loading' action here.\n\n\t\t\t\t$child_tablinks = \"\n<div id='subpage-tabs' class='ui-tabs'>\n\t<ul>\n\";\n\t\t\t\tforeach ( $children as $child ) {\n\t\t\t\t\t$child_tablinks .= \"\t\t<li><a href='#ctab-$child->ID'>$child->post_title</a></li>\n\";\n\t\t\t\t\t// Render any shortcodes\n\t\t\t\t\t$new_content = do_shortcode( $child->post_content );\n\t\t\t\t\t$child_contents .= \"<div id='ctab-$child->ID' class='ui-tabs-hide'>\n$new_content\n</div>\n\";\n\t\t\t\t}\n\t\t\t\t$child_tablinks .= \"\t</ul>\n\";\n\t\t\t\t$child_contents .= \"</div>\n<script type='text/javascript'>\n/*<![CDATA[*/\njQuery(\n\tfunction(){\n\t\tjQuery('#subpage-tabs').tabs();\n }\n);\n/*]]>*/\n</script>\n\";\n// TODO: destroy jquery 'loading' action here.\n\n\t\t\t\t$content = $child_tablinks . $child_contents;\n\t\t\t\treturn $content;\n\t\t}", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "function cd_status_cake_page(){\n ?>\n <div class=\"wrap\">\n <h2>Client Dash Status Cake</h2>\n <?php\n cd_create_tab_page(array(\n 'tabs' => array(\n 'Status' => 'status',\n 'Settings' => 'settings',\n 'Test' => 'test'\n )\n ));\n ?>\n </div><!--.wrap-->\n <?php\n}", "public function createChildControls ()\n\t{\n\t\tif ($this->_container===null)\n\t\t{\n\t\t\t$this->_container=Prado::CreateComponent('System.Web.UI.ActiveControls.TActivePanel');\n\t\t\t$this->_container->setId($this->getId(false).'_content');\n\t\t\tparent::getControls()->add($this->_container);\n\t\t}\n\t}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n\t// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldFeaturedProductSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure featured products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "function __construct() {\r\n\t\tparent::__construct(\r\n\t\t\t'tabs', // Base ID\r\n\t\t\t'Hyunmoo: Tabs Widget', // Name\r\n\t\t\tarray( 'description' => __( 'Popular posts, recent post and comments.', 'hyunmoo' ) ) // Args\r\n\t\t);\r\n\t}", "protected function register_dynamic_templates()\n\t\t{\n\t\t\t\n\t\t\t/**\n\t\t\t * Content Tab\n\t\t\t * ===========\n\t\t\t */\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Button Title', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'This is the text that appears on your button.', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'label',\n\t\t\t\t\t\t\t'type'\t\t=> 'input',\n\t\t\t\t\t\t\t'std'\t\t=> __( 'Click me', 'avia_framework' ),\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'tmpl_set_default'\t=> false\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Additional Description Position', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'Select, where to show an additional description', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'description_pos',\n\t\t\t\t\t\t\t'type'\t\t=> 'select',\n\t\t\t\t\t\t\t'std'\t\t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'subtype'\t=> array(\t\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'No description', 'avia_framework' )\t\t\t=> '',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Description above title', 'avia_framework' )\t=> 'above',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Description below title', 'avia_framework' )\t=> 'below',\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' \t=> __( 'Additional Description', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Enter an additional description', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'content',\n\t\t\t\t\t\t\t'type' \t=> 'textarea',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'tmpl_set_default'\t=> false,\n\t\t\t\t\t\t\t'required'\t=> array( 'description_pos', 'not', '' )\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Button Icon', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Should an icon be displayed at the left side of the button', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon_select',\n\t\t\t\t\t\t\t'type' \t=> 'select',\n\t\t\t\t\t\t\t'std' \t=> 'yes-left-icon',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'subtype'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'No Icon', 'avia_framework' )\t\t\t\t\t\t\t\t\t\t=> 'no',\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Yes, display Icon to the left of the title', 'avia_framework' )\t=> 'yes-left-icon' ,\t\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Yes, display Icon to the right of the title', 'avia_framework' )\t=> 'yes-right-icon',\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Button Icon', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Select an icon for your Button below', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon',\n\t\t\t\t\t\t\t'type' \t=> 'iconfont',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'locked'\t=> array( 'icon', 'font' ),\n\t\t\t\t\t\t\t'required'\t=> array( 'icon_select', 'not_empty_and', 'no' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name' \t=> __( 'Icon Visibility', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc' \t=> __( 'Check to only display icon on hover', 'avia_framework' ),\n\t\t\t\t\t\t\t'id' \t=> 'icon_hover',\n\t\t\t\t\t\t\t'type' \t=> 'checkbox',\n\t\t\t\t\t\t\t'std' \t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true,\n\t\t\t\t\t\t\t'required'\t=> array( 'icon_select', 'not_empty_and', 'no' )\n\t\t\t\t\t\t)\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Button', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'content_button' ), $template );\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t'template_id'\t=> 'linkpicker_toggle',\n\t\t\t\t\t\t\t'name'\t\t\t=> __( 'Button Link?', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t\t=> __( 'Where should your button link to?', 'avia_framework' ),\n\t\t\t\t\t\t\t'subtypes'\t\t=> array( 'manually', 'single', 'taxonomy' ),\n\t\t\t\t\t\t\t'target_id'\t\t=> 'link_target',\n\t\t\t\t\t\t\t'lockable'\t\t=> true\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'content_link' ), $c );\n\t\t\t\n\t\t\t/**\n\t\t\t * Styling Tab\n\t\t\t * ===========\n\t\t\t */\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'name'\t\t=> __( 'Button Title Attribute', 'avia_framework' ),\n\t\t\t\t\t\t\t'desc'\t\t=> __( 'Add a title attribute for this button.', 'avia_framework' ),\n\t\t\t\t\t\t\t'id'\t\t=> 'title_attr',\n\t\t\t\t\t\t\t'type'\t\t=> 'input',\n\t\t\t\t\t\t\t'std'\t\t=> '',\n\t\t\t\t\t\t\t'lockable'\t=> true\n\t\t\t\t\t\t)\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Appearance', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_appearance' ), $template );\n\t\t\t\n\t\t\t$c = array(\n\t\t\t\t\n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t'template_id'\t=> 'button_colors',\n\t\t\t\t\t\t\t'lockable'\t\t=> true,\n\t\t\t\t\t\t\t'ids'\t\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t'bg'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_bg',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'gradient'\t=> 'btn_custom_grad'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t'bg_hover'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_bg_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t'font'\t\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_font',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_font',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t'font_hover' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'color'\t\t=> 'color_font_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom'\t=> 'custom',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'custom_id'\t=> 'custom_font_hover',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t$template = array(\n\t\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t\t'type'\t\t\t=> 'template',\n\t\t\t\t\t\t\t\t'template_id'\t=> 'toggle',\n\t\t\t\t\t\t\t\t'title'\t\t\t=> __( 'Colors', 'avia_framework' ),\n\t\t\t\t\t\t\t\t'content'\t\t=> $c \n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\n\t\t\tAviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_colors' ), $template );\n\t\t\t\n\t\t}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"FIELDTHEMES\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab_2->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldBrandSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configuge brands\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "public function initContent() {\n $this->initTabModuleList();\n $this->initToolbar();\n $this->initPageHeaderToolbar();\n\n if ($this->display == 'edit' || Tools::getValue('display') == 'formPlayer') {\n if (!$this->loadObject(true)) {\n return;\n }\n $this->content = $this->renderForm();\n $this->content.= $this->generateListPlayerLevels();\n $this->content.= $this->generateListPlayerHistory();\n $deletePlayers = false;\n }\n elseif (Tools::isSubmit('addCustomAction')) {\n $this->content = $this->generateFormCustomAction();\n $deletePlayers = false;\n }\n else {\n $this->content = $this->renderList();\n $deletePlayers = true;\n }\n\n // This are the real smarty variables\n $this->context->smarty->assign(\n array(\n 'content' => $this->content,\n 'tab' => 'Players',\n 'loyalty_name' => Configuration::get('krona_loyalty_name', $this->context->language->id, $this->id_shop_group, $this->id_shop),\n 'import' => Configuration::get('krona_import_customer', null, $this->id_shop_group, $this->id_shop),\n 'dont' => Configuration::get('krona_dont_import_customer', null, $this->id_shop_group, $this->id_shop),\n 'deletePlayers' => $deletePlayers,\n 'show_page_header_toolbar' => $this->show_page_header_toolbar,\n 'page_header_toolbar_title' => $this->page_header_toolbar_title,\n 'page_header_toolbar_btn' => $this->page_header_toolbar_btn,\n )\n );\n\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'genzo_krona/views/templates/admin/main.tpl');\n\n $this->context->smarty->assign(array(\n 'content' => $tpl, // This seems to be anything inbuilt. It's just chance that we both use content as an assign variable\n ));\n\n }", "function scb_tabx($atts, $content){\n\t$tabid='';\n\t$tabclass = $atts['class'];\n\t$tabmode = ' nav-tabs';\n\t$tablia = ''; $tabCont = '';\n\t\n\tif($atts['id'] !=''){\n\t\t$tabid = ' id=\"'.$atts['id'].'\"'; \n\t}\n\t\n\tif($atts['mode'] !=''){\n\t\t$tabmode = ' nav-'.$atts['mode']; \n\t}\n\t\n\t$menu = explode('[/tab_content]', $content);\n\t$tabTitle='';\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\tadd_shortcode('content:'.str_replace(' ','',$tabTitle), 'tabMenuCont_sc');\n\t}\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\t$tabSCName = explode(']',$menu[$i])[0];\n\t\t$renscName = '[tab_content:'.str_replace(' ','',$tabTitle);\n\t\t$scName = str_replace($tabSCName, $renscName ,$menu[$i]);\n\t\t$tablia .= '<li role=\"presentation\" '.($i==0?'class=\"active\"':'').'><a href=\"#dv'.$attrs['id'].'_'.$i.'\" data-toggle=\"tab\" role=\"tab\" aria-expanded=\"true\">'.$tabTitle.'</a></li>';\n\t\t\n\t\t$tabCont .= '<div id=\"dv'.$attrs['id'].'_'.$i.'\" class=\"tab-pane '.($i==0?'active':'').'\" >'.do_shortcode(trim($scName)).'</div>';\n\t}\n\t\n\t$retVal = '<div'.$tabid.'><ul class=\"nav'.$tabmode.'\">'.$tablia.'</ul><div class=\"tab-content\">'.$tabCont.'</div></div>';\n\treturn $retVal;\n}" ]
[ "0.72334003", "0.6449623", "0.64269555", "0.60135627", "0.60053825", "0.5973659", "0.5968985", "0.584306", "0.5832033", "0.5829373", "0.57858276", "0.5716708", "0.570044", "0.56979674", "0.56921065", "0.5657792", "0.5644977", "0.5628975", "0.5624484", "0.5566153", "0.55645657", "0.55583704", "0.55560535", "0.55421275", "0.5542087", "0.5540325", "0.55239654", "0.5518743", "0.55172074", "0.5515528" ]
0.7911955
0
Select with an entity provider
public function selectWithEntityProvider( Query\Select $query, EntityProvider $entityProvider, ): \Generator { $entities = $this->db->selectWithEntityProvider($entityProvider, $query); foreach ($entities as $id => $entity) { yield $id => $entity; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runSelect($repo)\n{\n // Var Dumping each entity type to test select\n var_dump($repo->select(new ChocolateBar()));\n var_dump($repo->select(new Cookie()));\n var_dump($repo->select(new Noodle()));\n}", "public function getSourceEntity();", "public function getEntities();", "public function getEntities();", "public function selectEntitiesCallback(array &$form, FormStateInterface $form_state) {\n return $form[$this->fieldDefinition->getName()];\n }", "public function get_entities();", "public function select($proveedor);", "public function selectWithEntityProviderCollection(\n Query\\Select $query,\n EntityProvider $entityProvider,\n ): Collection {\n $entities = $this->selectWithEntityProvider($query, $entityProvider);\n\n $collection = $this->db->createCollection();\n $collection->fromIterable($entities);\n\n return $collection;\n }", "public function getSelect();", "public function getSelect();", "public function getBy(array $where): ?IEntity;", "public function select($producto);", "public function getEntity ($entity, array $columns = array());", "public function findAllEntities();", "public function getEntity();", "public function getEntity();", "public function getEntity();", "public function selectorProvider()\n {\n return [\n [Book::selectOne($this->getConn())],\n [Book::select($this->getConn())->one()]\n ];\n }", "public function selectById($id);", "public function selectById($id);", "public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}", "public function testSelectRelatedObject() {\n $session = $this->getSampleProjectSession(true);\n $manager = $session->query(\n 'SELECT project.manager FROM sample_Project project WHERE project.projectId = :projectId'\n )->execute(array('projectId' => '35569',))->one();\n $this->assertEquals(99990, $manager->userId);\n }", "public function find($entity_id);", "abstract protected function getEntity();", "public function retrieve($entityName, $id);", "protected function getEntity() {\n return $this->getContextValue('entity');\n }", "public function get_selected_entities(ComplexContentObjectPathNode $node);", "public function offsetGetProvider()\n {\n $entity1 = $this->createMock(IdentifyTestEntity::class);\n $entity2 = $this->createMock(IdentifyTestEntity::class);\n $entity3 = $this->createMock(IdentifyTestEntity::class);\n\n $entities = [1 => $entity1, 3 => $entity2, 7 => $entity3];\n\n return [\n [$entities, 1, $entity1],\n [$entities, 3, $entity2],\n [$entities, 7, $entity3]\n ];\n }", "public function select() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return $src->select($this);\r\n\t\treturn $this->source->select($this);\r\n\t}", "public function getMetadataQueryProviderWrapper();" ]
[ "0.6278961", "0.5699237", "0.54928046", "0.54928046", "0.54398084", "0.5422887", "0.5370171", "0.5369449", "0.53683597", "0.53683597", "0.5347553", "0.5340555", "0.5333859", "0.5290274", "0.5267355", "0.5267355", "0.5267355", "0.52594054", "0.52480656", "0.52480656", "0.5240541", "0.52321357", "0.52128536", "0.5197979", "0.51942205", "0.5178493", "0.51722926", "0.51632833", "0.515805", "0.515523" ]
0.6202772
1
Create an empty collection
protected function createEmptyCollection(): Collection { /** @var Collection<TEntity> $emptyCollection */ $emptyCollection = new Collection($this->db); return $emptyCollection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createCollection()\n {\n return $this->_setUpNewNode(\n new Collection()\n );\n }", "public static function empty(): CollectionInterface\n {\n /** @var array<NewTKey, NewT> $emptyArray */\n $emptyArray = [];\n\n return self::fromIterable($emptyArray);\n }", "static function collection()\n {\n return new Collection();\n }", "private function create_collection() {\n\n\t\treturn new MapCollection();\n\t}", "public function createCollection($data = array());", "public function __construct()\n {\n $this->_collection = new Collection();\n }", "protected function createCollection()\n {\n $model = $this->getModel();\n return $model->asCollection();\n }", "public function testCreateCollection()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function __construct(){\r\n\t\t$this->collection = new Collection();\r\n\t}", "public function __construct()\n {\n $this->items = new Collection;\n }", "public function __construct()\n {\n $this->items = new Collection;\n }", "public function createCollection($name) {}", "public function testWhenNoInputIsSentToTheConstructorThenInitializeUsingAnEmptyArray()\n {\n $element1 = new \\stdClass();\n $element1->Name = 'EL 1';\n\n $element2 = new \\stdClass();\n $element2->Name = 'EL 2';\n\n $Collection = new \\MySQLExtractor\\Common\\Collection();\n\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array(), $elements);\n\n $Collection->add($element1);\n\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array($element1), $elements);\n\n $Collection->add($element2);\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array($element1, $element2), $elements);\n }", "public static function createEmpty(): self\n {\n return new static([]);\n }", "public static function createCollection($values = null)\n {\n return new Collection(get_called_class(), $values);\n }", "function ting_ting_collection_create($empty, $data = NULL, $conf = FALSE) {\n $context = new ctools_context('ting_collection');\n $context->plugin = 'ting_collection';\n\n if ($empty) {\n return $context;\n }\n\n if ($conf) {\n $collection_id = is_array($data) && isset($data['object_id']) ? $data['object_id'] : (is_object($data) ? $data->id : 0);\n\n module_load_include('client.inc', 'ting');\n $data = ting_get_collection_by_id($collection_id, TRUE);\n }\n\n if (!empty($data)) {\n $context->data = $data;\n $context->title = t('@title by @author', array('@title' => $data->title, '@author' => $data->creators_string));\n $context->argument = $collection_id;\n\n return $context;\n }\n}", "public function __construct()\n {\n $this->categories = new ArrayCollection();\n $this->families = new ArrayCollection();\n $this->types = new ArrayCollection();\n $this->designations = new ArrayCollection();\n $this->makes = new ArrayCollection();\n }", "public function newCollection(array $models = []): Collection\n {\n return new Collection($models);\n }", "public function clearCollection()\n {\n $this->collections = [];\n }", "public function __construct()\n {\n $this->articles = new ArrayCollection();\n $this->commentaires = new ArrayCollection();\n }", "public function createCollectionFromArray($data)\n {\n $data['hidden'] = (bool) ArrayUtils::get($data, 'hidden');\n $data['single'] = (bool) ArrayUtils::get($data, 'single');\n $data['managed'] = (bool) ArrayUtils::get($data, 'managed');\n\n return new Collection($data);\n }", "public function __construct(Collection $collection = null)\r\n {\r\n $this->collection = $collection ?: new Collection;\r\n }", "public function __construct()\n {\n $this->users = new ArrayCollection();\n }", "private function createCollection()\n {\n $class = get_class($this->data);\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "public function newCollection(array $models = array())\n\t{\n\t\treturn new MyCollection($models);\n\t}", "public function newCollection(array $models = []);", "public function __construct()\n {\n $this->tasks = new ArrayCollection();\n $this->comments = new ArrayCollection();\n $this->timeEntries = new ArrayCollection();\n }", "public function test_create__with_collection()\n {\n\n $testee = new ElementFactory();\n\n $spec = [\n 'attributes' => [\n 'type' => 'collection',\n 'name' => 'test',\n ],\n 'elements' => [\n [\n 'attributes' => [\n 'type' => 'text',\n 'name' => 'my-text'\n ]\n ]\n ]\n ];\n\n $element = $testee->create($spec);\n static::assertInstanceOf(CollectionElementInterface::class, $element);\n\n $elements = $element->elements();\n static::assertNotEmpty($elements);\n static::assertInstanceOf(ElementInterface::class, reset($elements));\n }", "public function newCollection(array $models = array())\n {\n return new Collection($models);\n }", "protected function _prepareCollection()\n {\n $collection = $this->collectionFactory->create();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }" ]
[ "0.72536355", "0.71918607", "0.7083345", "0.69771785", "0.6951325", "0.6920966", "0.68662", "0.6842843", "0.6841601", "0.6698901", "0.6698901", "0.6564318", "0.65251786", "0.64816815", "0.64647067", "0.64235854", "0.6378004", "0.63545185", "0.6349212", "0.6335846", "0.63342506", "0.63210136", "0.6306841", "0.62871987", "0.62779915", "0.6277663", "0.6274941", "0.619103", "0.6184587", "0.61781603" ]
0.83229446
0
end function __destruct Create the whole picture and return as string
public function DrawPicture() { $hogerarm = $this->GetHogerArm(); $vansterarm = $this->GetVansterArm(); $vansterben = $this->GetVansterBen(); $hogerben = $this->GetHogerBen(); $kroppen = $this->GetKroppen(); $huvud = $this->GetHuvud(); $repet = $this->GetRepet(); $stolpen = $this->GetStolpen(); $kullen = $this->GetKullen(); $header = $this->GetSvgHeader(); $html = <<<EOD {$header} {$kullen} {$stolpen} {$kroppen} {$hogerarm} {$vansterarm} {$vansterben} {$hogerben} {$repet} {$huvud} </svg> EOD; return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "protected function _makeImage()\n {\n $result = array();\n $width='170';\n $height='40';\n $characters= mt_rand(5,7);\n $possible = '123456789aAbBcCdDeEfFgGhHIijJKLmMnNpPqQrRstTuUvVwWxXyYZz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n $font = './fonts/Milonga-Regular.ttf';\n /* font size will be 70% of the image height */\n $font_size = $height * 0.67;\n try {\n $image = @imagecreate($width, $height);\n /* set the colours */\n $text_color = imagecolorallocate($image, 20, 40, 100);\n $noise_color = imagecolorallocate($image, 100, 120, 180);\n /* generate random dots in background */\n for( $i=0; $i<($width*$height)/3; $i++ ) {\n imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color);\n }\n /* generate random lines in background */\n for( $i=0; $i<($width*$height)/150; $i++ ) {\n imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color);\n }\n /* create textbox and add text */\n $textbox = imagettfbbox($font_size, 0, $font, $code);\n $x = ($width - $textbox[4])/2;\n $y = ($height - $textbox[5])/2;\n imagettftext($image, $font_size, 0, $x, $y, $text_color, $font , $code);\n ob_start();\n imagejpeg($image);\n $image_code = ob_get_contents ();\n ob_end_clean();\n imagedestroy($image);\n $result = array();\n $result['1'] = base64_encode($image_code);\n Tinebase_Session::getSessionNamespace()->captcha['code'] = $code;\n } catch (Exception $e) {\n if (Core::isLogLevel(LogLevel::NOTICE)) Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $e->getMessage());\n }\n return $result;\n }", "public function create_image(){\n\t\t$md5_hash = md5(rand(0,999));\n\t\t$security_code = substr($md5_hash, 15, 5);\n\t\t$this->Session->write('security_code',$security_code);\n\t\t$width = 80;\n\t\t$height = 22;\n\t\t$image = ImageCreate($width, $height);\n\t\t$black = ImageColorAllocate($image, 37, 170, 226);\n\t\t$white = ImageColorAllocate($image, 255, 255, 255);\n\t\tImageFill($image, 0, 0, $black);\n\t\tImageString($image, 5, 18, 3, $security_code, $white);\n\t\theader(\"Content-Type: image/jpeg\");\n\t\tImageJpeg($image);\n\t\tImageDestroy($image);\n\t}", "function createImage($width=135,$height=45)\r\n\t{\r\n\t\theader(\"Content-type:image/jpeg\");\r\n\r\n\t\t// create an image \r\n\t\t$im=imagecreate($width,$height);\r\n\r\n\t\t// white background\r\n\t\t$black=imagecolorallocate($im,0,0,0);\r\n\r\n\r\n\t\t// black text and grid\r\n\t\t$white=imagecolorallocate($im,255,255,255);\r\n $other=imagecolorallocate($im,0,0,255);\r\n\t\t// get a random number to start drawing out grid from\r\n\t\t$num=rand(0,5);\r\n\r\n\t\t// draw vertical bars\r\n\t\tfor($i=$num;$i<=$width;$i+=10)\r\n\t\t\timageline($im,$i,0,$i,45,$other);\r\n\r\n\t\t// draw horizontal bars\r\n\t\tfor($i=$num;$i<=$height+10;$i+=10)\r\n\t\t\timageline($im,0,$i,135,$i,$other);\r\n\r\n\t\t// generate a random string\r\n\t\t$string=substr(strtolower(md5(uniqid(rand(),1))),0,7);\r\n\t\t\r\n\t\t$string=str_replace('2','a',$string);\r\n\t\t$string=str_replace('l','p',$string);\r\n\t\t$string=str_replace('1','h',$string);\r\n\t\t$string=str_replace('0','y',$string);\r\n\t\t$string=str_replace('o','y',$string);\r\n\r\n\t\t// place this string into the image\r\n\t\t$font = imageloadfont('anticlimax.gdf'); \r\n\r\n imagestring($im,$font,10,10,$string, $white);\r\n\t\t// create the image and send to browser\r\n\t\timagejpeg($im);\r\n\t\t// destroy the image\r\n\t\timagedestroy($im);\r\n\r\n\t\t// return the random text generated\r\n\t\treturn $this->text=$string;\r\n\t}", "public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}", "public function image();", "public function image();", "protected function dumpImage():string{\n\t\tob_start();\n\n\t\ttry{\n\n\t\t\tswitch($this->options->outputType){\n\t\t\t\tcase QROutputInterface::GDIMAGE_GIF:\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QROutputInterface::GDIMAGE_JPG:\n\t\t\t\t\timagejpeg($this->image, null, max(0, min(100, $this->options->jpegQuality)));\n\t\t\t\t\tbreak;\n\t\t\t\t// silently default to png output\n\t\t\t\tcase QROutputInterface::GDIMAGE_PNG:\n\t\t\t\tdefault:\n\t\t\t\t\timagepng($this->image, null, max(-1, min(9, $this->options->pngCompression)));\n\t\t\t}\n\n\t\t}\n\t\t// not going to cover edge cases\n\t\t// @codeCoverageIgnoreStart\n\t\tcatch(Throwable $e){\n\t\t\tthrow new QRCodeOutputException($e->getMessage());\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t$imageData = ob_get_contents();\n\t\timagedestroy($this->image);\n\n\t\tob_end_clean();\n\n\t\treturn $imageData;\n\t}", "public function clear()\n\t{\n\t\t$props = array('thumb_marker', 'library_path', 'source_image', 'new_image', 'width', 'height', 'rotation_angle', 'x_axis', 'y_axis', 'wm_text', 'wm_overlay_path', 'wm_font_path', 'wm_shadow_color', 'source_folder', 'dest_folder', 'mime_type', 'orig_width', 'orig_height', 'image_type', 'size_str', 'full_src_path', 'full_dst_path');\n\n\t\tforeach ($props as $val)\n\t\t{\n\t\t\t$this->$val = '';\n\t\t}\n\n\t\t$this->image_library \t\t= 'gd2';\n\t\t$this->dynamic_output \t\t= FALSE;\n\t\t$this->quality \t\t\t\t= 90;\n\t\t$this->create_thumb \t\t= FALSE;\n\t\t$this->thumb_marker \t\t= '_thumb';\n\t\t$this->maintain_ratio \t\t= TRUE;\n\t\t$this->master_dim \t\t\t= 'auto';\n\t\t$this->wm_type \t\t\t\t= 'text';\n\t\t$this->wm_x_transp \t\t\t= 4;\n\t\t$this->wm_y_transp \t\t\t= 4;\n\t\t$this->wm_font_size \t\t= 17;\n\t\t$this->wm_vrt_alignment \t= 'B';\n\t\t$this->wm_hor_alignment \t= 'C';\n\t\t$this->wm_padding \t\t\t= 0;\n\t\t$this->wm_hor_offset \t\t= 0;\n\t\t$this->wm_vrt_offset \t\t= 0;\n\t\t$this->wm_font_color\t\t= '#ffffff';\n\t\t$this->wm_shadow_distance \t= 2;\n\t\t$this->wm_opacity \t\t\t= 50;\n\t\t$this->create_fnc \t\t\t= 'imagecreatetruecolor';\n\t\t$this->copy_fnc \t\t\t= 'imagecopyresampled';\n\t\t$this->error_msg \t\t\t= array();\n\t\t$this->wm_use_drop_shadow \t= FALSE;\n\t\t$this->wm_use_truetype \t\t= FALSE;\n\t}", "public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }", "public function gen_thumbnail()\n {\n }", "public function gen_thumbnail()\n {\n }", "private function generateThumbnailGD(){\n\t\t\n\t}", "public function getImage();", "public function getImage();", "public function getImage();", "public function getImage();", "public function getImage() {}", "public function toGDImage() {}", "function mk_cThumb($cID, $str=''){\n\t$sqlTT = \"SELECT Codename, Overview, Waiver, Team FROM ma_Characters WHERE CharID = $cID;\"; #ToolTip\n\t$cName = $cOverview = $cWaiver = $cTeam = '';#initialize\n\t$resultTT = mysqli_query(IDB::conn(),$sqlTT) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\t$dbTT = pdo(); # pdo() creates and returns a PDO object\n\n\t#$result stores data object in memory\n\ttry {$resultTT = $dbTT->query($sqlTT);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\tif($resultTT->rowCount() > 0)\n\t{#there are records - present data\n\t\t#set values needed for tool tip\n\t\twhile($rowTT = $resultTT->fetch(PDO::FETCH_ASSOC))\n\t\t{# pull data from associative array\n\t\t\t$cOverview = $rowTT['Overview'];\n\t\t\t$cWaiver = $rowTT['Waiver'];\n\t\t\t$cTeam = $rowTT['Team'];\n\t\t\t$cName = $rowTT['Codename'];\n\t\t}\n\t}\n\tunset($resultTT, $dbTT); #free resources\n\n\t#verify Image or use FPO\n\t#create Image Path\n\t$filename = './../uploads/_assigned/' . $cID . '-1t.jpg';\n\t#Verify image exists, show\n\tif (file_exists($filename)) {\n\t\t$filename = VIRTUAL_PATH . 'uploads/_assigned/' . $cID . '-1t.jpg';\n\t}else{\n\t\t#no image, use fpo static\n\t\t$filename = VIRTUAL_PATH . '_img/_static/static---00' . rand(0, 8). '.gif';\n\t}\n\n/*\n\n\nhttp://localhost/WrDKv4/_img/_static/static---005.gif\n\n\n\n*/\n\n\n\n\n\n\t#construct the polyThumb\n\t$str .= '<div class=\"text=center\">\n\t\t\t<a href=\"' . VIRTUAL_PATH . 'characters/profile.php?id=' . $cID . '&act=show\"\n\t\t\t\ttarget=\"_blank\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-container=\"body\" class=\"tooltiplink\" data-html=\"true\"\n\t\t\t\tdata-original-title=\"' . $cName . ' >> ' . $cOverview . '\"\n\t\t\t\t>\n\t\t\t\t<img src=\"' . $filename . '\" alt=\"' . $cName . '\" style=\"width:50px\">\n\t\t\t</a>\n\t\t</div>';\n\n\treturn $str;\n\n}", "public function ImageCreateForOnline($name)\n {\n list($width,$height)=getimagesize(\"images/imagesevice/createImg.png\");\n $authimg = imagecreate($width,$height);\n $bg_color = ImageColorAllocate($authimg,68,68,68);\n\n $bg = ImageCreateFromPng(\"images/imagesevice/createImg.png\");\n imagecopyresized($authimg,$bg,0,0,0,0,$width,$height,$width,$height); \n\n $fontfile =\"images/imagesevice/simhei.ttf\";\n putenv('GDFONTPATH=' . realpath($fontfile));\n\n $font_color = ImageColorAllocate($authimg,0,0,0); \n $box = imagettfbbox(25, 0, $fontfile, $name);\n $fontwidth = $box[4]-$box[0];\n ImageTTFText($authimg, 25, 0, ceil(($width-$fontwidth)/2), 830, $font_color, $fontfile, $name);\n\n $font_color = ImageColorAllocate($authimg,68,68,68);\n $dateTime = date(\"Y年m月d日\");\n $boxtime = imagettfbbox(15, 0, $fontfile, $dateTime);\n $datewidth = $boxtime[4]-$boxtime[0];\n ImageTTFText($authimg, 15, 0, ceil(($width-$datewidth)/2), 1175, $font_color, $fontfile, $dateTime);\n //imagestring($authimg, 5, 430, 430, date(\"Y年m月d日\"), $font_color);\n //imagestring($authimg, 5, 230, 730, $name, $font_color);\n $fs = new Filesystem();\n if(!$fs->exists($this->_filedir . '/Online'))\n $fs->mkdir($this->_filedir . '/Online', 0700);\n $fileName = '/Online/' . time() . rand(100,999) . '.png';\n $hechengImg = $this->_filedir . $fileName;\n ImagePNG($authimg,$hechengImg);\n return $fileName;\n }", "public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }", "public function picture(){\n }", "function createImage($string){\n\t\t//pr($string);die('okszzz');\n\t\t$data\t= base64_decode($string);\n\t\t//echo ($data);die('oksss');\n\t\t\n\t\t$db_img = imagecreatefromstring($data); \n\t\t//.pr($db_img);die;\n\t\t$type = \"jpg\";\n\t\t$name\t= '';\n\t\tif ($db_img !== false) {\n\t\t\tswitch ($type) {\n\t\t\tcase \"jpg\":\n\t\t\t$rand \t= rand(0000, 9999);\n\t\t\t$name\t= $rand.\"user.jpg\";\n\t\t\t\n\t\t\timagejpeg($db_img,$name, '100');\n\t\t\t$img = imagejpeg($db_img,$name, '100');\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\n\t\t}\n\t\treturn $name;\n\t\n\t\n\t}", "function getImage();", "function create_image(){\r\n\t$wmark = imagecreatefrompng('img/stamp.png');\r\n\t//Load jpg image\r\n\t$image = imagecreatefromjpeg('img/image'.rand(1,3).'.jpg');\r\n\t\r\n\t//Get image width/height\r\n\t$width = imagesx($image);\r\n\t$height = imagesy($image);\r\n\t\r\n\t// Set the margins for the stamp and get the height/width of the stamp image\r\n\t$marge_right = 10;\r\n\t$marge_bottom = 10;\r\n\t$sx = imagesx($wmark);\r\n\t$sy = imagesy($wmark);\r\n\t\r\n\t// Copy the stamp image onto our photo using the margin offsets and the photo width to calculate positioning of the stamp. \r\n\timagecopy($image, $wmark, $width-$sx-$marge_right, $height-$sy-$marge_bottom,0,0,$sx,$sy);\r\n\t\r\n\t// Prepare the final image and save to path. If you only pass $image it will output to the browser instead of a file.\r\n\timagepng($image,\"generatedImage.png\");\r\n\t\r\n\t// Output and free memory\r\n\timagedestroy($image);\r\n}", "public function createImage3(){\n $this->triangleCreate(240, 100, 290, 50, 340, 100);\n $this->triangleCreate(40, 300, 90, 250, 140, 300);\n $this->triangleCreate(440, 300, 490, 250, 540, 300);\n $this->createLine(265, 100, 105, 265);\n $this->createLine(315, 100, 475, 265);\n $this->createLine(125, 285, 455, 285);\n $this->generateImage();\n }", "function createImg()\n {\n // imagem de origem\n if ($this->ext == \"png\")\n $img_origem= imagecreatefrompng($this->origem);\n\t\telseif ($this->ext == \"gif\")\n $img_origem= imagecreatefromgif($this->origem);\n elseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromjpeg($this->origem);\n\t\t\telseif ($this->ext == \"jpg\" || $this->ext == \"jpeg\")\n $img_origem= imagecreatefromwbmp($this->origem);\n return $img_origem;\n }", "function printFull()\n {\n echo'<div class=\"box\" style=\"background-image: url(\\'';\n if($this->img!=\"\")echo $this->img;\n else echo(\"https://$_SERVER[HTTP_HOST]/media/favicons/placeholder.jpg\");\n echo'\\');\">\n <div class=\"box-overlay\">\n <div>\n <h6>'.$this->name.'</h6>';\n if($this->position!=\"\")echo'<h5 class=\"w\" style=\"margin-bottom:3px;margin-top: 3px;\">'.$this->position.'</h5>';\n if($this->email!=\"\")echo'<span><a href=\"mailto:'.$this->email.'@pacificmun.com\">'.$this->email.'@pacificmun.com</a></span>';\n echo'</div><p>'.$this->bio.'</p>\n </div></div>';\n }", "function print_image($path){\n $image = new Imagick();\n $image->readImage(_LOCAL_.$path);\n $height = $image->getImageHeight();\n $width = $image->getImageWidth();\n\n $canvas = new Imagick();\n $canvas->newImage($width,$height,new ImagickPixel('white'));\n $canvas->setImageFormat('png');\n $canvas->compositeImage($image,imagick::COMPOSITE_OVER, 0, 0);\n\n header('Content-type: image/png');\n echo $canvas;\n $image->destroy();\n $canvas->destroy();\n}" ]
[ "0.6639298", "0.6626835", "0.6621953", "0.6611568", "0.6599016", "0.656784", "0.656784", "0.65570116", "0.6518296", "0.6492374", "0.649044", "0.649044", "0.6482874", "0.64606035", "0.64606035", "0.64606035", "0.64606035", "0.64259464", "0.6407831", "0.640222", "0.63727474", "0.6358352", "0.63166636", "0.6281401", "0.62672347", "0.62604076", "0.62580234", "0.62539434", "0.6249075", "0.6245201" ]
0.66364205
1
Display List of sales
public function sales() { $orders = Order::seller(auth()->id())->paginate(20); $transactioncount = Order::transactioncount(auth()->id()); return view('frontend.order.sales', compact('orders', 'transactioncount')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function salesAction()\n {\n $vars['products'] = $this->model->getDiscounts();\n $this->view->render('sales', $vars);\n }", "public function index()\n {\n $sales = $this->sale_object->get_sales();\n\n return view('admin.sale.list', compact('sales'));\n }", "public function index()\n\t{\n\t\treturn $this->response(Sales::all());\n\t}", "public function show(Sales $sales)\n {\n //\n }", "public function index()\n {\n $sales = Sale::paginate(10);\n\n return view('manage.sales.index')\n ->withSales($sales);\n }", "public function index()\n {\n $sales = ShopSale::all();\n\n return view('admin.shop_sales.index', compact('sales'));\n }", "public function indexsales()\n {\n //usuario logueado\n $user = Auth::user();\n $id = $user->id;\n\n //$customers = User::find($id)->load('customer');\n $sales = DB::select('SELECT sales.id As sale_id, sale_target, sale_date, sale_description, sale_price, sale_credit, customers.name_customer, customers.lastname_customer FROM sales INNER JOIN customers on customer_id=customers.id WHERE customers.user_id=? ORDER BY sales.id DESC', [$id]);\n\n return view('allsales', ['sales' => $sales]);\n }", "public function index()\n {\n $sales = Sale::orderBy('created_at', 'asc')->get();\n return view('admin.panel.sales.index', [\n 'sales' => $sales\n ]);\n }", "public function showSales(array $saleInput)\n {\n\n // Query that will find all sales\n $showAllSalesQuery = null;\n $options = array();\n\n // Check if there is a specified time interval to check sales for\n switch (count($saleInput)) {\n\n // There isn't, list all sales\n case 1:\n\n $showAllSalesQuery = $this->prepare(\n \"CALL GET_SALES()\"\n );\n\n break;\n\n // There are months specified, list all sales between them\n default:\n\n $startDate = $saleInput[1] . '-01';\n $endDate = $saleInput[2] . '-01';\n array_push($options, $startDate, $endDate);\n\n $showAllSalesQuery = $this->prepare(\n \"CALL GET_SALES_BETWEEN_TWO_DATES(?, ?)\"\n );\n\n }\n\n if ($showAllSalesQuery->execute($options)) {\n while ($row = $showAllSalesQuery->fetch(\\PDO::FETCH_ASSOC)) {\n echo $row['make'] . ',' . $row['model'] . ',' . $row['date_sold'] . PHP_EOL;\n echo 'Sold to ' . $row['name'] . ' for ' . $row['amount'] . PHP_EOL;\n echo '--' . PHP_EOL;\n }\n $showAllSalesQuery->closeCursor();\n }\n\n echo '---------' . PHP_EOL;\n\n $totalQuery = $this->query(\"CALL GET_SALES_AMOUNT()\");\n while ($amountRow = $totalQuery->fetch(\\PDO::FETCH_ASSOC)) {\n echo 'Total: ' . $amountRow['sales_amount'] . PHP_EOL;\n }\n }", "public function index()\n {\n $records = sale::with('party')->get();\n return view('sales.salesView',compact('records'));\n }", "public function index()\n {\n $sales = Sale::paginate(10);\n\n return view('sales.index', compact('sales'));\n }", "public function index()\n {\n $sales= Sale::all();\n return view('admin.sale.index',compact('sales'));\n }", "public function index()\n\t{\n\t\t$sales = Sales::paginate(5);\n\t\treturn View::make('trading.sales.index')->with('sales',$sales);\n\t}", "public function getAllSales()\n {\n return $this->join('customers','sales.customer_id','=','customers.id')\n ->select('sales.*','customers.name as customer')\n ->get();\n }", "public function index()\n {\n return view('sales.sale');\n }", "public function index()\n {\n //\n \n $sales=Sale::all(); \n return view('sales.sales.index',compact('sales'));\n\n }", "static public function ctrShowSumSales(){\n\n\t\t\t$tabla = \"productos\";\n\n\t\t\t$respuesta = ModelProducts::mdlShowSumSales($tabla);\n\n\t\t\treturn $respuesta;\n\n\n\t\t}", "public function index()\n {\n $saledProducts = DB::table('sales')->orderBy('id', 'desc')\n ->select('id','sku', 'product_name', 'sale_date', 'product_qty')\n ->get();\n\n return $saledProducts->toArray();\n }", "public function index()\n {\n $sales = Sale::orderBy('sales_id' ,'desc')->get();\n\n return view('sales.index', compact('sales'));\n }", "public function index()\n {\n $sales = Sale::orderBy('created_at','DESC')->paginate(env('ITEMS_PER_PAGE',4));\n return view('sale.index',compact('sales'));\n }", "public function index()\n {\n $sale = Sale::all();\n return $this->showAll($sale);\n }", "public function index()\n {\n\n global $total;\n\n $products = Product::paginate();\n foreach($products as $product){\n $str=$product->name;\n $str=substr($str, 0, strrpos($str, ' '));\n if (isset($_GET[$str])||isset($_GET[$product->name])){\n $total+=$product->price;\n }\n }\n $total-=$total;\n\n $userinfo = Usr::latest()->paginate();\n\n return view('sales.index',compact('userinfo'),compact('products'),compact('total'));\n }", "public function index()\n {\n $items = SalesItem::distinct()->get(['supplier']);\n\n return view('scrap.sale.index', compact('items'));\n }", "public function getInventoryAndSales() {\n\t\t$isql=\"SELECT i.id as value,i.item_name as label,i.sell_price,i.quantity FROM inventory i where rstatus='A' and quantity > 0\";\t\t\n\t\t$iresult=$this->runQuery('getAll',$isql);\n\t\t\n\t\t$sosql=\"SELECT so.id as so_id,so.product_id as inv_id,p.item_name as inv_name,date(so.sell_date) as selling_date,so.customer_name,so.sell_price as selling_price,so.prod_qty as selling_qty,so.comments FROM sales_order so, inventory p where p.id = so.product_id and so.rstatus ='A'\";\t\t\n\t\t$soresult=$this->runQuery('getAll',$sosql);\n\t\t\n\t\techo '[{\"invDropdownList\":'.json_encode($iresult).',\"salesOrderList\":'.json_encode($soresult).'}]';\n\t}", "public function index()\n {\n $sale = Sale::orderBy('id', 'DESC')->get();\n $casher = User::where('type', 2)->where('state', 1)->get();\n $deliveryMan = User::where('type', 3)->where('state', 1)->get();\n $num = 1;\n return view('admin.sales.index', compact('sale', 'num', 'casher', 'deliveryMan'));\n }", "public function getSaleList()\n {\n return $this->with('images','manufacturer', 'category')->sale()->get();\n }", "public function tabelsales()\n {\n return DB::table('tbl_sales')->get();\n }", "public function index()\n {\n $sales = sale::all();\n \n return $this->sendResponse(saleResource::collection($sales), 'sale retrieved successfully.');\n }", "public function index()\n {\n $sales = Sale::orderBy('id','DESC')->paginate();\n // dd($sales); // Muestra objeto\n return view('admin.sales.index', compact('sales'));\n }", "public function index()\n {\n $sale = Sale::all(); \n $sale->load('salesCustomer');\n $sale->load('salesProduct');\n $sale->load('salesStatus');\n return view('sale', compact('sale'));\n }" ]
[ "0.8036167", "0.7577183", "0.7555189", "0.7413726", "0.7344004", "0.73341286", "0.7237053", "0.71266216", "0.71044636", "0.71041876", "0.70760506", "0.70718765", "0.70669776", "0.703529", "0.70250165", "0.7002437", "0.69593096", "0.6932469", "0.692528", "0.69215214", "0.6910417", "0.6900258", "0.689582", "0.68944323", "0.6886476", "0.687541", "0.6855258", "0.6850223", "0.6848821", "0.68434924" ]
0.7695878
1
/ example : AddressHelper::getWashingtonTax("6500 Linderson way", "aa", 985011001); return : array "status"=>false/true : ok or not ok "rate"=>1, //rate "code"=>500,//api code "message"=>"Internal error"// message
public static function getWashingtonTax($addressStr, $city, $postalCode) { $result = array ( "status" => false, "rate" => - 1, "code" => 500, "message" => "Internal error" ); $url = "http://dor.wa.gov/AddressRates.aspx?output=text&addr=" . urlencode ( $addressStr ) . "&city=" . urlencode ( $city ) . "&zip=" . urlencode ( $postalCode ); \DatoLogUtil::info ( "Washington Tax URL:" . $url ); $ch = curl_init ( $url ); curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, "GET" ); curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true ); $httpResult = curl_exec ( $ch ); $httpcode = curl_getinfo ( $ch, CURLINFO_HTTP_CODE ); curl_close ( $ch ); if ($httpcode != "200") { $result ["code"] = $httpcode; \DatoLogUtil::info ( "Washington Tax Result:" . json_encode ( $result ) ); return $result; } $elements = explode ( " ", $httpResult ); foreach ( $elements as $element ) { $values = explode ( "=", $element ); if (count ( $values ) > 1) { switch ($values [0]) { case "ResultCode" : $result ["code"] = $values [1]; switch ($result ["code"]) { case 0 : $result ["message"] = "The address was found."; break; case 1 : $result ["message"] = "The address was not found, but the ZIP+4 was located."; break; case 2 : $result ["message"] = "Neither the address or ZIP+4 was found, but the 5-digit ZIP was located."; break; case 3 : $result ["message"] = "The address, ZIP+4, and ZIP could not be found."; break; case 4 : $result ["message"] = "Invalid arguements."; break; case 5 : $result ["message"] = "Internal error."; break; default : $result ["message"] = ""; break; } break; case "Rate" : $result ["rate"] = $values [1]; if ($values [1] > 0) { $result ["status"] = true; } break; default : break; } } } \DatoLogUtil::info ( "Washington Tax Result:" . json_encode ( $result ) ); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_tax($merchant_id,$access_token)\r\n{\r\n$curl=curl_init('https://apisandbox.dev.clover.com/v3/merchants/'.$merchant_id.'/tax_rates');\r\n\r\ncurl_setopt($curl, CURLOPT_HTTPHEADER, array(\r\n \r\n \"Authorization:Bearer \".$access_token,\r\n 'Content-Type: application/json',\r\n)\r\n); \r\n\r\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n$auth = curl_exec($curl);\r\n$info = curl_getinfo($curl);\r\n$tax_result=json_decode($auth);\r\nreturn $tax_result;\r\n}", "function externalapis()\n\n {\n //get usd rate\n\n\n //koinok value\n $koinok = koinokapi();\n\n //idex\n $idex = idexapi();\n\n //mercatox\n $mercatox = mercatoxapi();\n\n //etherflyer\n $etherflyer = etherflyerapi();\n\n //bancor\n $bancor = bancorapi();\n// echo json_encode($koinok);\n\n $result = array('IDEX'=>$idex,'KOINOK'=>$koinok,'MERCATOX'=>$mercatox,'ETHERFLYER'=>$etherflyer,'BANCOR'=>$bancor);\n echo json_encode($result);\n\n }", "public function getExternalTaxRate();", "public function getCustomerTaxvat();", "function get_cost($from, $to,$weight)\r\n{\r\n require_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('cost/find', array(\r\n 'from' =&amp;gt; $from,\r\n 'to' =&amp;gt; $to,\r\n 'weight' =&amp;gt; $weight.'000',\r\n 'courier' =&amp;gt; 'jne',\r\n'API-Key' =&amp;gt;'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\r\n ));\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n $prices = $result['price'];\r\n $city = $result['city'];\r\n \r\n echo 'Ongkos kirim dari ' . $city-&amp;gt;origin . ' ke ' . $city-&amp;gt;destination . '&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';\r\n \r\n foreach ($prices-&amp;gt;item as $item)\r\n {\r\n echo 'Layanan: ' . $item-&amp;gt;service . ', dengan harga : Rp. ' . $item-&amp;gt;value . ',- &amp;lt;br /&amp;gt;';\r\n }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan jalur pengiriman dari surabaya ke jakarta';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "abstract public function getTaxType();", "function get_city($query,$type)\r\n{\r\nrequire_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&amp;gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&amp;gt;post('city/list', array(\r\n 'query' =&amp;gt; $query,\r\n 'type' =&amp;gt; $type,\r\n 'courier' =&amp;gt; 'jne',\r\n 'API-Key' =&amp;gt; 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' ), 'JSON');\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&amp;gt;code == 0)\r\n {\r\n return $cities = $result['cities'];\r\n //print_r($cities);\r\n //foreach ($cities-&amp;gt;item as $item)\r\n //{\r\n //echo 'Kota: ' . $item . '&amp;lt;br /&amp;gt;';\r\n // }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan kota yang diawali &amp;quot;band&amp;quot;';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}", "public function getTaxRate();", "function get_flight_inter_from_ws($depcode, $arvcode, $outbound_date, $inbound_date, $adult, $child, $infant, $triptype='ROUND_TRIP', $format='json'){\n\t\n\t$outbound_date = str_replace('/','-',$outbound_date);\n\t$inbound_date = isset($inbound_date) && !empty($inbound_date) ? str_replace('/','-',$inbound_date) : $outbound_date;\n\t$api_key = '70cd2199f6dc871824ea9fed45170af354ffe9e6';\n\t$supplier = 'hnh';\n\t\n\t$url = 'http://api.vemaybaynamphuong.com/index.php/apiv1/api/flight_search_inter/format/'.$format;\n\t$url .= '/supplier/'.$supplier;\n\t$url .= '/depcode/'.$depcode;\n\t$url .= '/arvcode/'.$arvcode;\n\t$url .= '/outbound_date/'.$outbound_date;\n\t$url .= '/inbound_date/'.$inbound_date;\n\t$url .= '/adult/'.$adult;\n\tif($child > 0){\n\t\t$url .= '/child/'.$child;\n\t}\n\tif($infant > 0){\n\t\t$url .= '/infant/'.$infant;\n\t}\n\t$url .= '/triptype/'.$triptype;\n\t\n\t$curl_handle = curl_init();\n\tcurl_setopt($curl_handle, CURLOPT_URL, $url);\n\tcurl_setopt($curl_handle, CURLOPT_TIMEOUT, 30);\n curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 30);\n\tcurl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('X-API-KEY: '.$api_key));\n\tcurl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n\t\n\t$buffer = curl_exec($curl_handle);\n\tcurl_close($curl_handle);\n\t$result = json_decode($buffer, true);\n\treturn $result;\n}", "function query_api($term, $location, $price, $radius, $categories, $sort) { \n $response = search($term, $location, $price, $radius, $categories, $sort);\n echo $response;\n}", "public function validatePaytypeCodeApi(){\n\t\t$acct_id = $this->input->post('acct_id');\n\t\t$query = $this->db->get_where('acct_categories', ['id' => $acct_id]);\n\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach($query->result() as $r);\n\t\t\n\t\t\n\t\t\t$data['status'] \t\t= 'true';\n\t\t\t$data['customerName']\t= $r->first_name.' '.$r->last_name;\n\t\t\t$data['customerAddress']\t= nl2br($r->street_address);\n\t\t\t$data['customerAddress']\t.= '<br />Client Role : '.typeDbTableRow($r->rolename)->rolename;\n\t\t\t$data['customerAddress']\t.= '<br />Contact No : '.$r->contactno ;\n\t\t\t$data['customerAddress']\t.= ($r->passport_no = '') ?\n\t\t\t\t\t\t\t\t\t\t'<br /> Passport No : '. $r->passport_no :\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'<br /> MyFair Account No : '. $r->account_no;\n\t\t\t\t\t\t\t\t\t\t'<br /> Adhaar Card No : '. $r->adhaar_no;\n\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\telse{\n\t\t\t$data['status'] \t\t\t= 'false';\n\t\t\t$data['customerName']\t\t= '';\n\t\t\t$data['customerAddress']\t= '';\n\t\t}\n\n\t\techo json_encode($data);\n\t}", "public function get_bill_detail_vat_tax($bill_id,$type) {\r\n\t\t$query = $this->db->get_where('bill_detail', array('bill_id' => $bill_id,'type'=>$type));\r\n $result = $query->result_array();\r\n\t\treturn $result;\r\n \r\n\t}", "public function getTaxRates() {\n // Parse XML\n $xml = \"<TaxRateGetRq></TaxRateGetRq>\\n\";\n\t\t\n // Create request and pack\n\t\t$this->createRequest($xml);\n $len = strlen($this->xmlRequest);\n $packed = pack(\"N\", $len);\n\n // Send and get the response\n fwrite($this->id, $packed, 4);\n fwrite($this->id, $this->xmlRequest);\n $this->getResponse();\n\n // Set the result\n $this->setResult($this->parseXML($this->xmlResponse));\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 }", "function get_business_details($business_id) {\n\n //converts into '/v3/businesses/{id}'\n $business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id);\n \n $response = request($GLOBALS['API_HOST'], $business_path);\n\n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\n $data = json_decode($pretty_response, true);\n\n //var_dump($data);\n\n return $data;\n}", "public function getTaxInvoiced();", "public function get_tax_details(){\r\n\t\t\r\n\t\t$data\t\t\t\t\t\t\t= array();\r\n\t\t$data['tax_id']\t\t\t\t\t= $this->uri->segment(3);\r\n\t\t$data['tax_details']\t= $this->Common_model->get_tax_details($data['tax_id']);\r\n\t\techo json_encode($data['tax_details']);\r\n\t}", "public static function calculate_tax_filter() {\n global $edd_options;\n\n if ( isset( $edd_options['taxedd_private_token'] ) ) {\n $private_key = $edd_options['taxedd_private_token'];\n \n try { \n\n $taxtaxamo = new Taxamo( new APIClient( $private_key, 'https://api.taxamo.com' ) );\n\n $cart_items = edd_get_cart_content_details();\n\n $countrycode = \"\";\n\n $address = edd_get_customer_address();\n\n if ( isset($address['country']) && !empty($address['country']) && \"\" !== $address['country'] ) {\n $countrycode = $address['country'];\n } else {\n $ipcc = taxedd_get_country_code();\n $countrycode = $ipcc->country_code;\n }\n\n $transaction = new Input_transaction();\n $transaction->currency_code = edd_get_currency();\n $transaction->buyer_ip = $_SERVER['REMOTE_ADDR'];\n $transaction->billing_country_code = $countrycode;\n $transactionarray = array();\n $customid = \"\";\n $transaction->force_country_code = $countrycode;\n\n if ( !empty( $cart_items ) ) { \n foreach ( $cart_items as $cart_item ) {\n\n $customid++;\n $transaction_line = new Input_transaction_line();\n $transaction_line->amount = $cart_item['item_price'];\n $transaction_line->custom_id = $cart_item['name'] . $customid;\n array_push( $transactionarray, $transaction_line );\n\n }\n }\n\n $transaction->transaction_lines = $transactionarray;\n\n $resp = $taxtaxamo->calculateTax( array( 'transaction' => $transaction ) );\n\n return $resp->transaction->tax_amount;\n\n } catch ( exception $e ) {\n\n return \"\";\n }\n }\n }", "function searcharraySh($ponumber, $status, $paramSh, $shippingUrl, $querytype){\n\t\t$carrier =\"\";\n\t\t$clink=\"\";\n\t\t\t\t\n\t\t$resultshvalreturn = \"\";\n\t\t\n\t\t\n\tif($status==\"80\" || $status==\"75\"){\n\t\t\n\t\t\n\t\t$responseSh='';\n\t\t//if($querytype == '4' ){$responseSh='';}\n\t\tif($shippingUrl == \"\"){$responseSh='';}\n\t\telse{\n\t\t$wsdlSh = $shippingUrl;\n\t\t$paramSh['referenceNumber'] = $ponumber;\n\t\ttry {\n\t\t\t$clientSh = new SoapClient($wsdlSh);\n\t\t\t$responseSh = $clientSh->__soapCall(\"getOrderShipmentNotification\", array($paramSh));\n\t\t} catch (SoapFault $e) {\n\t\t // echo \"<pre>SoapFault: \".print_r($e, true).\"</pre>\\n\";\n\t\t\t//echo \"Failed to load\";\n\t\t\t\n\t\t // echo \"<pre>faultcode: '\".$e->faultcode.\"'</pre>\";\n\t\t // echo \"<pre>faultstring: '\".$e->getMessage().\"'</pre>\";\n\t\t\t$erromsgSh = \"Failed to load\";\n\t\t\t$responseSh=\"SoapFault\";\n\t\t}\n\t\t\n\t\t}\n\t\t$arraysh = json_decode(json_encode($responseSh), true);\n\t\t\n\t\t\n\t\tif($arraysh==\"SoapFault\"){\n\t\t\t\t$resultshvalreturn=\"Fail to load\";\n\t\t\t\treturn $resultshvalreturn;\n\t\t\t\tdie();\n\t\t\t}\t\n\t\t\t\n\t\t\t$narray=isset($arraysh['OrderShipmentNotificationArray']['OrderShipmentNotification']) ? $arraysh['OrderShipmentNotificationArray']['OrderShipmentNotification'] : \"\";\n\t\tif(isset($arraysh['OrderShipmentNotificationArray']['OrderShipmentNotification']['purchaseOrderNumber'])){\n\t\t\t$ponumsearcharray=array($narray);\n\t\t}\n\t\telse{\n\t\t\t$ponumsearcharray=$narray;\t\n\t\t\t}\n\t\t/*print \"<pre>\";\t\n\t\tprint_r($ponumsearcharray);\n\t\tprint \"</pre>\";*/\n\t\t\tif(is_array($ponumsearcharray)){\n\t\t\tforeach($ponumsearcharray as $ponumsearch){\n\t\t\t\tif($ponumber ==$ponumsearch['purchaseOrderNumber']){\n\t\t\t\t$parray = isset($ponumsearch['SalesOrderArray']['SalesOrder']) ? $ponumsearch['SalesOrderArray']['SalesOrder'] : \"\";\n\t\t\t\tif(isset($ponumsearch['SalesOrderArray']['SalesOrder']['ShipmentLocationArray'])){\n\t\t\t\t\t\t$salesorderarray=array($parray);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$salesorderarray=$parray;\n\t\t\t\t}\n\t\t\t\t/*print \"<pre>\";\t\n\t\t\t\tprint_r($salesorderarray);\n\t\t\t\tprint \"</pre>\";*/\n\t\t\t\t\tif(is_array($salesorderarray)){\n\t\t\t\t\tforeach($salesorderarray as $salesorder){\n\t\t\t\t\t$sarray = isset($salesorder['ShipmentLocationArray']['ShipmentLocation']) ? $salesorder['ShipmentLocationArray']['ShipmentLocation'] : \"\";\n\t\t\t\t\tif(isset($salesorder['ShipmentLocationArray']['ShipmentLocation']['PackageArray'])){\n\t\t\t\t\t\t\t$ShipmentLocationarray=array($sarray);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$ShipmentLocationarray=$sarray;\n\t\t\t\t\t}\n\t\t\t\t\t/*print \"<pre>\";\t\n\t\t\t\t\tprint_r($ShipmentLocationarray);\n\t\t\t\t\tprint \"</pre>\";*/\n\t\t\t\t\tif(is_array($ShipmentLocationarray)){\n\t\t\t\t\t\tforeach($ShipmentLocationarray as $ShipmentLocation){\n\t\t\t\t\t\t$sharray = isset($ShipmentLocation['PackageArray']['Package']) ? $ShipmentLocation['PackageArray']['Package'] : \"\";\n\t\t\t\t\t\tif(isset($ShipmentLocation['PackageArray']['Package']['trackingNumber'])){\n\t\t\t\t\t\t\t\t$PackageArrayarray=array($sharray);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$PackageArrayarray=$sharray;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*print \"<pre>\";\t\n\t\t\t\t\t\tprint_r($PackageArrayarray);\n\t\t\t\t\t\tprint \"</pre>\";*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(is_array($PackageArrayarray)){\n\t\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\t\t\t\t\t\tforeach($PackageArrayarray as $Package){\n\t\t\t\t\t\t\t\t\t\t\t\t//if($i!=0){$resultshvalreturn.= \", \";}\n\t\t\t\t\t\t\t\t\t\t\t\t\t//if(isset($Package['trackingNumber'])){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ptrackingNumber = isset($Package['trackingNumber']) ? $Package['trackingNumber'] : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$pcarrier = isset($Package['carrier']) ? $Package['carrier'] : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$pshipmentMethod = isset($Package['shipmentMethod']) ? $Package['shipmentMethod'] : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$trakingno = trackingno($pcarrier, $ptrackingNumber, $pshipmentMethod);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$resultshvalreturn.= $trakingno;\n\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\t\t$i++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t}\n\t\t}\n\t\t\n\t\t\t\t\t}//die();\n\t\t//$resultshvalreturn.= \"<br / >/*********Po Array loop*********/<br / ><br / >\";\n\t\t\t}\n\t\t\t}\n\t\t\t}\n}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\n\t\t\t\n\t\t\tif($resultshvalreturn==\"\" && ($status == \"80\" || $status == \"75\")){ $resultshvalreturn=\"Shipped\"; }\n\t\t\telseif($status == \"99\"){ $resultshvalreturn=\"Canceled\"; }\n\t\t\telseif($resultshvalreturn==\"\" && ($status == \"10\" || $status == \"11\" || $status == \"20\" || $status == \"30\" || $status == \"40\" || $status == \"41\" || $status == \"42\" || $status == \"43\" || $status == \"44\" || $status == \"60\" || $status == \"70\")){$resultshvalreturn=\"In Process\";}\n\t\t\treturn $resultshvalreturn;\n\t\t\tset_time_limit(0);\n\t}", "function get_bchDeposit_user($addr)\n{\n try {\n $url = 'https://blockdozer.com/insight-api/addr/' . $addr . '/balance';\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_TIMEOUT, 15);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $data = curl_exec($ch);\n\n $dataresult = json_decode($data);\n\n curl_close($ch);\n /*echo \"<pre>\";\n print_r($result);*/\n return ($dataresult) / 100000000;\n } catch (\\Exception $e) {\n \\Log::error([$e->getMessage(), $e->getLine(), $e->getFile()]);\n return view('errors.404');\n }\n}", "public function get_notpaid_notrequired_taxcode() {\n $matches = array();\n $query_string = htmlspecialchars($_POST['q'], ENT_QUOTES, 'UTF-8');\n $type = htmlspecialchars($_POST['type'], ENT_QUOTES, 'UTF-8');\n if($type == 'taxcode') {\n $result = $this->classtraineemodel->get_notpaid_notrequired_taxcode($this->tenant_id, $query_string, '');\n if ($result) {\n foreach ($result as $row) {\n $matches[] = array(\n 'key' => $row->user_id,\n 'label' => $row->tax_code . ' (Name: ' . $row->first_name . ' ' . $row->last_name . ')',\n 'value' => $row->tax_code\n );\n }\n }\n }else { \n $result = $this->classtraineemodel->get_notpaid_notrequired_taxcode($this->tenant_id, '', $query_string);\n if ($result) {\n foreach ($result as $row) {\n $matches[] = array(\n 'key' => $row->user_id,\n 'label' => $row->first_name . ' ' . $row->last_name . ' (NRIC: ' . $row->tax_code . ')',\n 'value' => $row->first_name\n );\n }\n }\n } \n echo json_encode($matches);\n exit();\n }", "public function getTaxList($type ='Both'){\n\t \n\t \t\t$this->db->select(\"TS.tax_id, TS.tax_per, TS.tax_type\");\n\t\t\t$this->db->from(\"tax_structure AS TS\");\n\t\t\t//$this->db->where(\"TS.tax_type\",'Active');\n\t\t\tif($type == 'Both'){\n\t\t\t\t$this->db->where_in('TS.tax_type', array('CST','VAT'));\n\t\t\t}else{\n\t\t\t\t$this->db->where('TS.tax_type', 'Excise');\n\t\t\t}\n\t\t\t$this->db->where(\"TS.status\",'Active');\n\t\t\t$query_tax_array = $this->db->get();\n\t\t\t//echo $this->db->last_query();die;\n\t\t\tif($query_tax_array->num_rows()>0)\n\t\t\t{\n\t\t\t\treturn $query_tax_array->result_array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t \n\t }", "function getCountries($type, $query, $countriesParams) {\n if ($type === 'alpha' && (strLen($query) > 3 || strLen($query) < 2)) {\n echo json_encode(['error' => 'Country codes must be 2-3 characters long']);\n return;\n }\n $client = new Client(['base_uri' => 'https://restcountries.eu/rest/v2/', 'http_errors' => false]);\n $response = $client->request('GET', \"$type/$query\", [\n 'query' => $countriesParams\n ]);\n if ($response->getStatusCode() == 404) {\n echo json_encode(['error' => 'No results found']);\n return;\n }\n $response = json_decode($response->getBody());\n returnCountries((array)$response);\n}", "function get_tax($tax_class, $subtotal)\n{\n global $config, $tax_cache, $current_user_info;\n\n $rate = get_tax_rate($tax_class);\n\n if ($config['cart']['tax_base'] == 'shipping') {\n $tbase = 'ship';\n } else {\n $tbase = 'bill';\n }\n if (comparecsn($config['site_city'], $current_user_info[$tbase.'_city'])) {\n $tax_rate = $rate['tax_city'];\n } elseif (comparecsn($config['site_state'], $current_user_info[$tbase.'_state'])) {\n $tax_rate = $rate['tax_state'];\n } elseif (comparecsn($config['site_country'], $current_user_info[$tbase.'_country'])) {\n $tax_rate = $rate['tax_nation'];\n } else {\n $tax_rate = $rate['tax_world'];\n }\n\n return ($tax_rate / 100) * $subtotal;\n}", "function buildTaxonQuery($params) {\n $url = \"https://laji.fi/api/taxa?langFallback=false&selectedFields=vernacularName,id,scientificName,synonyms.scientificName&lang=fi&pageSize=\" . $params['pageSize'] . \"&page=\" . $params['page'];\n debugData($url, __LINE__);\n return $url;\n}", "public function lookup($string){\r\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($string).\"&key=AIzaSyBCltWRQRrRFBsRh9WUQ53KVbj3Nm6xc6s\";//we are getting the response in json &key=AIzaSyBCltWRQRrRFBsRh9WUQ53KVbj3Nm6xc6s\r\n // get the json response\r\n $resp_json = file_get_contents($url);\r\n // decode the json\r\n $resp = json_decode($resp_json, true);\r\n //the response status would be 'OK', if are able to geocode the given address\r\n if($resp['status']=='OK') {\r\n // get the longtitude and latitude data\r\n $array = array(\r\n 'lat' => $resp['results'][0]['geometry']['location']['lat'],\r\n 'long' => $resp['results'][0]['geometry']['location']['lng'],\r\n );\r\n\r\n return $array;\r\n }else{\r\n $val = 'Geocode API failure';\r\n return $val;\r\n }\r\n }", "function usdt_bal()\n{\n try {\n require_once app_path('jsonRPCClient.php');\n $bitcoin_username = owndecrypt(get_wallet_keydetail('USDT', 'XDC_username'));\n $bitcoin_password = owndecrypt(get_wallet_keydetail('USDT', 'XDC_password'));\n $bitcoin_portnumber = owndecrypt(get_wallet_keydetail('USDT', 'portnumber'));\n $bitcoin_host = owndecrypt(get_wallet_keydetail('USDT', 'host'));\n $bitcoin = new jsonRPCClient(\"http://$bitcoin_username:$bitcoin_password@$bitcoin_host:$bitcoin_portnumber/\");\n\n if ($bitcoin) {\n $address_list = $bitcoin->omni_getwalletbalances();\n $bal = 0;\n if ($address_list) {\n foreach ($address_list as $list) {\n if ($list['propertyid'] == 31) {\n $bal = $list['balance'];\n }\n }\n }\n\n return $bal;\n }\n\n } catch (\\Exception $exception) {\n return 0;\n }\n}", "public function getShippingTaxRefunded();", "function get_country_by_rdap($query, $real_time_data = false) {\n // Make sure given query is ip address\n if(filter_var($query, FILTER_VALIDATE_IP)) {\n $ip = $query;\n\n // Perform request depending on whether ip address is ipv4 or ipv6\n if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $iana_ipv4 = [\"description\"=>\"RDAP bootstrap file for IPv4 address allocations\",\"publication\"=>\"2019-06-07T19:00:02Z\",\"services\"=>[[[\"41.0.0.0/8\",\"102.0.0.0/8\",\"105.0.0.0/8\",\"154.0.0.0/8\",\"196.0.0.0/8\",\"197.0.0.0/8\"],[\"https://rdap.afrinic.net/rdap/\",\"http://rdap.afrinic.net/rdap/\"]],[[\"1.0.0.0/8\", \"14.0.0.0/8\", \"27.0.0.0/8\", \"36.0.0.0/8\", \"39.0.0.0/8\", \"42.0.0.0/8\", \"43.0.0.0/8\", \"49.0.0.0/8\", \"58.0.0.0/8\", \"59.0.0.0/8\", \"60.0.0.0/8\", \"61.0.0.0/8\", \"101.0.0.0/8\", \"103.0.0.0/8\", \"106.0.0.0/8\", \"110.0.0.0/8\", \"111.0.0.0/8\", \"112.0.0.0/8\", \"113.0.0.0/8\", \"114.0.0.0/8\", \"115.0.0.0/8\", \"116.0.0.0/8\", \"117.0.0.0/8\", \"118.0.0.0/8\", \"119.0.0.0/8\", \"120.0.0.0/8\", \"121.0.0.0/8\", \"122.0.0.0/8\", \"123.0.0.0/8\", \"124.0.0.0/8\", \"125.0.0.0/8\", \"126.0.0.0/8\", \"133.0.0.0/8\", \"150.0.0.0/8\", \"153.0.0.0/8\", \"163.0.0.0/8\", \"171.0.0.0/8\", \"175.0.0.0/8\", \"180.0.0.0/8\", \"182.0.0.0/8\", \"183.0.0.0/8\", \"202.0.0.0/8\", \"203.0.0.0/8\", \"210.0.0.0/8\", \"211.0.0.0/8\", \"218.0.0.0/8\", \"219.0.0.0/8\", \"220.0.0.0/8\", \"221.0.0.0/8\", \"222.0.0.0/8\", \"223.0.0.0/8\"], [\"https://rdap.apnic.net/\"]], [[\"3.0.0.0/8\", \"4.0.0.0/8\", \"6.0.0.0/8\", \"7.0.0.0/8\", \"8.0.0.0/8\", \"9.0.0.0/8\", \"11.0.0.0/8\", \"12.0.0.0/8\", \"13.0.0.0/8\", \"15.0.0.0/8\", \"16.0.0.0/8\", \"17.0.0.0/8\", \"18.0.0.0/8\", \"19.0.0.0/8\", \"20.0.0.0/8\", \"21.0.0.0/8\", \"22.0.0.0/8\", \"23.0.0.0/8\", \"24.0.0.0/8\", \"26.0.0.0/8\", \"28.0.0.0/8\", \"29.0.0.0/8\", \"30.0.0.0/8\", \"32.0.0.0/8\", \"33.0.0.0/8\", \"34.0.0.0/8\", \"35.0.0.0/8\", \"38.0.0.0/8\", \"40.0.0.0/8\", \"44.0.0.0/8\", \"45.0.0.0/8\", \"47.0.0.0/8\", \"48.0.0.0/8\", \"50.0.0.0/8\", \"52.0.0.0/8\", \"54.0.0.0/8\", \"55.0.0.0/8\", \"56.0.0.0/8\", \"63.0.0.0/8\", \"64.0.0.0/8\", \"65.0.0.0/8\", \"66.0.0.0/8\", \"67.0.0.0/8\", \"68.0.0.0/8\", \"69.0.0.0/8\", \"70.0.0.0/8\", \"71.0.0.0/8\", \"72.0.0.0/8\", \"73.0.0.0/8\", \"74.0.0.0/8\", \"75.0.0.0/8\", \"76.0.0.0/8\", \"96.0.0.0/8\", \"97.0.0.0/8\", \"98.0.0.0/8\", \"99.0.0.0/8\", \"100.0.0.0/8\", \"104.0.0.0/8\", \"107.0.0.0/8\", \"108.0.0.0/8\", \"128.0.0.0/8\", \"129.0.0.0/8\", \"130.0.0.0/8\", \"131.0.0.0/8\", \"132.0.0.0/8\", \"134.0.0.0/8\", \"135.0.0.0/8\", \"136.0.0.0/8\", \"137.0.0.0/8\", \"138.0.0.0/8\", \"139.0.0.0/8\", \"140.0.0.0/8\", \"142.0.0.0/8\", \"143.0.0.0/8\", \"144.0.0.0/8\", \"146.0.0.0/8\", \"147.0.0.0/8\", \"148.0.0.0/8\", \"149.0.0.0/8\", \"152.0.0.0/8\", \"155.0.0.0/8\", \"156.0.0.0/8\", \"157.0.0.0/8\", \"158.0.0.0/8\", \"159.0.0.0/8\", \"160.0.0.0/8\", \"161.0.0.0/8\", \"162.0.0.0/8\", \"164.0.0.0/8\", \"165.0.0.0/8\", \"166.0.0.0/8\", \"167.0.0.0/8\", \"168.0.0.0/8\", \"169.0.0.0/8\", \"170.0.0.0/8\", \"172.0.0.0/8\", \"173.0.0.0/8\", \"174.0.0.0/8\", \"184.0.0.0/8\", \"192.0.0.0/8\", \"198.0.0.0/8\", \"199.0.0.0/8\", \"204.0.0.0/8\", \"205.0.0.0/8\", \"206.0.0.0/8\", \"207.0.0.0/8\", \"208.0.0.0/8\", \"209.0.0.0/8\", \"214.0.0.0/8\", \"215.0.0.0/8\", \"216.0.0.0/8\"], [\"https://rdap.arin.net/registry/\", \"http://rdap.arin.net/registry/\"]], [[\"2.0.0.0/8\", \"5.0.0.0/8\", \"25.0.0.0/8\", \"31.0.0.0/8\", \"37.0.0.0/8\", \"46.0.0.0/8\", \"51.0.0.0/8\", \"53.0.0.0/8\", \"57.0.0.0/8\", \"62.0.0.0/8\", \"77.0.0.0/8\", \"78.0.0.0/8\", \"79.0.0.0/8\", \"80.0.0.0/8\", \"81.0.0.0/8\", \"82.0.0.0/8\", \"83.0.0.0/8\", \"84.0.0.0/8\", \"85.0.0.0/8\", \"86.0.0.0/8\", \"87.0.0.0/8\", \"88.0.0.0/8\", \"89.0.0.0/8\", \"90.0.0.0/8\", \"91.0.0.0/8\", \"92.0.0.0/8\", \"93.0.0.0/8\", \"94.0.0.0/8\", \"95.0.0.0/8\", \"109.0.0.0/8\", \"141.0.0.0/8\", \"145.0.0.0/8\", \"151.0.0.0/8\", \"176.0.0.0/8\", \"178.0.0.0/8\", \"185.0.0.0/8\", \"188.0.0.0/8\", \"193.0.0.0/8\", \"194.0.0.0/8\", \"195.0.0.0/8\", \"212.0.0.0/8\", \"213.0.0.0/8\", \"217.0.0.0/8\"], [\"https://rdap.db.ripe.net/\"]], [[\"177.0.0.0/8\", \"179.0.0.0/8\", \"181.0.0.0/8\", \"186.0.0.0/8\", \"187.0.0.0/8\", \"189.0.0.0/8\", \"190.0.0.0/8\", \"191.0.0.0/8\", \"200.0.0.0/8\", \"201.0.0.0/8\"], [\"https://rdap.lacnic.net/rdap/\"]]], \"version\"=> \"1.0\"];\n if($real_time_data) {\n $iana_ipv4 = file_get_contents(\"http://data.iana.org/rdap/ipv4.json\");\n if(is_bool($iana_ipv4)) {\n return null;\n }\n $iana_ipv4 = json_decode($iana_ipv4, true);\n }\n $ip_parts = explode(\".\", $ip);\n foreach ($iana_ipv4[\"services\"] as $service) {\n foreach ($service[0] as $ip_range) {\n if($ip_range == $ip_parts[0].\".0.0.0/8\") {\n $service_rdap = file_get_contents(preg_replace(\"/https/i\", \"http\", $service[1][0]).\"ip/\".$ip);\n if($service_rdap == FALSE) {\n return null;\n }\n $service_rdap = json_decode($service_rdap, true);\n if(isset($service_rdap[\"country\"])) {\n return strtoupper($service_rdap[\"country\"]);\n } else {\n return null;\n }\n }\n }\n }\n } else if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {\n $iana_ipv6 = [\"description\"=> \"RDAP bootstrap file for IPv6 address allocations\", \"publication\"=> \"2019-11-06T19:00:04Z\", \"services\"=> [[[\"2001:4200::/23\", \"2c00::/12\"], [\"https://rdap.afrinic.net/rdap/\", \"http://rdap.afrinic.net/rdap/\"]], [[\"2001:200::/23\", \"2001:4400::/23\", \"2001:8000::/19\", \"2001:a000::/20\", \"2001:b000::/20\", \"2001:c00::/23\", \"2001:e00::/23\", \"2400::/12\"], [\"https://rdap.apnic.net/\"]], [[\"2001:1800::/23\", \"2001:400::/23\", \"2001:4800::/23\", \"2600::/12\", \"2610::/23\", \"2620::/23\", \"2630::/12\"], [\"https://rdap.arin.net/registry/\", \"http://rdap.arin.net/registry/\"]], [[\"2001:1400::/22\", \"2001:1a00::/23\", \"2001:1c00::/22\", \"2001:2000::/19\", \"2001:4000::/23\", \"2001:4600::/23\", \"2001:4a00::/23\", \"2001:4c00::/23\", \"2001:5000::/20\", \"2001:600::/23\", \"2001:800::/22\", \"2003::/18\", \"2a00::/12\", \"2a10::/12\"], [\"https://rdap.db.ripe.net/\"]], [[\"2001:1200::/23\", \"2800::/12\"], [\"https://rdap.lacnic.net/rdap/\"]]], \"version\"=>\"1.0\"];\n if($real_time_data) {\n $iana_ipv6 = file_get_contents(\"http://data.iana.org/rdap/ipv6.json\");\n if (is_bool($iana_ipv6)) {\n return null;\n }\n $iana_ipv6 = json_decode($iana_ipv6, true);\n }\n $ip_parts = explode(\":\", $ip);\n foreach ($iana_ipv6[\"services\"] as $service) {\n foreach ($service[0] as $ip_range) {\n if(preg_match(\"/\".$ip_parts[0].\":\".$ip_parts[1].\"::\\/\\d[\\d]*/\", $ip_range) || preg_match(\"/\".$ip_parts[0].\"::\\/\\d[\\d]*/\", $ip_range)) {\n $service_rdap = file_get_contents(preg_replace(\"/https/i\", \"http\", $service[1][0]).\"ip/\".$ip);\n if($service_rdap == FALSE) {\n return null;\n }\n $service_rdap = json_decode($service_rdap, true);\n if(isset($service_rdap[\"country\"])) {\n return strtoupper($service_rdap[\"country\"]);\n } else {\n return null;\n }\n }\n }\n }\n }\n }\n return null;\n}", "public function getTaxRefunded();" ]
[ "0.61249185", "0.60907245", "0.5980484", "0.5900506", "0.5888059", "0.588523", "0.5869682", "0.5862956", "0.5715603", "0.5682048", "0.567274", "0.5651795", "0.5647519", "0.5641193", "0.5606656", "0.5597996", "0.5594184", "0.55810213", "0.55737746", "0.5535752", "0.55251193", "0.5522744", "0.55177456", "0.5505196", "0.5500406", "0.54949486", "0.54826707", "0.5480437", "0.54773414", "0.54709756" ]
0.7064492
0
Take a legacy uri, and map it to an alias.
public static function convertLegacyUriToAlias($namespaced_legacy_uri, $language = LANGUAGE_NONE) { // @todo D8 Refactor // Drupal paths never begin with a / so remove it. $namespaced_legacy_uri = ltrim($namespaced_legacy_uri, '/'); // Break out any query. $query = parse_url($namespaced_legacy_uri, PHP_URL_QUERY); $query = (!empty($query)) ? self::convertUrlQueryToArray($query) : []; $original_uri = $namespaced_legacy_uri; $namespaced_legacy_uri = parse_url($namespaced_legacy_uri, PHP_URL_PATH); // Most common drupal paths have no ending / so start with that. $legacy_uri_no_end = rtrim($namespaced_legacy_uri, '/'); $redirect = redirect_load_by_source($legacy_uri_no_end, $language, $query); if (empty($redirect) && ($namespaced_legacy_uri != $legacy_uri_no_end)) { // There is no redirect found, lets try looking for one with the path /. $redirect = redirect_load_by_source($namespaced_legacy_uri, $language, $query); } if ($redirect) { $nid = str_replace('node/', '', $redirect->redirect); // Make sure we are left with a numeric id. if (is_int($nid) || ctype_digit($nid)) { $node = Node::load($nid); if ((!empty($node)) && (!empty($node->path)) && (!empty($node->path['alias']))) { return $node->path['alias']; } } // Check for language other than und, because the aliases are // intentionally saved with language undefined, even for a spanish node. // A spanish node, when loaded does not find an alias. if (!empty($node->language) && ($node->language != LANGUAGE_NONE)) { // Some other language in play, so lookup the alias directly. $path = url($redirect->redirect); $path = ltrim($path, '/'); return $path; } if ($node) { $uri = entity_uri("node", $node); if (!empty($uri['path'])) { return $uri['path']; } } } // Made it this far with no alias found, return the original. return $original_uri; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resolveUri($uri) {}", "function resolveURL($uri);", "private function uriWithLocale($uri)\n\t{\n\t\t$locale = $this->getLocale();\n\t\t// Delete the forward slash if any at the beginning of the uri:\n\t\t$uri = substr($uri, 0, 1) == '/' ? substr($uri, 1) : $uri;\n\t\t$segments = explode('/', $uri);\n\t\t$newUri = \"/{$locale}/{$uri}\";\n\t\t$locales = $this->getLocales();\n\t\tif (count($segments) && array_key_exists(strtolower($segments[0]), $locales)) {\n\t\t\t$newUri = \"/{$locale}\";\n\t\t\tfor($i = 0; $i < sizeof($segments); $i++) {\n\t\t\t\tif(array_key_exists(strtolower($segments[$i]), $locales)) \n\t\t\t\t\tcontinue;\n\t\t\t\t$newUri .= \"/{$segments[$i]}\";\n\t\t\t}\n\t\t}\n\t\treturn $newUri;\n\t}", "public static function normalizeURI($uri)\n{\nreturn str_replace('\\\\','/',$uri);\n}", "public function createUri($uri = '');", "abstract protected function uri($uri);", "function smarty_modifier_alias($string, $params = null, $query = null, $fragment = null): string {\n if (!is_null($fragment) && substr($fragment, 0, 1) !== '#') {\n $fragment = '#'.$fragment;\n }\n\n $f3 = \\Base::instance();\n\n return GK_SITE_BASE_SERVER_URL.$f3->alias($string, $params ?? [], $query).$fragment;\n}", "public function uri($uri);", "protected function resolveRouterUri(String $uri): String\n {\n $uri = $this->fixRouterUri($uri);\n\n if ($this->instanceof($this->currentGroup, RouteGroups::class) && $this->currentGroup->prefix) {\n $prefix = $this->fixRouterUri($this->currentGroup->prefix);\n\n return $prefix . $uri;\n }\n\n return $uri;\n }", "function massimport_convertspip_uri($str) {\n\t return eregi_replace('[^(->)\\'\\\"]http://([^[:space:]<]*)', ' [http://\\\\1->http://\\\\1]', $str); \n}", "function hook_uuid_menu_path_to_uri_alter($path, &$uri) {\n\n}", "public function resolve($URI, $flags = IURI::AS_STRING);", "protected function fixUri($uri)\n {\n return preg_replace('/[\\[\\]\\{\\}\\<\\>\\'\\\"\\&\\s\\t\\n\\,\\;\\%\\ \\!\\?\\=]/i', '_', $uri);\n }", "public function normalizeUri($uri) {\n $scheme = $this->getScheme($uri);\n\n if ($this->isValidScheme($scheme)) {\n $target = $this->getTarget($uri);\n\n if ($target !== FALSE) {\n $uri = $scheme . '://' . $target;\n }\n }\n\n return $uri;\n }", "public function setAlias()\n\t{\n\t\tif(empty($this->alias)){\n $this->alias = Amputate::rus2route(Amputate::getLimb($this->title, 20, ''));\n }\t\n\t}", "private function putAlias($str) {\n // i.e.: @Widgets/Foo -> app/Frontend/Widgets/Foo\n // Allow custom resolvers for specific lookups\n $path = $this->canonicalizePath($str);\n $pathParts = explode(\"/\", $path);\n foreach($pathParts as $i=>$part) {\n if(substr($part,0,1) == \"@\") {\n // A-hah! A wild alias was been encountered.\n $alias = substr($part, 1);\n if(isset($this->aliases[$alias])) {\n $pathParts[$i] = $this->aliases[$alias];\n } else {\n foreach($this->resolver as $cb) {\n $out = $cb($alias);\n if($out != null && $out != false) {\n $pathParts[$i] = $out;\n }\n }\n }\n }\n }\n return implode(DIRECTORY_SEPARATOR, $pathParts);\n }", "public function set($uri): UrlManipulatorInterface;", "function cleanAliasUrl($string)\n{\n $tr = array('ş', 'Ş', 'ı', 'İ', 'ğ', 'Ğ', 'ü', 'Ü', 'ö', 'Ö', 'ç', 'Ç'); \n $en = array('s', 's', 'i', 'i', 'g', 'g', 'u', 'u', 'o', 'o', 'c', 'c'); \n $string = str_replace ($tr, $en, $string); \n $string = preg_replace (\"`\\[.*\\]`U\", \"\", $string); \n $string = preg_replace ('`&(amp;)?#?[a-z0-9]+;`i', '-', $string); \n $string = htmlentities ($string, ENT_COMPAT, 'utf-8'); \n $string = preg_replace (\"`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i\", \"\\\\1\", $string); \n $string = preg_replace (array(\"`[^a-z0-9]`i\", \"`[-]+`\"), \"-\", $string); \n\n return strtolower (trim ($string, '-')); \n}", "public function using($alias);", "function alias();", "public static function expand($shortUri)\n {\n if (!is_string($shortUri) or $shortUri === '') {\n throw new \\InvalidArgumentException(\n \"\\$shortUri should be a string and cannot be null or empty\"\n );\n }\n\n if ($shortUri === 'a') {\n $namespaces = self::namespaces();\n return $namespaces['rdf'] . 'type';\n } elseif (preg_match('/^(\\w+?):([\\w\\-]+)$/', $shortUri, $matches)) {\n $long = self::get($matches[1]);\n if ($long) {\n return $long . $matches[2];\n }\n } elseif (preg_match('/^(\\w+)$/', $shortUri) and isset(self::$default)) {\n return self::$default . $shortUri;\n }\n\n return $shortUri;\n }", "public function resolve_uri(string $uri, $extra_query_vars = '')\n {\n }", "public static function replaceAlias ($alias){\n // was a name replacement, but changed to id so user names can be changed.\n $alias = strtolower($alias) ; #all aliases are lower case\n # echo \"checking for alias for $alias\" . BR;\n if (preg_match('/^\\w+$/',$alias)){ # match alias format\n if (in_array($alias,array_keys(Definitions::$user_aliases))){\n $lookup = Definitions::$user_aliases[$alias];\n # echo \"Found $lookup\". BR;\n return $lookup;\n }\n }\n # echo \"No alias.\" . BR;\n return '';\n }", "public function getAlias($alias);", "public static function alias($alias)\n { \n self::routeCompiler($alias, '/'.self::$raw_current_route, self::$current_param); \n self::$current_param['alias'] = $alias;\n self::$routes[self::$current_route] =self::$current_param; \n }", "public function pathAliasCallback() {\n $args = func_get_args();\n switch($args[0]) {\n case '/content/first-node':\n return '/node/1';\n case '/content/first-node-test':\n return '/node/1/test';\n case '/malicious-path':\n return '/admin';\n case '':\n return '<front>';\n default:\n return $args[0];\n }\n }", "public static function expandUri($uri, $asString = false)\n\t{\n\t\t$s = explode(':', $uri, 2);\n\t\tif(count($s) == 2)\n\t\t{\n\t\t\t$base = self::uriForPrefix($s[0], true);\n\t\t\tif($base !== null)\n\t\t\t{\n\t\t\t\t$last = substr($base, -1);\n\t\t\t\tif($last != ' ' && $last != '#' && $last != '/' && $last != '?')\n\t\t\t\t{\n\t\t\t\t\t$uri = $base . ' ' . $s[1];\n\t\t\t\t}\n\t\t\t\t$uri = $base . $s[1];\n\t\t\t}\n\t\t}\n\t\treturn ($asString ? $uri : new URI($uri));\n\t}", "function alias_expand($name) {\n\n\tglobal $aliastable;\n\n\tif (isset($aliastable[$name]))\n\treturn $aliastable[$name];\n\telse if (is_ipaddr($name) || is_subnet($name))\n\treturn $name;\n\telse\n\treturn null;\n}", "public function alias( $abstract, $alias );", "public function alias( $class, $alias );" ]
[ "0.70390946", "0.67674583", "0.62418276", "0.6141574", "0.59974", "0.5987747", "0.59666544", "0.59188443", "0.58159333", "0.5805105", "0.5803796", "0.57948047", "0.57697624", "0.571149", "0.56688374", "0.565438", "0.56410795", "0.5625099", "0.5625082", "0.56216055", "0.5598575", "0.55744463", "0.55303836", "0.5525967", "0.5521714", "0.55198264", "0.55183697", "0.5495554", "0.5473647", "0.54726464" ]
0.7146449
0
Examines an uri and evaluates if it is an image.
public static function isImageUri($uri) { if (preg_match('/.*\.(jpg|gif|png|jpeg)$/i', $uri) !== 0) { // Is an image uri. return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isImage()\n {\n return str_contains($this->mimetype, 'image/');\n }", "public function isImage()\n {\n return strtolower(substr($this->getMimeType(), 0, 5)) == 'image';\n }", "public function isImage()\n {\n $mime_type = $this->getMimeType() ?: $this->detectMimeType();\n\n return (strpos($mime_type, 'image') === 0);\n }", "public function isImage()\n\t{\n\t\treturn in_array($this->getMimetype(), $this->imagesMimeTypes);\n\t}", "private function isImage($url)\n {\n $pos = strrpos($url, '.');\n if ($pos === false) {\n return false;\n }\n\n\n $ext = explode(\"?\",strtolower(trim(substr($url, $pos))))[0];\n\n $imgExts = [\n '.gif',\n '.jpg',\n '.jpeg',\n '.png',\n '.tiff',\n '.tif',\n ];\n\n // this is far from complete but that's always going to be the case...\n if (in_array($ext, $imgExts)) {\n return true;\n }\n\n return false;\n }", "function isImage( $url ){\r\n $pos = strrpos( $url, \".\");\r\n if ($pos === false)\r\n return false;\r\n $ext = strtolower(trim(substr( $url, $pos)));\r\n $imgExts = array(\".gif\", \".jpg\", \".jpeg\", \".png\", \".tiff\", \".tif\"); // this is far from complete but that's always going to be the case...\r\n if ( in_array($ext, $imgExts) )\r\n return true;\r\nreturn false;\r\n}", "function is_image_url($string) {\n\treturn (preg_match(\"/(?:ftp|https?):\\/\\/(?:[-\\w])+([-\\w\\.])*\\.[a-z]{2,6}(?:\\/[^\\/#\\?]+)+\\.(?:jpe?g|gif|png|bmp)/i\", $string)) ? true : false;\n}", "public function isImage() {\n\t\treturn MimeType::isImage($this);\n\t}", "public function is_image($mime)\n\t{\n\t\tee()->load->library('mime_type');\n\t\treturn ee()->mime_type->isImage($mime);\n\t}", "function is_image( string $path ):bool\r\n {\r\n $a = getimagesize($path);\r\n $image_type = $a[2];\r\n\r\n if( in_array( $image_type , array( IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "function is_image($path)\n{\n\t$a = getimagesize($path);\n\t$image_type = $a[2];\n\n\tif(in_array($image_type , array(IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP)))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function isUri();", "public function is_image()\n\t\t{\n\t\t\treturn !is_null($f = $this->format()) && $f;\n\t\t}", "function isImage(string $path): bool\n{\n $ext = getExtension($path);\n return ($ext === \"jpg\" || $ext === \"jpeg\" || $ext === \"png\");\n}", "function checkimage($img)\r\n{\r\n $imageMimeTypes = array(\r\n 'image/png',\r\n 'image/gif',\r\n 'image/jpeg');\r\n\r\n $img = mime_content_type($img);\r\n $imgcheck = false;\r\n if (in_array ($img, $imageMimeTypes))\r\n {\r\n $imgcheck = true;\r\n }\r\n return $imgcheck;\r\n}", "function is_image($file)\n{\n $type = get_image_type($file);\n $mime = get_image_mime_type($type);\n\n return substr($mime, 0, 5) == 'image';\n}", "function urlimageisvalid($image) {\n $params = array('http' => array('method' => 'HEAD'));\n $ctx = stream_context_create($params);\n $fp = @fopen($image, 'rb', false, $ctx);\n if (!$fp) \n return false; // Problem with url\n\n $meta = stream_get_meta_data($fp);\n if ($meta === false)\n {\n fclose($fp);\n return false; // Problem reading data from url\n }\n\n $wrapper_data = $meta[\"wrapper_data\"];\n if(is_array($wrapper_data)){\n foreach(array_keys($wrapper_data) as $hh){\n if (substr($wrapper_data[$hh], 0, 19) == \"Content-Type: image\") // strlen(\"Content-Type: image\") == 19 \n {\n fclose($fp);\n return true;\n }\n }\n }\n\n fclose($fp);\n return false;\n}", "function isImage(string $filename) : bool {\n return (bool) preg_match(\"/(png|gif|jpg|jpeg)/\", pathinfo($filename, PATHINFO_EXTENSION));\n}", "public static function isImage($route)\r\n {\r\n $extensions = array('.png', '.gif', '.jpg', '.jpeg');\r\n $extension = self::getExtension($route);\r\n \r\n return in_array($extension, $extensions);\r\n }", "public function isImage( $contentType=null ) \r\n {\r\n if (empty($contentType)) {\r\n $contentType = $this->contentType;\r\n }\r\n \r\n if (empty($contentType)) \r\n {\r\n return false;\r\n }\r\n \r\n if (substr(strtolower($contentType), 0, 5) == \"image\") {\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "function isImage($path) {\n global $CONFIG;\n return (is_file($path) && in_array(strtolower(pathinfo($path, PATHINFO_EXTENSION)), $CONFIG->extensions->images));\n}", "public function checkImageType()\n {\n if (empty($this->checkImageType)) {\n return true;\n }\n\n if (('image' == substr($this->mediaType, 0, strpos($this->mediaType, '/')))\n || (!empty($this->mediaRealType)\n && 'image' == substr($this->mediaRealType, 0, strpos($this->mediaRealType, '/')))\n ) {\n if (!@getimagesize($this->mediaTmpName)) {\n $this->setErrors(\\XoopsLocale::E_INVALID_IMAGE_FILE);\n return false;\n }\n }\n return true;\n }", "public static function isImage($data) : bool\n {\n return is_resource($data) and get_resource_type($data) === 'gd';\n }", "public function isValidImage()\n\t{\n\t\t$src = $this->source_path;\n\t\t$extension = \\strtolower(\\substr($src, (\\strrpos($src, '.') + 1)));\n\n\t\tif (!\\in_array($extension, $this->image_extensions)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$r = @\\imagecreatefromstring(\\file_get_contents($src));\n\n\t\treturn \\is_resource($r) && \\get_resource_type($r) === 'gd';\n\t}", "protected function isImage($subject) {\n $pattern = '/[^\\s]\\.(jpg|png|gif|bmp)$/';\n\n if (preg_match($pattern, $subject)) {\n return true;\n } else {\n return false;\n };\n }", "function check_image_type($source_pic)\n{\n $image_info = check_mime_type($source_pic);\n\n switch ($image_info) {\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "public function hasImage(): bool\n {\n return $this->hasImageType(\n $this->getMimeType()\n );\n }", "function is_image($path)\n{\n\t$controle_type_mime_autorises = ['image/gif', 'image/jpeg', 'image/pjpeg', 'image/png'];\n\t$fichier_mime_type = mime_content_type($path);\n\t//echo $fichier_mime_type;\n\n\tif(in_array($fichier_mime_type, $controle_type_mime_autorises)){\n\t return TRUE;\n\t}else{\n\t return FALSE;\n\t}\n}", "public function isImage() {\n return $this->_is_image;\n }", "public static function isImage($source)\n {\n return getimagesize($source);\n }" ]
[ "0.74511915", "0.7309734", "0.7050975", "0.6777362", "0.6767111", "0.66214335", "0.6615464", "0.6600288", "0.65976304", "0.6522383", "0.6504372", "0.6461269", "0.6459122", "0.64379376", "0.64251727", "0.64223903", "0.6406168", "0.6339286", "0.63244647", "0.6312225", "0.62985533", "0.62961316", "0.62929046", "0.6267535", "0.62477183", "0.6198384", "0.61863136", "0.6170671", "0.613196", "0.6120502" ]
0.79680353
0
Determines if a url is relative or absolute.
public static function isRelativeUrl(string $url) { $url_parts = parse_url($url); if ((!empty($url_parts['scheme'])) && (!empty($url_parts['host']))) { // It is an absolute url. return FALSE; } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRelative()\n {\n if (preg_match('~^https?:\\/\\/~i', $this->url) OR preg_match('~^\\/\\/~i', $this->url)) {\n return false;\n } else {\n return true;\n }\n }", "public function isRelativeUri() {\n return !$this->isAbsoluteUri();\n }", "function ju_is_url_absolute(string $u):bool {return ju_starts_with($u, ['http', '//']);}", "public function isAbsolute()\n {\n return !$this->isRelative($this->url);\n }", "public function isAbsoluteUri() {\n return isset($this->parts['scheme']);\n }", "public function isAbsolute(): bool\n\t{\n\t\treturn empty($this->host) === false;\n\t}", "public function isAbsolute()\n {\n return ($this->scheme !== null);\n }", "public function isValidRelative()\n {\n if ($this->scheme || $this->host || $this->userInfo || $this->port) {\n return false;\n }\n\n if ($this->path) {\n // Check path-only (no host) URI\n if (0 === strpos($this->path, '//')) {\n return false;\n }\n return true;\n }\n\n if (! ($this->query || $this->fragment)) {\n // No host, path, query or fragment - this is not a valid URI\n return false;\n }\n\n return true;\n }", "public function isRelative()\n {\n if($this->_address == $this->_request)\n return true;\n return false;\n }", "public static function isRelativeUrl(string $url): bool\r\n {\r\n $pattern = \"/^(?:ftp|https?|feed)?:?\\/\\/(?:(?:(?:[\\w\\.\\-\\+!$&'\\(\\)*\\+,;=]|%[0-9a-f]{2})+:)*\r\n (?:[\\w\\.\\-\\+%!$&'\\(\\)*\\+,;=]|%[0-9a-f]{2})+@)?(?:\r\n (?:[a-z0-9\\-\\.]|%[0-9a-f]{2})+|(?:\\[(?:[0-9a-f]{0,4}:)*(?:[0-9a-f]{0,4})\\]))(?::[0-9]+)?(?:[\\/|\\?]\r\n (?:[\\w#!:\\.\\?\\+\\|=&@$'~*,;\\/\\(\\)\\[\\]\\-]|%[0-9a-f]{2})*)?$/xi\";\r\n\r\n return !preg_match($pattern, $url);\r\n }", "public function useRelativeUrls(): bool\n {\n return $this->relativeUrls;\n }", "public function isAbsolute();", "protected function _isAbsolute($path)\n {\n // if there isn't enough characters to begin with http://\n if (!isset($path[7])) {\n return false;\n }\n return $path[0] . $path[1] . $path[2] . $path[3] . $path[4] == 'http:';\n }", "public static function isAbsoluteUrl($_path)\n {\n $url = parse_url($_path);\n\n return $url !== false && isset($url['scheme']) && $url['scheme'] != '';\n }", "public static function isAbsolute($file): bool\n {\n return strspn($file, '/\\\\', 0, 1)\n || (\\strlen($file) > 3 && ctype_alpha($file[0])\n && ':' === $file[1]\n && strspn($file, '/\\\\', 2, 1))\n || null !== parse_url($file, PHP_URL_SCHEME);\n }", "function path_is_absolute($path)\n {\n }", "static function isAbsolute($filename) {\n\t\tif($_ENV['OS'] == \"Windows_NT\" || $_SERVER['WINDIR']) return $filename[1] == ':' && $filename[2] == '/';\n\t\telse return $filename[0] == '/';\n\t}", "public function getIsAbsolutePath() {}", "public function isUri();", "public static function isAbsolutePath(string $file): bool\n {\n return strspn($file, '/\\\\', 0, 1)\n || (\n \\strlen($file) > 3 && ctype_alpha($file[0])\n && $file[1] === ':'\n && strspn($file, '/\\\\', 2, 1)\n )\n || parse_url($file, \\PHP_URL_SCHEME) !== null;\n }", "function is_local($src)\n\t{\n\t\t// prepend scheme to scheme-less URLs, to make parse_url work\n\t\tif (0 === strpos($src, '//')) {\n\t\t\t$src = 'http:' . $src;\n\t\t}\n\n\t\t$url = @parse_url($src);\n\t\t$blog_url = @parse_url(home_url());\n\t\tif (false === $url)\n\t\t\treturn false;\n\n\t\tif (isset($url['scheme']))\n\t\t{\n\t\t\t// this should be an absolute URL\n\t\t\t// @since 1.3.0 consider sub-domain external for now\n\t\t\tif (0 <> strcmp($url['host'], $blog_url['host']))\n\t\t\t\treturn false;\n\n\t\t\treturn true;\n\t\t}\n\t\telse // Probably a relative link\n\t\t\treturn true;\n\t}", "public function isUrl()\n {\n return filter_var($this->_value, FILTER_VALIDATE_URL);\n }", "public function isAbsolutePath()\n {\n if ($this->exists === false) {\n $this->is_absolute_path = null;\n return;\n }\n\n if (substr($this->path, 0, 1) == '/') {\n $this->is_absolute_path = true;\n $this->absolute_path = $this->path;\n } else {\n $this->is_absolute_path = false;\n }\n\n return;\n }", "public static function isAbsolute($path) {\n\t\t$pattern = '@^\n ( # Either..\n [/\\\\\\\\] # absolute start\n | [a-z]:[/\\\\\\\\] # or Windows drive path\n | [a-z][a-z0-9\\.+-]+:// # or URI scheme:// - see http://tools.ietf.org/html/rfc3986#section-3.1\n )@ix';\n\t\treturn preg_match($pattern, $path) === 1;\n\t}", "function is_absolute($path)\n{\n\treturn ($path[0] == '/' || (DIRECTORY_SEPARATOR == '\\\\' && preg_match('#^[a-z]:[/\\\\\\]#i', $path))) ? true : false;\n}", "function convertRealtiveToAbsoluteUrl($src, $url){\n\n $scheme = parse_url($url)[\"scheme\"]; // the scheme is either http or https\n $host = parse_url($url)[\"host\"]; // the host is the www.whateverwebsite.com part of an url\n\n // relative url in the form \"//path/to/file\"\n if (substr($src, 0, 2) == \"//\") {\n $src = $scheme . \":\" . $src;\n }\n // relative url in the form \"/path/to/file\"\n else if (substr($src, 0, 1) == \"/\") {\n $src = $scheme . \"://\" . $host . $src;\n }\n // relative url in the form \"./path/to/file\"\n else if (substr($src, 0, 2) == \"./\") {\n $src = $scheme . \"://\" . $host . dirname(parse_url($url)[\"path\"]) . substr($src, 1);\n }\n // relative url in the form \"../path/to/file\"\n else if (substr($src, 0, 3) == \"../\") {\n $src = $scheme . \"://\" . $host . \"/\" . $src;\n }\n // relative url in the form \"path/to/file\"\n else if (substr($src, 0, 5) != \"https\" && substr($src, 0, 4) != \"http\") {\n $src = $scheme . \"://\" . $host . \"/\" . $src;\n }\n // any other case which is still not an absolute url returns -1 to skip it when its called\n else return -1;\n\n return $src;\n}", "public function isAbsolute()\n\t{\n\t\treturn $this->absolute;\n\t}", "static function is_url($url) {\n return ($url && ($info=parse_url($url)) && $info['host']);\n }", "function url_compare($url, $rel) {\n $url = trailingslashit($url);\n $rel = trailingslashit($rel);\n if ((strcasecmp($url, $rel) === 0) || root_relative_url($url) == $rel) {\n return true;\n } else {\n return false;\n }\n}", "function _drush_patchfile_is_url($url) {\n return parse_url($url, PHP_URL_SCHEME) !== NULL;\n}" ]
[ "0.8480284", "0.80919725", "0.78597975", "0.7859429", "0.7648934", "0.76178074", "0.76096505", "0.75056833", "0.7465445", "0.72904354", "0.7152008", "0.71416277", "0.71221083", "0.7121522", "0.69630545", "0.6960558", "0.69075054", "0.6816049", "0.6783833", "0.67447466", "0.67174506", "0.6628265", "0.6608252", "0.6564978", "0.65449476", "0.65131843", "0.6512633", "0.6443461", "0.6430194", "0.64228225" ]
0.8161998
1
Fixes anchor links to PDFs so that they work in IE. Specifically replaces anchors like _PAGE2 and p2 with page=2.
public static function fixPdfLinkAnchors($query_path) { $anchors = $query_path->find('a'); foreach ($anchors as $anchor) { $url = $anchor->attr('href'); $contains_pdf_anchor = preg_match('/\.pdf#(p|_PAGE)([0-9]+)/i', $url, $matches); if ($contains_pdf_anchor) { $old_anchor = $matches[1]; $page_num = $matches[3]; $new_anchor = 'page=' . $page_num; $new_url = str_replace($old_anchor, $new_anchor, $url); $anchor->attr('href', $new_url); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doLocalAnchorFix() {}", "protected function fix_supporting_file_references() {\r\n\t\tpreg_match_all('/<link([^<>]*?) href=\"([^\"]*?)\"([^<>]*?)\\/>/is', $this->code, $link_matches);\r\n\t\t/*$counter = sizeof($link_matches[0]) - 1;\r\n\t\twhile($counter > -1) {\r\n\t\t\t\r\n\t\t\t$counter--;\r\n\t\t}*/\r\n\t\t$array_replaces = array();\r\n\t\tforeach($link_matches[0] as $index => $value) {\r\n\t\t\t$href_content = $link_matches[2][$index];\r\n\t\t\tif($href_content[0] === '/' || strpos($href_content, 'http://') !== false) { // avoid root references and URLs\r\n\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$initial_href_content = $href_content;\r\n\t\t\t\t\t// first try looking closer\r\n\t\t\t\t\t$proper_reference = false;\r\n\t\t\t\t\twhile(!$proper_reference && substr($href_content, 0, 3) === '../') {\r\n\t\t\t\t\t\t$href_content = substr($href_content, 3);\r\n\t\t\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\t\t$proper_reference = true;\r\n\t\t\t\t\t\t\t$array_replaces['href=\"' . $initial_href_content . '\"'] = 'href=\"' . $href_content . '\"';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!$proper_reference) { // try looking farther\r\n\t\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\t\twhile(!$proper_reference && $counter < 10) {\r\n\t\t\t\t\t\t\t$href_content = '../' . $href_content;\r\n\t\t\t\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\t\t\t$proper_reference = true;\r\n\t\t\t\t\t\t\t\t$array_replaces['href=\"' . $initial_href_content . '\"'] = 'href=\"' . $href_content . '\"';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$counter++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!$proper_reference) { // give up or finish\r\n\t\t\t\t\t\tvar_dump($this->file, $href_content, $relative_path);exit(0);\r\n\t\t\t\t\t\tprint('<span style=\"color: red;\">Could not fix broken reference in &lt;link&gt;: ' . $value . '</span>');exit(0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->logMsg('Reference ' . htmlentities($value) . ' was fixed.');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($array_replaces as $index => $value) {\r\n\t\t\t$this->code = str_replace($index, $value, $this->code);\r\n\t\t}\r\n\t}", "function PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url)\n{\n}", "private function _gqbReplaceHref() {\n\t\tglobal $wgGqbDefaultWidth;\n\n\t\t$page = self::$_page->getHTML();\n\t\t$pattern = '~href=\"/wiki/([^\"]+)\"\\s*class=\"image\"~';\t\n\t\t$replaced = preg_replace_callback($pattern,'self::_gqbReplaceMatches',$page);\n\n\t\tself::$_page->clearHTML();\n\t\tself::$_page->addHTML( $replaced );\n\t}", "function substHREFsInHTML() {\n\t\tif (!is_array($this->theParts['html']['hrefs'])) return;\n\t\tforeach ($this->theParts['html']['hrefs'] as $urlId => $val) {\n\t\t\t\t// Form elements cannot use jumpurl!\n\t\t\tif ($this->jumperURL_prefix && ($val['tag'] != 'form') && ( !strstr( $val['ref'], 'mailto:' ))) {\n\t\t\t\tif ($this->jumperURL_useId) {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix . $urlId;\n\t\t\t\t} else {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix.t3lib_div::rawUrlEncodeFP($val['absRef']);\n\t\t\t\t}\n\t\t\t} elseif ( strstr( $val['ref'], 'mailto:' ) && $this->jumperURL_useMailto) {\n\t\t\t\tif ($this->jumperURL_useId) {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix . $urlId;\n\t\t\t\t} else {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix.t3lib_div::rawUrlEncodeFP($val['absRef']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$substVal = $val['absRef'];\n\t\t\t}\n\t\t\t$this->theParts['html']['content'] = str_replace(\n\t\t\t\t$val['subst_str'],\n\t\t\t\t$val['quotes'] . $substVal . $val['quotes'],\n\t\t\t\t$this->theParts['html']['content']);\n\t\t}\n\t}", "public static function rewriteAnchorHrefsToPages($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $attributes = [\n 'href' => 'a[href], area[href]',\n 'longdesc' => 'img[longdesc]',\n ];\n $pagelink_count = 0;\n $report = [];\n foreach ($attributes as $attribute => $selector) {\n // Find all the hrefs on the page.\n $links_to_pages = $query_path->top($selector);\n // Initialize summary report information.\n $pagelink_count += $links_to_pages->size();\n // Loop through them all looking for href to alter.\n foreach ($links_to_pages as $link) {\n $href = trim($link->attr('href'));\n if (CheckFor::isPage($href)) {\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $link->attr($attribute, $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n Message::make(\"$attribute: $href changed to $new_href\", [], FALSE);\n $report[] = \"$attribute: $href changed to $new_href\";\n }\n }\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $pagelink_count, 'Rewrote page hrefs');\n }", "function fix_links(&$talk_data) {\n\t# to some URL like http://elearning.physik..../attachment/...whatever.pdf\n\t#\n\t# This works by call-by-reference, that is, $talk_data is changed in-place.\n\t$wikiopen = preg_quote('[['); $wikiclose = preg_quote(']]');\n\t$ticket = $talk_data['ticket_id'];\n\tforeach($talk_data as &$value) {\n\t\t// resolve links to attachments\n\t\t$value = preg_replace(\"/(?:$wikiopen)?(?:raw-)?attachment:(.*?)(?:$wikiclose)?/i\",\n\t\t\t\"https://elearning.physik.uni-frankfurt.de/projekt/raw-attachment/ticket/$ticket/\\\\1\",\n\t\t\t$value);\n\t\t// whaa... remaining brackets\n\t\t$value = str_replace(']]', '', $value);\n\t}\n\tunset($value); // dereference\n}", "protected static function doInternalAnchorsCallback($matches)\n {\n $whole_match = $matches[1];\n\n $text = trim($matches[2], '/');\n\n if(count($matches) > 3)\n {\n $url = $matches[3] == '' ? $matches[4] : $matches[3];\n $title =& $matches[7];\n }\n else\n {\n $url = $matches[2];\n $title = '';\n }\n\n $url = self::encodeAttribute($url);\n\n $red =(self::isLink($url)) ? '' : ' redlink';\n\n $attribs = 'class=\"internal'.$red.'\"';\n\n $url = self::encodeAttribute(self::getLink($url));\n\n $redAdvise =($red) ? jgettext('Click to create this page...') : '';\n\n $attribs .=((isset($title) && $title) || $redAdvise)\n ? ' title=\"'.$redAdvise.$title.'\"'\n : '';\n\n return JHtml::link($url, $text, $attribs);\n }", "function anchor_explode($page, $strict_editable = FALSE)\n{\n\t$pos = strrpos($page, '#');\n\tif ($pos === FALSE) return array($page, '', FALSE);\n\n\t// Ignore the last sharp letter\n\tif ($pos + 1 == strlen($page)) {\n\t\t$pos = strpos(substr($page, $pos + 1), '#');\n\t\tif ($pos === FALSE) return array($page, '', FALSE);\n\t}\n\n\t$s_page = substr($page, 0, $pos);\n\t$anchor = substr($page, $pos + 1);\n\n\tif($strict_editable === TRUE && preg_match('/^[a-z][a-f0-9]{7}$/', $anchor)) {\n\t\treturn array ($s_page, $anchor, TRUE); // Seems fixed-anchor\n\t} else {\n\t\treturn array ($s_page, $anchor, FALSE);\n\t}\n}", "function clean_PDF() {\r\n\t\t$this->code = str_replace('font-style: normal;', '', $this->code);\r\n\t\t$this->code = str_replace('text-decoration: none;', '', $this->code);\r\n\t\t$this->code = str_replace('overflow: visible;', '', $this->code);\r\n\t\t$this->code = preg_replace('/border-\\w+-[^\\:]+:[^;]+;/is', '', $this->code);\r\n\t\t$this->code = preg_replace('/padding-[^\\:]+:[^;]+;/is', '', $this->code);\r\n\t\t$this->code = preg_replace('/text-indent:[^;]+;/is', '', $this->code);\r\n\t\t$this->code = preg_replace('/line-height:[^;]+;/is', '', $this->code);\r\n\t\t$this->code = preg_replace('/display:[^;]+;/is', '', $this->code);\r\n\t\t//$this->code = str_replace('text-align: left;', '', $this->code);\r\n\t\t// hyphenated words...\r\n\t\t$this->code = preg_replace('/(\\w)- (\\w)/is', '$1$2', $this->code);\r\n\t\t// footnotes\r\n\t\t$footnotes_code = '<hr>\r\n';\r\n\t\tpreg_match_all('/(<p[^<>]{0,}>.{0,100}?<img[^<>]+height=\"1\".*?<\\/p>)\\s{0,}(<p[^<>]{0,}>.*?<\\/p>)/is', $this->code, $footnote_matches);\r\n\t\t//print('$footnote_matches: ');var_dump($footnote_matches);\r\n\t\t// <p class=Default><a href=\"#_ftnref1\" name=\"_ftn1\" title=\"\">[1]</a>  <i>R. v. Bentley</i>, 2017 ONCA 982</p>\r\n\t\tforeach($footnote_matches[0] as $footnote_index => $footnote_match) {\r\n\t\t\t$footnote_code = $footnote_matches[2][$footnote_index];\r\n\t\t\t$footnote_code = ReTidy::preg_replace_first('/<a name=\"bookmark[0-9]+\">\\s{0,}([0-9]+)\\s{0,}<\\/a>/is', '<a href=\"#_ftnref$1\" name=\"_ftn$1\" title=\"\">[$1]</a>', $footnote_code); // so that clean_word recognizes it\r\n\t\t\t$footnotes_code .= $footnote_code . '\r\n';\r\n\t\t\t$this->code = str_replace($footnote_matches[0][$footnote_index], '', $this->code);\r\n\t\t}\r\n\t\t$this->code = str_replace('</body>', $footnotes_code . '</body>', $this->code);\r\n\t\t// <a href=\"#bookmark0\" class=\"s6\">1</a>\r\n\t\t// <a href=\"#_ftn1\" name=\"_ftnref1\" title=\"\"><span class=MsoFootnoteReference><span class=MsoFootnoteReference><span lang=EN-GB style='font-size:12.0pt;line-height:115%;font-family:\"Times New Roman\",serif'>[1]</span></span></span></a>\r\n\t\t$this->code = preg_replace('/<a href=\"#bookmark[0-9]+\"[^<>]{0,}>([0-9]+)<\\/a>/is', '<a href=\"#_ftn$1\" name=\"_ftnref$1\" title=\"\">[$1]</a>', $this->code);\r\n\t\t// strip <p>s in <li>s; loop this since lists can be nested\r\n\t\t$closing_p_count = -1;\r\n\t\twhile($closing_p_count != 0) {\r\n\t\t\t$this->code = preg_replace('/(<li[^<>]{0,}>.*?)<\\/p>([^<>]*?<\\/li>)/is', '$1$2', $this->code, -1, $closing_p_count);\r\n\t\t}\r\n\t\t$opening_p_count = -1;\r\n\t\twhile($opening_p_count != 0) {\r\n\t\t\t$this->code = preg_replace('/(<li[^<>]{0,}>[^<>]*?)<p[^<>]{0,}>(.*?<\\/li>)/is', '$1$2', $this->code, -1, $opening_p_count);\r\n\t\t}\r\n\t\t// would be simple if this code was ready\r\n\t\t/*\r\n\t\tif(!include_once('..' . DS . 'LOM' . DS . 'O.php')) {\r\n\t\t\tprint('<a href=\"https://www.phpclasses.org/package/10594-PHP-Extract-information-from-XML-documents.html\">LOM</a> is required');exit(0);\r\n\t\t}\r\n\t\t$O = new O($this->code);\r\n\t\t$lis = $O->_('li');\r\n\t\tprint('$lis: ');var_dump($lis);*/\r\n\t\t\r\n\t\tReTidy::style_cdata();\r\n\t\r\n\t\tReTidy::dom_init();\r\n\t\tReTidy::DOM_stylesheets_to_styles();\r\n\t\tReTidy::dom_save();\r\n\r\n\t//\tReTidy::post_dom();\r\n\t\t\r\n\t}", "function _wp_link_page($i)\n {\n }", "function eblex_findhrefs2($page)\r\n{\r\n $using = false;\r\n $href = \"\";\r\n $hrefs[0] = \"\";\r\n $hrefcount = 0;\r\n\r\n for ($i = 0;$i < strlen($page)-1;$i++) {\r\n $a = $page[$i] . $page[$i + 1];\r\n ///\tModification\t30/06/2008\tmVicenik\tFoliovision\r\n //if ($a == \"<a\") {\r\n if ($a == \"<a\" || $a == \"<A\") {\r\n ///\tend of modification\r\n $using = true;\r\n }\r\n\t\tif ($page[$i] == \">\") {\r\n $using = false;\r\n if ($href != \"\") {\r\n $hrefs[$hrefcount] = $href . \">\";\r\n $hrefcount++;\r\n } \r\n $href = \"\";\r\n } \r\n\r\n if ($using == true) {\r\n $href .= $page[$i];\r\n } \r\n } \r\n\r\n return $hrefs;\r\n}", "function replacePermalink($link, $id) {\r\n\t\t/*\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn $link;\r\n\t\t}\r\n\t\tif (UWR1RESULTS_PAGE_ID_INDEX == $id) {\r\n\t\t\t$link = UWR1RESULTS_URL;\r\n\t\t} else if (UWR1RESULTS_PAGE_ID_PX == substr($id, 0, 2) && strlen($id) == strlen(UWR1RESULTS_PAGE_ID_PX) + 6) {\r\n\t\t\t$twoChars = str_split($id, 2);\r\n\t\t\t$link = UWR1RESULTS_URL.'/'.$twoChars[1].$twoChars[2];\r\n\t\t\tif ('00' != $twoChars[3]) {\r\n\t\t\t\t$link .= '/'.$twoChars[3];\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\t\treturn $link;\r\n\t}", "function CreateInternalLinks($html)\r\n{\r\n//! @return string\r\n\r\n\t$regexp = '/href=[\"]?#([^\\\\s>\"]+)/si';\r\n\tpreg_match_all( $regexp, $html, $aux);\r\n foreach($aux[1] as $val=>$key) $this->internallink['#' . $key] = true;\r\n //Fix name=something to name=\"something\"\r\n\t$regexp = '/ name=([^\\\\s>\"]+)/si';\r\n\t$html = preg_replace($regexp,' name=' . \"\\\"\\$1\\\"\",$html);\r\n\r\n return $html;\r\n}", "function permalink_anchor($mode = 'id')\n {\n }", "function _makeInternalLink($href)\n\t{\n\t\t$id = path_to_id_ct($href, FILE_TABLE, $ct);\n\t\tif (substr($ct, 0, 5) == \"text/\") {\n\t\t\t$href = \"document:$id\";\n\t\t} else \n\t\t\tif ($ct == \"image/*\") {\n\t\t\t\tif (strpos($href, \"?\") === false) {\n\t\t\t\t\t$href .= \"?id=$id\";\n\t\t\t\t}\n\t\t\t}\n\t\treturn $href;\n\t}", "function remove_more_jump_link($link) { \n$offset = strpos($link, '#more-');\nif ($offset) {\n$end = strpos($link, '\"',$offset);\n}\nif ($end) {\n$link = substr_replace($link, '', $offset, $end-$offset);\n}\nreturn $link;\n}", "function remove_more_jump_link($link) { \n$offset = strpos($link, '#more-');\nif ($offset) {\n$end = strpos($link, '\"',$offset);\n}\nif ($end) {\n$link = substr_replace($link, '', $offset, $end-$offset);\n}\nreturn $link;\n}", "function wpg_skip_link_focus_fix() {\n\t// The following is minified from js/assets/skip-link-focus-fix.js`.\n\t?>\n\t<script>\n\t/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener(\"hashchange\",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);\n\t</script>\n\t<?php\n}", "function DOM_primalize_anchors() {\r\n\t\t$blockString = DTD::getBlock() . \"|tr|th|td|li\";\r\n\t\t$blockString2 = \"|\" . $blockString;\r\n\t\t$blockString2 = str_replace('|', '|//' . ReTidy::get_html_namespace(), $blockString2);\r\n\t\t$blockString2 = substr($blockString2, 1);\r\n\t\t$query = $blockString2;\r\n\t\t$blocks = $this->xpath->query($query);\r\n\t\tforeach($blocks as $block) {\r\n\t\t\t$firstChild = $block->firstChild;\r\n\t\t\t$as = $this->xpath->query(ReTidy::get_html_namespace() . 'a[@name]', $block);\r\n\t\t\tif(sizeof($as) > 0) {\r\n\t\t\t\tforeach($as as $a) {\r\n\t\t\t\t\t// ignore footnotes\r\n\t\t\t\t\t$name_attribute = ReTidy::getAttribute($a, \"name\");\r\n\t\t\t\t\tif(strpos($name_attribute->nodeValue, \"note\") !== false || strpos($name_attribute->nodeValue, \"_ftnref\") !== false) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($a != $firstChild) {\r\n\t\t\t\t\t\t$new_node = $a->cloneNode(true);\r\n\t\t\t\t\t\t$a->setAttribute(\"stripme\", \"y\");\r\n\t\t\t\t\t\tReTidy::DOM_strip_node($a);\r\n\t\t\t\t\t\t$block->insertBefore($new_node, $firstChild);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function numbered_in_page_links( $args = array () )\r\n{\r\n $defaults = array(\r\n 'before' => '<p>' . __('Pages:', 'framework')\r\n , 'after' => '</p>'\r\n , 'link_before' => ''\r\n , 'link_after' => ''\r\n , 'pagelink' => '%'\r\n , 'echo' => 1\r\n // element for the current page\r\n , 'highlight' => 'span'\r\n );\r\n\r\n $r = wp_parse_args( $args, $defaults );\r\n $r = apply_filters( 'wp_link_pages_args', $r );\r\n extract( $r, EXTR_SKIP );\r\n\r\n global $page, $numpages, $multipage, $more, $pagenow;\r\n\r\n if ( ! $multipage )\r\n {\r\n return;\r\n }\r\n\r\n $output = $before;\r\n\r\n for ( $i = 1; $i < ( $numpages + 1 ); $i++ )\r\n {\r\n $j = str_replace( '%', $i, $pagelink );\r\n $output .= ' ';\r\n\r\n if ( $i != $page || ( ! $more && 1 == $page ) )\r\n {\r\n $output .= _wp_link_page( $i ) . \"{$link_before}{$j}{$link_after}</a>\";\r\n }\r\n else\r\n { // highlight the current page\r\n // not sure if we need $link_before and $link_after\r\n $output .= \"<$highlight>{$link_before}{$j}{$link_after}</$highlight>\";\r\n }\r\n }\r\n\r\n print $output . $after;\r\n}", "function link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '')\n {\n }", "function tagreplace_link($replace, $opentag, $tagoriginal, $closetag, $sign) {\n\n global $cfg, $defaults, $specialvars;\n\n $tagwert = $tagoriginal;\n // ------------------------------\n\n // tcpdf extra\n if ( $cfg[\"pdfc\"][\"state\"] == true ) {\n if ( !preg_match(\"/^http/\",$tagwert) ) {\n $tagwert = \"http://\".$_SERVER[\"SERVER_NAME\"].\"/\".$tagwert;\n }\n }\n\n if ( $sign == \"]\" ) {\n $ausgabewert = \"<a href=\\\"\".$tagwert.\"\\\" title=\\\"\".$tagwert.\"\\\">\".$tagwert.\"</a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $linkwerte = explode(\";\",$tagwerte[0]);\n $href = $linkwerte[0];\n if ( !isset($tagwerte[1]) ) {\n $beschriftung = $href;\n } else {\n $beschriftung = $tagwerte[1];\n }\n\n // ziel\n if ( isset($linkwerte[1]) ) {\n $target = \" target=\\\"\".$linkwerte[1].\"\\\"\";\n } else {\n $target = null;\n }\n\n // title-tag\n if ( isset($linkwerte[2]) ) {\n $title = $linkwerte[2];\n } else {\n if ( !isset($linkwerte[1]) ) $linkwerte[1] = null;\n if ( $linkwerte[1] == \"_blank\" ) {\n $title = \"Link in neuem Fenster: \".str_replace(\"http://\",\"\",$href);\n } elseif ( !strstr($beschriftung,\"<\") ) {\n $title = $beschriftung;\n } else {\n $title = null;\n }\n }\n\n // css-klasse\n $class = \" class=\\\"link_intern\";\n if ( preg_match(\"/^http/\",$href) ) { # automatik\n $class = \" class=\\\"link_extern\";\n } elseif ( preg_match(\"/^\".str_replace(\"/\",\"\\/\",$cfg[\"file\"][\"base\"][\"webdir\"]).\".*\\.([a-zA-Z]+)/\",$href,$match) ) {\n if ( $cfg[\"file\"][\"filetyp\"][$match[1]] != \"\" ) {\n $class = \" class=\\\"link_\".$cfg[\"file\"][\"filetyp\"][$match[1]];\n }\n }\n if ( isset($linkwerte[3]) ) { # oder manuell\n $class .= \" \".$linkwerte[3];\n }\n $class .= \"\\\"\";\n\n // id\n if ( isset($linkwerte[4]) ) {\n $id = \" id=\\\"\".$linkwerte[4].\"\\\"\";\n } else {\n $id = null;\n }\n\n if ( !isset($pic) ) $pic = null;\n $ausgabewert = $pic.\"<a href=\\\"\".$href.\"\\\"\".$id.$target.\" title=\\\"\".$title.\"\\\"\".$class.\">\".$beschriftung.\"</a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n }\n\n // ------------------------------\n return $replace;\n }", "function numbered_in_page_links( $args = array () )\n{\n $defaults = array(\n 'before' => '<div class=\"page-links\"><i class=\"icon-menu-3 pageLinksToggle\"></i><ul class=\"subpage-list\">' \n , 'after' => '</ul></div>'\n , 'link_before' => '<li>'\n , 'link_after' => '</li>'\n , 'pagelink' => '%'\n , 'echo' => 1\n // element for the current page\n , 'highlight' => 'b'\n );\n\n $r = wp_parse_args( $args, $defaults );\n $r = apply_filters( 'wp_link_pages_args', $r );\n extract( $r, EXTR_SKIP );\n\n global $page, $numpages, $multipage, $more, $pagenow;\n\n if ( ! $multipage )\n {\n return;\n }\n\n $output = $before;\n\n for ( $i = 1; $i < ( $numpages + 1 ); $i++ )\n {\n $j = str_replace( '%', $i, $pagelink );\n $output .= ' ';\n\n if ( $i != $page || ( ! $more && 1 == $page ) )\n {\n $output .= \"{$link_before}\". _wp_link_page( $i ) . \"{$j}</a>{$link_after}\";\n }\n else\n { // highlight the current page\n // not sure if we need $link_before and $link_after\n $output .= \"{$link_before}<$highlight>{$j}</$highlight>{$link_after}\";\n }\n }\n\n print $output . $after;\n}", "private function relativePathFix($path){\n\t\t// check if page is a generated javadoc\n\t\t$page_str = $this->doc->saveHTML();\n\t\tif(preg_match('%.*Generated by javadoc.*%', $page_str)){\n\t\t\t// if it is, fix the frame-based links so that the path isn't appended to itself infinitely\n\t\t\t$path = preg_replace('%(.*\\/).*\\.html\\?(.*\\/.*)%', \"$1$2\", $path);\n\t\t}\n\t\t$dirs = explode('/', $path);\n\t\t// check if link goes up a directory\n\t\tif($dirs[0] == '..'){\n\t\t\t$new_path = explode('/', $this->current_path);\n\t\t\tif(count($dirs) == 2){\n\t\t\t\tarray_pop($new_path);\n\t\t\t\tarray_pop($new_path);\n\t\t\t\t$new_path = implode('/', $new_path).'/';\n\t\t\t} else {\n\t\t\t\t// remove slash from end of current path to ensure single slashes\n\t\t\t\tif(empty($new_path[count($new_path)-1]) || is_null($new_path[count($new_path)-1])){\n\t\t\t\t\tarray_pop($new_path);\n\t\t\t\t}\n\t\t\t\t// go up directories\n\t\t\t\twhile($dirs[0] == '..'){\n\t\t\t\t\tarray_shift($dirs);\n\t\t\t\t\tarray_pop($new_path);\n\t\t\t\t}\n\t\t\t\t// stick the two paths together to get new path\n\t\t\t\t$new_path = implode('/', $new_path).'/';\n\t\t\t\t$new_path .= implode('/', $dirs);\n\t\t\t}\n\t\t// if link it to same dir, remove the ./\n\t\t} elseif($dirs[0] == '.'){\n\t\t\t$new_path = $this->current_path.substr($path, 2);\n\t\t// if the link starts at root, use it without modification\n\t\t} elseif(empty($dirs[0]) || is_null($dirs[0])){\n\t\t\t$new_path = $path;\n\t\t} elseif(strlen($dirs[0]) == 2){\n\t\t\t$new_path = '/'.$path;\n\t\t// default to adding the link's value to the end of the current directory\n\t\t} else {\n\t\t\t$new_path = $this->current_path.$path;\n\t\t}\n\t\t\n\t\t// if the link doesn't point to a file or query string, but has no end slash, add one\n\t\tif(count(explode('.', $new_path)) < 2 && count(explode('?', $new_path)) < 2 && substr($new_path, -1) != '/'){\n\t\t\t$new_path .= '/';\n\t\t}\n\t\treturn $new_path;\n\t}", "function capezzahill_skip_link_focus_fix() {\r\n\t?>\r\n\t<script>\r\n\t/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener(\"hashchange\",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);\r\n\t</script>\r\n\t<?php\r\n}", "protected function updateBrokenLinks() {}", "function remove_more_jump_link($link) { \n\t$offset = strpos($link, '#more-');\n\tif ($offset) {\n\t\t$end = strpos($link, '\"',$offset);\n\t}\n\tif ($end) {\n\t\t$link = substr_replace($link, '', $offset, $end-$offset);\n\t}\n\treturn $link;\n}", "function remove_more_jump_link($link) { \n\t$offset = strpos($link, '#more-');\n\tif ($offset) {\n\t\t$end = strpos($link, '\"',$offset);\n\t}\n\tif ($end) {\n\t\t$link = substr_replace($link, '', $offset, $end-$offset);\n\t}\n\treturn $link;\n}", "function DrawPages( $link=\"\" )\r\n\t\t{\r\n\t\t\tif( $link == \"\" )\r\n\t\t\t{\r\n\t\t\t\t$link = $_SERVER[\"PHP_SELF\"] . \"?\" . $_SERVER[\"QUERY_STRING\"];\r\n\t\t\t\t\r\n\t\t\t\tif( $pos_PAGE = strpos( $link, \"&page=\" ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$link = substr( $link, 0, $pos_PAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// usando el array remove_words\r\n\t\t\t// ejecuta la eliminación de posibles parametros\r\n\t\t\tfor( $ij=0; $ij<count($this->remove_words); $ij++ )\r\n\t\t\t{\r\n\t\t\t\t$link = str_replace( $this->remove_words[$ij], \"\", $link );\r\n\t\t\t}\r\n\r\n\t\t\techo \"<br>\";\r\n\r\n\t\t\t$str_page = \"P&aacute;ginas\";\r\n\t\t\t\r\n\t\t\tif( $this->lang != 1 )\r\n\t\t\t{\r\n\t\t\t\tif( $this->lang == 2 )\r\n\t\t\t\t\t$str_page = \"Pages\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<div style='float:left; width:74%;'>\";\r\n\t\t\techo \"<table align='center' border='0'>\";\r\n\t\t\techo \"<tr><td align='center' class='columna'>\" . (($this->TotalPages==0) ? \"\" : \"$str_page\") . \"&nbsp;\";\r\n\r\n\t\t\tif( $this->page > 1 )\r\n\t\t\t echo \"&nbsp;<a href='$link&page=\" . ($this->page-1) . \"'><img src='../images/back_btn.gif' alt='Anterior'></a>\";\t\t\r\n\r\n\t\t\t$since = 1;\r\n\t\t\t$to = $this->TotalPages;\r\n\r\n\t\t\tif( $this->TotalPages > 20 )\r\n\t\t\t{\r\n\t\t\t\t$since = $this->page;\r\n\t\t\t\t$to = $since + 20;\r\n\r\n\t\t\t\tif( $to > $this->TotalPages )\r\n\t\t\t\t{\r\n\t\t\t\t\t$to = $this->TotalPages;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->TotalPages > 20 and $this->style==\"N\")\r\n\t\t\t{\r\n\t\t\t\techo \"&nbsp;<a href=''>...</a>\";\t\r\n\t\t\t}\r\n\r\n\t\t\t$index_page = $this->page;\r\n\r\n\t\t\tif( $this->style == \"A\" )\r\n\t\t\t{\r\n\t\t\t\t$since = 1;\r\n\t\t\t\t$to = 26;\r\n\r\n\t\t\t\tif( substr($this->page,0,1) == \"!\" )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->page = substr($this->page, 1, strlen($this->page));\r\n\t\t\t\t\t$this->page = 26 + $this->page;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$index_page = $this->page;\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// convertir la página Alfabetica a un INDICE\r\n\t\t\t\t\t$index_page = (ord($this->page) - 64);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor($i=$since; $i<=$to; $i++ )\r\n\t\t\t{\r\n\t\t\t\tif( $i == $index_page )\r\n\t\t\t\t{\r\n\t\t\t\t\techo \"<b><font size=+1>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( $this->style == \"A\" )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$str = chr(64+$i);\r\n\t\t\t\t\t\techo $str;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\techo $i;\t\t\t\t\t\r\n\r\n\t\t\t\t\techo \"</font></b>&nbsp;\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif( $this->style == \"A\" )\r\n\t\t\t\t\t\t$str = chr(64+$i);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$str = $i;\r\n\r\n\t\t\t\t\techo \"<a href='\" . $link . \"&page=$str'>\";\r\n\t\t\t\t\techo (($i==$this->page-1 or $i==$this->page+1) ? \"<font size=+0>\" : \"\");\r\n\r\n\t\t\t\t\techo $str;\r\n\r\n\t\t\t\t\techo (($i==$this->page-1 or $i==$this->page+1) ? \"</font>\" : \"\");\r\n\t\t\t\t\techo \"</a>&nbsp;\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->style == \"A\" )\r\n\t\t\t{\r\n\t\t\t\tfor($i=0; $i<=9; $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif( 26+$i == $index_page )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\techo \"<strong><font size=+1>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$str = chr(48+$i);\r\n\t\t\t\t\t\techo $str;\r\n\t\r\n\t\t\t\t\t\techo \"</font></strong>&nbsp;\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$str = chr(48+$i);\r\n\t\r\n\t\t\t\t\t\techo \"<a href='\" . $link . \"&page=!$str'>\";\r\n\t\t\t\t\t\techo ((26+$i==$this->page-1 or 26+$i==$this->page+1) ? \"<font size=+0>\" : \"\");\r\n\t\r\n\t\t\t\t\t\techo $str;\r\n\t\r\n\t\t\t\t\t\techo ((26+$i==$this->page-1 or 26+$i==$this->page+1) ? \"</font>\" : \"\");\r\n\t\t\t\t\t\techo \"</a>&nbsp;\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->TotalPages > 20 and $this->style==\"N\" )\r\n\t\t\t{\r\n\t\t\t\techo \"&nbsp;<a href=''>...</a>\";\t\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->page<($this->TotalPages-1))\r\n\t\t\t echo \"&nbsp;<a href='$link&page=\" . ($this->page+1) . \"'><img src='../images/forward_btn.gif' alt='Siguiente'></a>\";\t\r\n\r\n\t\t\techo \"</td></tr>\";\r\n\t\t\techo \"</table>\";\r\n\t\t\techo \"</div>\";\r\n\t\t\t\r\n\t\t\tglobal $pr;\r\n\t\t\t\r\n\t\t\tif( isset($pr) )\r\n\t\t\t{\r\n\t\t\t\tglobal $LBL_RECS_X_PAGE;\r\n\t\t\t\techo \"<div style='float:right; width:25%; text-align:right;' class='x-pageRanges'>$LBL_RECS_X_PAGE \";\r\n\t\t\t\techo \"\t<span \" . (($pr==10) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=10'>10</a></span>&nbsp; \";\r\n\t\t\t\techo \"\t<span \" . (($pr==15) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=15'>15</a></span>&nbsp;\";\r\n\t\t\t\techo\"\t<span \" . (($pr==20) ? \"class='current' \" : \"\") . \"><a href='\" . $_SERVER[\"PHP_SELF\"] . \"?pr=20'>20</a></span>&nbsp;\";\r\n\t\t\t\techo \" </div>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<br style='clear:both'>\";\r\n\t\t}" ]
[ "0.6430346", "0.61010975", "0.59554356", "0.5812311", "0.57702124", "0.5656716", "0.563696", "0.55527383", "0.5547772", "0.54914844", "0.5488081", "0.54794395", "0.543219", "0.54210925", "0.5417346", "0.5408897", "0.53733844", "0.53733844", "0.53650135", "0.5365002", "0.5344661", "0.53349763", "0.5310812", "0.5310306", "0.52481294", "0.5206005", "0.5172986", "0.51715654", "0.51715654", "0.516051" ]
0.74641377
0
Check href for containing an fragment (ex. /blah/index.htmlhello).
public static function hasFragment($href) { if (substr_count($href, "#") > 0) { return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isOnlyFragment($href) {\n $first_char = substr($href, 0, 1);\n if ($first_char === \"#\") {\n return TRUE;\n }\n return FALSE;\n }", "function fragmentCheck(){\n\n\t\t/* Get our URI */\n\t\t$uri = $_SERVER['REQUEST_URI'];\n\n\t\t/* Check to see if we're using fragments */\n\t\tif( strpos($uri, $this->escapeFragment) ){\n\t\t\t\n\t\t\t/* Remove Fragment and Redirect */\n\t\t\t$uri = str_replace($this->escapeFragment.'/','',$uri);\n\t\t\theader('Location: '.$uri);\n\t\t}\n\t}", "public function test_fragment_only()\n {\n $link = WebLink::make('https://#fragment');\n $this->assertEquals('#fragment', $link->getUrl());\n\n $link = WebLink::make('http://#fragment');\n $this->assertEquals('#fragment', $link->getUrl());\n }", "public function testWithFragment()\n {\n $uri = $this->getUriForTest();\n $uriFragment = $uri->withFragment('foo-bar');\n\n $this->assertEquals('fragment', $uri->getFragment());\n $this->assertEquals('foo-bar', $uriFragment->getFragment());\n }", "public function assertFragmentIs( $fragment ) {\n\t\t$pattern = preg_quote( $fragment, '/' );\n\n\t\t$actual = (string) wp_parse_url( $this->driver->executeScript( 'return window.location.href;' ), PHP_URL_FRAGMENT );\n\n\t\tPHPUnit::assertThat(\n\t\t\t$actual,\n\t\t\tnew RegularExpression( '/^' . str_replace( '\\*', '.*', $pattern ) . '$/u' ),\n\t\t\t\"Actual fragment [{$actual}] does not equal expected fragment [{$fragment}].\"\n\t\t);\n\n\t\treturn $this;\n\t}", "public function fragment() {\n\t\tif(strpos($_SERVER['REQUEST_URI'], '#') === false) return '';\n\t\t$info = parse_url($_SERVER['REQUEST_URI']);\n\t\treturn empty($info['fragment']) ? '' : $info['fragment']; \n\t}", "public function hasAnchor()\n {\n if (strpos($this->url, '#') > -1) {\n return true;\n } else {\n return false;\n }\n }", "private function extractUri($tag, $fragment) {\n $regex = ($tag == 'a' || $tag == 'A') ? 'href' : 'src';\n $regex = '/' . $regex . '=\"([^\"]+)/i';\n switch (TRUE) {\n case !preg_match($regex, $fragment, $matches):\n case !preg_match('#sites/default/files#', $matches[1]):\n break;\n default:\n return $matches[1];\n }\n return NULL;\n }", "public function testFragmentExists()\n {\n self::setupSystems();\n $ret = DALBaker::fragmentExists('MergeSys2', 'getAttributesTextAttribute', 'MergeSys1.getLinks');\n PHPUnit_Framework_Assert::assertTrue($ret);\n\n }", "public function testFragmentDoesntExist()\n {\n self::setupSystems();\n $ret = DALBaker::fragmentExists('MergeSys2', 'dummyFragment', 'MergeSys1.getLinks');\n PHPUnit_Framework_Assert::assertFalse($ret);\n\n }", "public function assertFragmentBeginsWith( $fragment ) {\n\t\t$actual = (string) wp_parse_url( $this->driver->executeScript( 'return window.location.href;' ), PHP_URL_FRAGMENT );\n\n\t\tPHPUnit::assertStringStartsWith(\n\t\t\t$fragment,\n\t\t\t$actual,\n\t\t\t\"Actual fragment [$actual] does not begin with expected fragment [$fragment].\"\n\t\t);\n\n\t\treturn $this;\n\t}", "function strip_fragment_from_url($url)\n {\n }", "public function getFragment() {\n\n if (empty($this->urlParts['fragment'])) {\n return '';\n }\n return rawurlencode($this->urlParts['fragment']);\n }", "function ind_hrefparser($text) {\n\t$answer = false;\n\t$regexp = \"<a\\s[^>]*href=(\\\"??)([^\\\" >]*?)\\\\1[^>]*>(.*)<\\/a>\";\n\tif(preg_match_all(\"/$regexp/siU\", $text, $matches)) {\n\t\t$answer['url'] = $matches[2][0];\n\t\t$answer['chapter'] = $matches[3][0];\n\t}\n\treturn $answer;\n}", "function on_page($page,$partial_match = false) {\n if(!is_array($page)) {\n $page = array($page);\n }\n $current_page = substr($_SERVER['SCRIPT_FILENAME'],\n strpos($_SERVER['SCRIPT_FILENAME'], PMDROOT) + strlen(PMDROOT)\n );\n foreach($page AS $name) {\n if($partial_match) {\n if(strstr($current_page,$name)) {\n return true;\n }\n } elseif(ltrim($name,'/') == ltrim($current_page,'/')) {\n return true;\n }\n }\n return false;\n}", "public function withFragment($fragment)\n {\n }", "public function verifyContainsURL(): bool\n {\n $words = explode(' ', $this->input);\n foreach ($words as $word) {\n if (static::isValidURL($word)) {\n return true;\n }\n }\n \n return false;\n }", "function ju_is_url_absolute(string $u):bool {return ju_starts_with($u, ['http', '//']);}", "public function assertFragmentIsNot( $fragment ) {\n\t\t$actual = (string) wp_parse_url( $this->driver->executeScript( 'return window.location.href;' ), PHP_URL_FRAGMENT );\n\n\t\tPHPUnit::assertNotEquals(\n\t\t\t$fragment,\n\t\t\t$actual,\n\t\t\t\"Fragment [{$fragment}] should not equal the actual value.\"\n\t\t);\n\n\t\treturn $this;\n\t}", "public function hasAreaInUri(): bool;", "function block_url_and_email($str)\n\t{\n\t\treturn ( preg_match(\"/[\\w\\[@\\]&.%*-]+\\.[\\w*.]*[\\w-*]{2,}\\/?/\", $str)) ? FALSE : TRUE;\n\t}", "public function testWithPathInvalidQueryStringFragment()\n {\n $uri = $this->getUriForTest();\n $uri->withPath('/foo/bar#fragment');\n }", "function checkForBadLink($url) {\n\t\t$link = getDbConnect();\n\t\t$preparedStatement = $link->prepare(\"select hash from google_safe_browsing where hash = :hash;\");\n\t\t$preparedStatement->execute(array(\":hash\" => md5($url)));\n\t\treturn count($preparedStatement->fetchAll()) == 0;\n\t}", "function parseBlock($url, $start, $end)\n {\n if($url && $start && $end)\n {\n $str = file_get_contents($url);\n \n $start = strpos($str, $start);\n \n $len = strpos($str, $end) - $start;\n \n $block = substr($str, $start, $len);\n return $block;\n }\n else\n return false;\n }", "function urlcontains($string) {\n if (strpos('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'],$string) == true) {\n return true;\n }\n }", "function isValidBookmark($value, $empty, &$params, &$formvars) {\n\n if (empty($formvars['url'])) return false;\n $bm = $this->bm->fetchUrlInfo($formvars['url']);\n if (!$bm) return false;\n return true;\n\n }", "function check_link_hash($token, $link_name)\n{\n\treturn $token === generate_link_hash($link_name);\n}", "public static function getFragment($uri = false){\n if(!$uri){\n $uri = self::getUri();\n }\n return parse_url($uri, PHP_URL_FRAGMENT);\n }", "function horsaw_fragment( $fragment_path, $params = [] ) {\n\t$fragment_full_path = get_template_directory() . '/fragments/' . $fragment_path . '.php';\n\n\tif ( file_exists( $fragment_full_path ) ) {\n\t\textract( $params );\n\t\tinclude_once $fragment_full_path;\n\t}\n}", "function validate_url(&$tag, $out)\n\t{\n\t\t$url = trim($tag[1] ? $tag[1] : $out);\n\t\tif ('javascript:' == substr($url, 0, 11))\n\t\t\treturn false;\n\n\t\t// add a http to argument if there isn't one\n\t\tif ($tag[1]) {\n\t\t\tif (!preg_match('/^(\\w+:\\/\\/)/', $tag[1]))\n\t\t\t\t$tag[1] = 'http://'.$tag[1];\n\t\t} else {\n\t\t\t// no argument, append http to body\n\t\t\tif (is_string($tag[2]) &&\t\n\t\t\t\t!preg_match('/^(\\w+:\\/\\/)/', $tag[2])) \n\t\t\t{\n\t\t\t\t$tag[2] = 'http://'.$tag[2];\n\t\t\t}\n\t\t}\n\n\n\t\treturn true;\n\t}" ]
[ "0.76852643", "0.69386387", "0.6864983", "0.61805373", "0.6128746", "0.6093807", "0.6004143", "0.5970865", "0.58194524", "0.57559854", "0.5740226", "0.5535317", "0.53645766", "0.5341598", "0.5316087", "0.5226562", "0.5188018", "0.51648325", "0.51498115", "0.5142217", "0.51342314", "0.50969964", "0.5091613", "0.5090823", "0.5075468", "0.5072083", "0.5066261", "0.5062667", "0.50468796", "0.5035644" ]
0.7637604
1
Check href for only containing a fragment (ex. hello).
public static function isOnlyFragment($href) { $first_char = substr($href, 0, 1); if ($first_char === "#") { return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function hasFragment($href) {\n if (substr_count($href, \"#\") > 0) {\n return TRUE;\n }\n return FALSE;\n }", "public function test_fragment_only()\n {\n $link = WebLink::make('https://#fragment');\n $this->assertEquals('#fragment', $link->getUrl());\n\n $link = WebLink::make('http://#fragment');\n $this->assertEquals('#fragment', $link->getUrl());\n }", "function fragmentCheck(){\n\n\t\t/* Get our URI */\n\t\t$uri = $_SERVER['REQUEST_URI'];\n\n\t\t/* Check to see if we're using fragments */\n\t\tif( strpos($uri, $this->escapeFragment) ){\n\t\t\t\n\t\t\t/* Remove Fragment and Redirect */\n\t\t\t$uri = str_replace($this->escapeFragment.'/','',$uri);\n\t\t\theader('Location: '.$uri);\n\t\t}\n\t}", "public function hasAnchor()\n {\n if (strpos($this->url, '#') > -1) {\n return true;\n } else {\n return false;\n }\n }", "public function assertFragmentIs( $fragment ) {\n\t\t$pattern = preg_quote( $fragment, '/' );\n\n\t\t$actual = (string) wp_parse_url( $this->driver->executeScript( 'return window.location.href;' ), PHP_URL_FRAGMENT );\n\n\t\tPHPUnit::assertThat(\n\t\t\t$actual,\n\t\t\tnew RegularExpression( '/^' . str_replace( '\\*', '.*', $pattern ) . '$/u' ),\n\t\t\t\"Actual fragment [{$actual}] does not equal expected fragment [{$fragment}].\"\n\t\t);\n\n\t\treturn $this;\n\t}", "public function assertFragmentBeginsWith( $fragment ) {\n\t\t$actual = (string) wp_parse_url( $this->driver->executeScript( 'return window.location.href;' ), PHP_URL_FRAGMENT );\n\n\t\tPHPUnit::assertStringStartsWith(\n\t\t\t$fragment,\n\t\t\t$actual,\n\t\t\t\"Actual fragment [$actual] does not begin with expected fragment [$fragment].\"\n\t\t);\n\n\t\treturn $this;\n\t}", "public function testWithFragment()\n {\n $uri = $this->getUriForTest();\n $uriFragment = $uri->withFragment('foo-bar');\n\n $this->assertEquals('fragment', $uri->getFragment());\n $this->assertEquals('foo-bar', $uriFragment->getFragment());\n }", "public function testFragmentExists()\n {\n self::setupSystems();\n $ret = DALBaker::fragmentExists('MergeSys2', 'getAttributesTextAttribute', 'MergeSys1.getLinks');\n PHPUnit_Framework_Assert::assertTrue($ret);\n\n }", "public function fragment() {\n\t\tif(strpos($_SERVER['REQUEST_URI'], '#') === false) return '';\n\t\t$info = parse_url($_SERVER['REQUEST_URI']);\n\t\treturn empty($info['fragment']) ? '' : $info['fragment']; \n\t}", "public function testFragmentDoesntExist()\n {\n self::setupSystems();\n $ret = DALBaker::fragmentExists('MergeSys2', 'dummyFragment', 'MergeSys1.getLinks');\n PHPUnit_Framework_Assert::assertFalse($ret);\n\n }", "public function verifyContainsURL(): bool\n {\n $words = explode(' ', $this->input);\n foreach ($words as $word) {\n if (static::isValidURL($word)) {\n return true;\n }\n }\n \n return false;\n }", "private function extractUri($tag, $fragment) {\n $regex = ($tag == 'a' || $tag == 'A') ? 'href' : 'src';\n $regex = '/' . $regex . '=\"([^\"]+)/i';\n switch (TRUE) {\n case !preg_match($regex, $fragment, $matches):\n case !preg_match('#sites/default/files#', $matches[1]):\n break;\n default:\n return $matches[1];\n }\n return NULL;\n }", "public function hasAreaInUri(): bool;", "public static function validateQueryFragment($input)\n {\n $regex = '/^(?:[' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ':@\\/\\?]+|%[A-Fa-f0-9]{2})*$/';\n return (bool) preg_match($regex, $input);\n }", "public function withFragment($fragment)\n {\n }", "public function assertFragmentIsNot( $fragment ) {\n\t\t$actual = (string) wp_parse_url( $this->driver->executeScript( 'return window.location.href;' ), PHP_URL_FRAGMENT );\n\n\t\tPHPUnit::assertNotEquals(\n\t\t\t$fragment,\n\t\t\t$actual,\n\t\t\t\"Fragment [{$fragment}] should not equal the actual value.\"\n\t\t);\n\n\t\treturn $this;\n\t}", "protected function isLink() {}", "function strip_fragment_from_url($url)\n {\n }", "function ju_is_url_absolute(string $u):bool {return ju_starts_with($u, ['http', '//']);}", "function block_url_and_email($str)\n\t{\n\t\treturn ( preg_match(\"/[\\w\\[@\\]&.%*-]+\\.[\\w*.]*[\\w-*]{2,}\\/?/\", $str)) ? FALSE : TRUE;\n\t}", "function check_link_hash($token, $link_name)\n{\n\treturn $token === generate_link_hash($link_name);\n}", "function validate_url(&$tag, $out)\n\t{\n\t\t$url = trim($tag[1] ? $tag[1] : $out);\n\t\tif ('javascript:' == substr($url, 0, 11))\n\t\t\treturn false;\n\n\t\t// add a http to argument if there isn't one\n\t\tif ($tag[1]) {\n\t\t\tif (!preg_match('/^(\\w+:\\/\\/)/', $tag[1]))\n\t\t\t\t$tag[1] = 'http://'.$tag[1];\n\t\t} else {\n\t\t\t// no argument, append http to body\n\t\t\tif (is_string($tag[2]) &&\t\n\t\t\t\t!preg_match('/^(\\w+:\\/\\/)/', $tag[2])) \n\t\t\t{\n\t\t\t\t$tag[2] = 'http://'.$tag[2];\n\t\t\t}\n\t\t}\n\n\n\t\treturn true;\n\t}", "public function isMenuItemValidOmittedHrefAndRouteExpectFalse() {}", "protected function checkHtmlLink(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_HtmlLink) && $this->_HtmlLink !== null && $this->_HtmlLink !== '' ) {\n\t\t\t$inMessage .= \"{$this->_HtmlLink} is not a valid value for HtmlLink\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\t\t\t\n\t\treturn $isValid;\n\t}", "function ind_hrefparser($text) {\n\t$answer = false;\n\t$regexp = \"<a\\s[^>]*href=(\\\"??)([^\\\" >]*?)\\\\1[^>]*>(.*)<\\/a>\";\n\tif(preg_match_all(\"/$regexp/siU\", $text, $matches)) {\n\t\t$answer['url'] = $matches[2][0];\n\t\t$answer['chapter'] = $matches[3][0];\n\t}\n\treturn $answer;\n}", "abstract public function isLink($target);", "public function getFragment() {\n\n if (empty($this->urlParts['fragment'])) {\n return '';\n }\n return rawurlencode($this->urlParts['fragment']);\n }", "function isValidBookmark($value, $empty, &$params, &$formvars) {\n\n if (empty($formvars['url'])) return false;\n $bm = $this->bm->fetchUrlInfo($formvars['url']);\n if (!$bm) return false;\n return true;\n\n }", "public function isUri();", "private function doesFragmentConditionMatch(\\GraphQL\\Language\\AST\\Node $fragment, \\GraphQL\\Type\\Definition\\ObjectType $type) : bool\n {\n }" ]
[ "0.77454245", "0.7070848", "0.67604244", "0.6241675", "0.6065772", "0.589869", "0.5858634", "0.56714714", "0.5645913", "0.56018704", "0.5492034", "0.54068816", "0.5399042", "0.5357805", "0.53224516", "0.532026", "0.52980167", "0.51373214", "0.5129398", "0.5117526", "0.511549", "0.5106728", "0.507588", "0.5037769", "0.50277317", "0.5021686", "0.5002095", "0.49953106", "0.49877387", "0.49658012" ]
0.79999095
0
Searches $haystack for a prelude string then returns the next url found.
public static function peelUrl($haystack, $prelude_string, $wrapper_start, $wrapper_end) { $wrapped = preg_split("/{$prelude_string}/i", $haystack, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); // If something was found there will be > 1 element in the array. if (count($wrapped) > 1) { $found = $wrapped[1]; $start_location = stripos($found, $wrapper_start); // Lets set a limit to how far this will search from the $prelude_string. // Anything more than 75 characters ahead is risky. $start_location = ($start_location < 75) ? $start_location : FALSE; // Account for the length of the start wrapper. $start_location = ($start_location !== FALSE) ? $start_location + strlen($wrapper_start) : FALSE; // Offset the search for the end, so the start does not get found x2. $end_location = ($start_location !== FALSE) ? stripos($found, $wrapper_end, $start_location) : FALSE; // Need both a start and end to grab the middle. if (($start_location !== FALSE) && ($end_location !== FALSE) && ($end_location > $start_location)) { $url = substr($found, $start_location, $end_location - $start_location); $url = StringTools::superTrim($url); // Make sure we have a valid URL. if (!empty($url) && filter_var($url, FILTER_VALIDATE_URL)) { return $url; } } } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function str_istarts_with($needle, $haystack)\n {\n return str::startsWithIgnoreCase($needle, $haystack);\n }", "public static function before(string $haystack, string $needle): string\n {\n if ($needle === '') {\n return $haystack;\n }\n $position = strpos($haystack, $needle);\n return $position !== false ? substr($haystack, 0, $position) : $haystack;\n }", "public static function stringStartsWith($needle, $haystack)\n {\n return preg_match('/^' . preg_quote($needle, '/') . '/', $haystack);\n }", "function stristrr($haystack, $needle, $before_needle=false) {\n if(!$before_needle) return stristr($haystack, $needle);\n\n $pos = stripos($haystack, $needle);\n if($pos === false) return false;\n return substr($haystack, 0, $pos);\n}", "public function strrchr($haystack, $needle)\n {\n return strrchr($haystack, $needle);\n }", "function my_strstr($haystack, $needle, $before_needle=FALSE) \n{\n \tif(($pos=strpos($haystack,$needle))===FALSE) return $haystack;\n\n \tif($before_needle) return substr($haystack,0,$pos+strlen($needle));\n\t else return substr($haystack,$pos);\n}", "protected static function strrstr($haystack, $needle, $before_needle = false) {\n\t\t\t$result = false;\n\t\t\t$pos = strrpos($haystack, $needle);\n\t\t\tif ($pos !== false) {\n\t\t\t\tif (!$before_needle) {\n\t\t\t\t\t$pos += strlen($needle);\n\t\t\t\t\t$result = substr($haystack, $pos);\n\t\t\t\t} else {\n\t\t\t\t\t$result = substr($haystack, 0, $pos);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "private function startsWith($haystack, $needle) {\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\n }", "function LookForExistingURLSegment($URLSegment)\n {\n return Company::get()->filter(array('URLSegment' => $URLSegment, 'ID:not' => $this->ID))->first();\n }", "function startsWith($haystack, $needle) {\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\n }", "public function startswith($other)\n {\n return $this->compare(Operators::LIKE, (string) $other.'%');\n }", "private function startsWith($haystack, $needle)\n\t{\n \treturn $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\n\t}", "function startWith($haystack, $needle){\n \treturn $needle === \"\" || strpos($haystack, $needle) === 0;\n\t}", "public function extract_version_number_from( $haystack ) {\n\t\tpreg_match( '/((\\d)+(\\.|\\D))+/', $haystack, $version_candidates_array );\n\n\t\tif ( count( $version_candidates_array ) > 0 && strlen( $version_candidates_array[0] ) > 0 ) {\n\t\t\t$version_candidates_array[0] = str_replace( '.', '_', $version_candidates_array[0] );\n\t\t\t$version_candidates_array[0] = preg_replace( '/[\\W]/', '', $version_candidates_array[0] );\n\t\t\t$version_candidates_array[0] = str_replace( '_', '.', $version_candidates_array[0] );\n\t\t\t$version = $version_candidates_array[0];\n\t\t} else {\n\t\t\t$version = 'Unknown';\n\t\t}\n\n\t\treturn $version;\n\t}", "function strstr2($haystack, $needle, $before_needle = false){\n\t$pos = strpos(strtolower($haystack), strtolower($needle));\n\tif($pos === false)\n\t\treturn '';\n\tif($before_needle){\n\t\treturn substr($haystack, 0, $pos);\n\t} else {\n\t\treturn substr($haystack, $pos + strlen($needle));\n\t}\n}", "function startsWith($haystack, $needle) {\r\n\t\treturn $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;\r\n\t}", "function str_starts_with($needle, $haystack)\n {\n return str::startsWith($needle, $haystack);\n }", "public function strrpos($haystack, $needle) {\n\t\treturn grapheme_strrpos($haystack, $needle);\n\t}", "private function getNextNotCrawledUrl(): ?Url\n {\n return $this->search->urls()\n ->notCrawled()\n ->first();\n }", "public function startsWith($haystack, $needle) \n {\n return $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\n }", "protected static function strBeforeStr($haystack, $needle1, $needle2, $processBackToFront = false) {\n\t\t\t$result = false;\n\t\t\tif (!$processBackToFront) {\n\t\t\t\t$posN1 = strpos($haystack, $needle1);\n\t\t\t\t$posN2 = strpos($haystack, $needle2);\n\t\t\t\tif ($posN1 !== false && $posN2 !== false) {\n\t\t\t\t\t$result = ($posN1 < $posN2) ? true : false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$posN1 = strrpos($haystack, $needle1);\n\t\t\t\t$posN2 = strrpos($haystack, $needle2);\n\t\t\t\tif ($posN1 !== false && $posN2 !== false) {\n\t\t\t\t\t$result = ($posN1 > $posN2) ? true : false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "function strrpos_ex($haystack, $needle, $offset=0) {\n\t\t$pos_rule = ($offset<0)?strlen($haystack)+($offset-1):$offset;\n\t\t$last_pos = false; $first_run = true;\n\t\tdo {\n\t\t\t$pos=strpos($haystack, $needle, (intval($last_pos)+(($first_run)?0:strlen($needle))));\n\t\t\tif ($pos!==false && (($offset<0 && $pos <= $pos_rule)||$offset >= 0)) {\n\t\t\t\t$last_pos = $pos;\n\t\t\t} else { break; }\n\t\t\t$first_run = false;\n\t\t} while ($pos !== false);\n\t\tif ($offset>0 && $last_pos<$pos_rule) { $last_pos = false; }\n\t\treturn $last_pos;\n\t}", "function reverse_strrchr($haystack, $needle) {\n\tif (!is_string($haystack)) {\n\t\treturn;\n\t}\n\treturn strrpos($haystack, $needle) ? substr($haystack, 0, strrpos($haystack, $needle) +1) : false;\n}", "public static function beforeLast(string $haystack, string $needle): string\n {\n if ($needle === '') {\n return $haystack;\n }\n $position = strrpos($haystack, $needle);\n return $position !== false ? substr($haystack, 0, $position) : $haystack;\n }", "function startsWith($haystack, $needle) {\n\treturn $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== false;\n}", "function my_strrpos($haystack, $needle)\n{\n\t$index = strpos(strrev($haystack), strrev($needle));\n\tif($index === false)\n\t\treturn false;\n\t$index = strlen($haystack) - strlen($needle) - $index;\n\treturn $index;\n}", "static function startsWith($haystack, $needle)\n {\n // search backwards starting from haystack length characters from the end\n return\n $needle === \"\" ||\n strrpos($haystack, $needle, -strlen($haystack)) !== false;\n }", "function startsWith($haystack, $needle) {\n\treturn $needle === \"\" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;\n}", "abstract public function getNextPart($full_url, $next_part, &$previous_parts);", "public function before($string, $search)\n {\n return $search === '' ? $string : rtrim(explode($search, $string)[0]);\n }" ]
[ "0.4751302", "0.47254112", "0.4582005", "0.45759922", "0.454999", "0.45289034", "0.4516234", "0.446033", "0.4434809", "0.4414749", "0.43981513", "0.43951264", "0.43941814", "0.43657613", "0.43595433", "0.4351182", "0.4310909", "0.43062782", "0.4302684", "0.4301955", "0.42969722", "0.42964542", "0.4283694", "0.42718717", "0.42611766", "0.4260856", "0.42433456", "0.42425057", "0.42354742", "0.42238426" ]
0.598427
0
Alter image src in page that are relative, absolute or full alter base. Relative src will be made either absolute or root relative depending on the value of $base_for_relative. If root relative is used, then attempts will be made to lookup the redirect and detect the final destination.
public static function rewriteImageHrefsOnPage($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) { // Find all the images on the page. $image_srcs = $query_path->top('img[src]'); // Initialize summary report information. $image_count = $image_srcs->size(); $report = []; // Loop through them all looking for src to alter. foreach ($image_srcs as $image) { $href = trim($image->attr('src')); $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url); // Set the new href. $image->attr('src', $new_href); if ($href !== $new_href) { // Something was changed so add it to report. $report[] = "$href changed to $new_href"; } } // Message the report (no log). Message::makeSummary($report, $image_count, 'Rewrote img src'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rel2abs_img( $rel, $base ) {\n\t\textract( parse_url( $base ) );\n\n\t\tif ( strpos( $rel,\"//\" ) === 0 ) {\n\t\t\treturn $scheme . ':' . $rel;\n\t\t}\n\n\t\t// return if already absolute URL\n\t\tif ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) {\n\t\t\treturn $rel;\n\t\t}\n\n\t\t// queries and anchors\n\t\tif ( $rel[0] == '#' || $rel[0] == '?' ) {\n\t\t\treturn $base . $rel;\n\t\t}\n\n\t\t// remove non-directory element from path\n\t\t$path = preg_replace( '#/[^/]*$#', '', $path );\n\n\t\t// destroy path if relative url points to root\n\t\tif ( $rel[0] == '/' ) {\n\t\t\t$path = '';\n\t\t}\n\n\t\t// dirty absolute URL\n\t\t$abs = $path . \"/\" . $rel;\n\n\t\t// replace '//' or '/./' or '/foo/../' with '/'\n\t\t$abs = preg_replace( \"/(\\/\\.?\\/)/\", \"/\", $abs );\n\t\t$abs = preg_replace( \"/\\/(?!\\.\\.)[^\\/]+\\/\\.\\.\\//\", \"/\", $abs );\n\n\t\t// absolute URL is ready!\n\t\treturn $abs;\n\t}", "public function testImageWithFullBase() {\n\t\t$result = $this->Html->image('test.gif', array('fullBase' => true));\n\t\t$here = $this->Html->url('/', true);\n\t\t$this->assertTags($result, array('img' => array('src' => $here . 'img/test.gif', 'alt' => '')));\n\n\t\t$result = $this->Html->image('sub/test.gif', array('fullBase' => true));\n\t\t$here = $this->Html->url('/', true);\n\t\t$this->assertTags($result, array('img' => array('src' => $here . 'img/sub/test.gif', 'alt' => '')));\n\n\t\t$request = $this->Html->request;\n\t\t$request->webroot = '/myproject/';\n\t\t$request->base = '/myproject';\n\t\tRouter::setRequestInfo($request);\n\n\t\t$result = $this->Html->image('sub/test.gif', array('fullBase' => true));\n\t\t$here = $this->Html->url('/', true);\n\t\t$this->assertTags($result, array('img' => array('src' => $here . 'img/sub/test.gif', 'alt' => '')));\n\t}", "public static function absolutize($base, $relative)\n {\n }", "public static function absolutize($base, $relative)\n {\n }", "public static function rewriteScriptSourcePaths($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $attributes = [\n 'src' => 'script[src], embed[src]',\n 'value' => 'param[value]',\n ];\n $script_path_count = 0;\n $report = [];\n self::rewriteFlashSourcePaths($query_path, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n foreach ($attributes as $attribute => $selector) {\n // Find all the selector on the page.\n $links_to_pages = $query_path->top($selector);\n // Initialize summary report information.\n $script_path_count += $links_to_pages->size();\n // Loop through them all looking for src or value path to alter.\n foreach ($links_to_pages as $link) {\n $href = trim($link->attr($attribute));\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $link->attr($attribute, $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n $report[] = \"$attribute: $href changed to $new_href\";\n }\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $script_path_count, 'Rewrote script src');\n }", "private function compensateForProtocolRelativeUrl() {\n if (substr($this->preparedOrigin, 0, strlen(self::PROTOCOL_RELATIVE_START)) == self::PROTOCOL_RELATIVE_START) {\n $this->preparedOrigin = $this->protocolRelativeDummyScheme() . ':' . $this->preparedOrigin;\n $this->hasProtocolRelativeDummyScheme = true;\n $this->isProtocolRelative = true;\n }\n }", "public static function rewritePageHref($href, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n if (!empty($href)) {\n // Fix relatives Using the $base_for_relative and file_path.\n $source_file = $base_for_relative . '/' . $file_path;\n $href = self::convertRelativeToAbsoluteUrl($href, $source_file, $destination_base_url);\n\n // If the href matches a $url_base_alters swap them.\n foreach ($url_base_alters as $old_base => $new_base) {\n if (stripos($href, $old_base) !== FALSE) {\n $href = str_ireplace($old_base, $new_base, $href);\n // The first replacement won, so call it quits on the replacement.\n break;\n }\n }\n }\n\n // For local links, make them root relative.\n $href_host = parse_url($href, PHP_URL_HOST);\n $href_scheme = parse_url($href, PHP_URL_HOST);\n $destination_host = parse_url($destination_base_url, PHP_URL_HOST);\n if (!empty($href_scheme) && !empty($href_host) && ($destination_host == $href_host)) {\n // This is a local url so should have the scheme and host removed.\n $href_parsed = parse_url($href);\n $href = self::reassembleURL($href_parsed, $destination_base_url, FALSE);\n $href = '/' . ltrim($href, '/');\n }\n return $href;\n }", "public function getAbsoluteSrc();", "function cdn_html_alter_image_urls(&$html) {\n $url_prefix_regex = _cdn_generate_url_prefix_regex();\n $pattern = \"#((<img\\s+|<img\\s+[^>]*\\s+)src\\s*=\\s*[\\\"|\\'])($url_prefix_regex)([^\\\"|^\\']*)([\\\"|\\'])#i\";\n _cdn_html_alter_file_url($html, $pattern, 0, 4, 5, 1, '');\n}", "public function setAssetUrlBaseRemap($remap);", "function changeRelativeAbsolute($string)\n{\n $data = preg_replace('#(href|src)=\"([^:\"]*)(\"|(?:(?:%20|\\s|\\+)[^\"]*\"))#', '$1=\"'.$_SESSION['site_sitehttp'].'/$2$3', $string);\n return $data;\n}", "function _makeAbsolutPathOfContent($content, $sourcePath, $parentPath)\n\t{\n\t\t$sourcePath = substr($sourcePath, strlen($_SERVER['DOCUMENT_ROOT']));\n\t\tif (substr($sourcePath, 0, 1) != \"/\") {\n\t\t\t$sourcePath = \"/\" . $sourcePath;\n\t\t}\n\t\t\n\t\t// replace hrefs\n\t\tpreg_match_all(\n\t\t\t\t'/(<[^>]+href=[\"\\']?)([^\"\\' >]+)([^\"\\'>]?[^>]*>)/i', \n\t\t\t\t$content, \n\t\t\t\t$regs, \n\t\t\t\tPREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$orig_href = $regs[2][$i];\n\t\t\t\t$new_href = weSiteImport::_makeAbsolutePath($orig_href, $sourcePath, $parentPath);\n\t\t\t\tif ($new_href != $orig_href) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $new_href . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// replace src (same as href!!)\n\t\tpreg_match_all(\n\t\t\t\t'/(<[^>]+src=[\"\\']?)([^\"\\' >]+)([^\"\\'>]?[^>]*>)/i', \n\t\t\t\t$content, \n\t\t\t\t$regs, \n\t\t\t\tPREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$orig_href = $regs[2][$i];\n\t\t\t\t$new_href = weSiteImport::_makeAbsolutePath($orig_href, $sourcePath, $parentPath);\n\t\t\t\tif ($new_href != $orig_href) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $new_href . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// url() in styles with style=\"\"\n\t\tpreg_match_all('/(<[^>]+style=\")([^\"]+)(\"[^>]*>)/i', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\tpreg_match_all('/(url\\(\\'?)([^\\'\\)]+)(\\'?\\))/i', $style, $regs2, PREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeAbsolutePath($orig_url, $sourcePath, $parentPath);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace($orig_url, $new_url, $newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// url() in styles with style=''\n\t\tpreg_match_all('/(<[^>]+style=\\')([^\\']+)(\\'[^>]*>)/i', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\tpreg_match_all('/(url\\(\"?)([^\"\\)]+)(\"?\\))/i', $style, $regs2, PREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeAbsolutePath($orig_url, $sourcePath, $parentPath);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace($orig_url, $new_url, $newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// url() in <style> tags\n\t\tpreg_match_all('/(<style[^>]*>)(.*)(<\\/style>)/isU', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\t// url() in styles with style=''\n\t\t\t\tpreg_match_all(\n\t\t\t\t\t\t'/(url\\([\\'\"]?)([^\\'\"\\)]+)([\\'\"]?\\))/iU', \n\t\t\t\t\t\t$style, \n\t\t\t\t\t\t$regs2, \n\t\t\t\t\t\tPREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeAbsolutePath($orig_url, $sourcePath, $parentPath);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace(\n\t\t\t\t\t\t\t\t\t$regs2[0][$z], \n\t\t\t\t\t\t\t\t\t$regs2[1][$z] . $new_url . $regs2[3][$z], \n\t\t\t\t\t\t\t\t\t$newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $content;\n\t}", "protected function applyUrl()\n\t{\n\t\t// CSS\n\t\t$nodes = $this->dom->getElementsByTagName('link');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t\t// JS\n\t\t$nodes = $this->dom->getElementsByTagName('script');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Image\n\t\t$nodes = $this->dom->getElementsByTagName('img');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Anchor\n\t\t$nodes = $this->dom->getElementsByTagName('a');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->base_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t}", "public function getRelativeLinkToImg()\n {\n return ImgUpload::getRelativeLinkToImg($this);\n }", "function links_add_base_url($content, $base, $attrs = array('src', 'href'))\n {\n }", "private function script_url($matches){\r\n\t\tif(strpos($matches[1],'.png')!==false || strpos($matches[1],'.jpg')!==false || strpos($matches[1],'.webp')!==false){\r\n\t\t\treturn str_replace($matches[1], whole_url($matches[1], $this->base_url), $matches[0]);\r\n\t\t}\r\n\r\n\t\treturn str_replace($matches[1], proxify_url($matches[1], $this->base_url), $matches[0]);\r\n\t}", "function makeAbsolutePaths($value){\n\t\t$siteUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL');\n\t\t$value = eregi_replace('src=\"fileadmin','src=\"'.$siteUrl.'fileadmin',$value);\n\t\t$value = eregi_replace('src=\"uploads','src=\"'.$siteUrl.'uploads',$value);\n\t\treturn $value;\n\t}", "public static function rewriteFlashSourcePaths($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $scripts = $query_path->top('script[type=\"text/javascript\"]');\n foreach ($scripts as $script) {\n $needles = [\n \"'src','\",\n \"'movie','\",\n ];\n $script_content = $script->text();\n foreach ($needles as $needle) {\n $start_loc = stripos($script_content, $needle);\n if ($start_loc !== FALSE) {\n $length_needle = strlen($needle);\n // Shift to the end of the needle.\n $start_loc = $start_loc + $length_needle;\n $end_loc = stripos($script_content, \"'\", $start_loc);\n $target_length = $end_loc - $start_loc;\n $old_path = substr($script_content, $start_loc, $target_length);\n if (!empty($old_path)) {\n // Process the path.\n $new_path = self::rewritePageHref($old_path, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Replace.\n $script_content = str_replace(\"'$old_path'\", \"'$new_path'\", $script_content);\n if ($old_path !== $new_path) {\n // The path changed, so put it back.\n $script->text($script_content);\n }\n }\n }\n }\n }\n }", "function relative_url($target_url, $i = 10){\n\t$relative_url = \"$target_url\";\n\twhile(!is_file($relative_url) && (--$i)){\n\t\t$relative_url = \"../\". $relative_url;\n\t}\n\tif($i == 0)\n\t\treturn null;\n\telse return $relative_url;\n}", "protected function setInitialRelativePath() {}", "protected function get_absolute_url( $src ) {\n\n\t\tif ( empty( $src ) || ! is_string( $src ) ) {\n\t\t\treturn $src;\n\t\t}\n\n\t\tif ( WPSEO_Utils::is_url_relative( $src ) === true ) {\n\n\t\t\tif ( $src[0] !== '/' ) {\n\t\t\t\treturn $src;\n\t\t\t}\n\n\t\t\t// The URL is relative, we'll have to make it absolute.\n\t\t\treturn $this->home_url . $src;\n\t\t}\n\n\t\tif ( strpos( $src, 'http' ) !== 0 ) {\n\t\t\t// Protocol relative url, we add the scheme as the standard requires a protocol.\n\t\t\treturn $this->scheme . ':' . $src;\n\t\t}\n\n\t\treturn $src;\n\t}", "function url_to_relative($url) {\n\treturn str_replace(__CHV_BASE_URL__, __CHV_RELATIVE_ROOT__, $url);\n}", "function __sfPageContentTask_rel2abs($root,$file,$src){\n if(preg_match_all(\"/<(a|link|img|script|input|iframe)( [^>]*)(src|href)(=['\\\"])([^'\\\"]*)(['\\\"])/\",$src,$ms)){\n foreach($ms[0] as $k =>$from){\n $url = $ms[5][$k];\n if(strlen($url) > 0){\n $url= __sfPageContentTask_rel2abs_replace($file,$url);\n }\n $to = \"<\".$ms[1][$k].$ms[2][$k].$ms[3][$k].$ms[4][$k].$url.$ms[6][$k];\n $src = str_replace($from,$to,$src); \n }\n }\n return $src;\n}", "protected function checkImgResSrcPath($aBaseUrl, $aBasePath, array $aRelativePathList, $aFilename) {\n\t\t//construct the base URL\n\t\t$theImgSrc = $aBaseUrl;\n\t\tforeach ($aRelativePathList as $thePathSegment) {\n\t\t\t$theImgSrc .= $thePathSegment.'/';\n\t\t}\n\t\t\n\t\t//determine the image file wanted\n\t\t$theFilename = null;\n\t\t$theImagePath = $aBasePath;\n\t\tforeach ($aRelativePathList as $thePathSegment) {\n\t\t\t$theImagePath .= $thePathSegment.DIRECTORY_SEPARATOR;\n\t\t}\n\t\tif (strpos($aFilename,'.')===false) {\n\t\t\t//no extension given, match it to one in the path given\n\t\t\t$theImagePattern = $theImagePath.$aFilename.'.*';\n\t\t\tforeach (glob($theImagePattern) as $theMatchFilename) {\n\t\t\t\t//just grab first match and break out\n\t\t\t\t$theFilename = basename($theMatchFilename);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else if (file_exists($aBasePath.$aFilename)) {\n\t\t\t$theFilename = $aFilename;\n\t\t}\n\t\t\n\t\t//if found, return the URL else NULL\n\t\tif (!empty($theFilename))\n\t\t\treturn $theImgSrc . $theFilename;\n\t\telse\n\t\t\treturn null;\n\t}", "static function absPath1($src){\n\t\t$find = array('src=\"http://www.azcentral.com/','src=\"/');\n\t\t$replace = array('src=\"http://nocache.azcentral.com/', 'href=\"http://archive.azcentral.com/');\n\t\treturn str_replace($find,$replace,$src);\n\t}", "function cap_make_path_relative_to ($path, $base)\n{\n $base = rtrim ($base, '/') . '/';\n if (strncmp ($path, $base, strlen ($base)) == 0) {\n return substr ($path, strlen ($base));\n }\n return $path;\n}", "public static function relpath($abs_path, $root = NULL) {\n $abs_path = self::abspath($abs_path);\n// self::logmsg('Source path: \"' . $abs_path . '\"');\n if (!isset($root)) {\n $root = $_SERVER['DOCUMENT_ROOT'];\n }\n// self::logmsg('root: \"' . $root . '\"');\n $source_rel = self::get_rel_dir($root, $abs_path);\n // self::logmsg('Relative path of source (calculated): \"' . $source_rel . '\"');\n if (preg_match('/\\.\\.\\//', $source_rel)) {\n // self::logmsg('<b>Note</b>: path is outside document root. You are allowed to, but its unusual setup. When used to calculate destination folder, the \"../\"s will be removed');\n }\n return $source_rel;\n }", "public static function relativeLinks($template, $s)\n\t{\n\t\treturn preg_replace(\n\t\t\t'#(src|href|action)\\s*=\\s*\"(?![a-z]+:|/|<|\\\\#)#',\n\t\t\t'$1=\"' . $template->baseUri,\n\t\t\t$s\n\t\t);\n\t}", "static function absPath2($src){\n\t\t$find = array('src=\"/','href=\"/');\n\t\t$replace = array('src=\"http://nocache.azcentral.com/','href=\"http://archive.azcentral.com/');\n\t\treturn str_replace($find,$replace,$src);\n\t}", "public function setImageSourcePath($strSource = NULL) {\r\n\t\t\t$this->objParent->source_path = __SITE_ROOT__ . str_replace(__SITE_ROOT__, \"\", $strSource);\t \r\n\t\t }" ]
[ "0.6247562", "0.5896077", "0.5676137", "0.56755805", "0.5582467", "0.55705976", "0.5492116", "0.5443533", "0.54352367", "0.54220104", "0.54168", "0.54079306", "0.5395455", "0.538044", "0.5378078", "0.53430015", "0.52700704", "0.52633476", "0.52630997", "0.5260034", "0.5253469", "0.52177197", "0.52003556", "0.5111971", "0.5093944", "0.50742066", "0.50714827", "0.5069386", "0.5060248", "0.502593" ]
0.65089446
0
Lookup a migrate destination ID by path. WARNING This only works if the key in the migration is the uri of the file.
public static function lookupMigrateDestinationIdByKeyPath(string $source_key_uri, array $migrations, string $trim_path = '') { $found_id = ''; if (!empty($source_key_uri)) { // Go search. self::trimPath($source_key_uri, $trim_path); foreach ($migrations as $migration) { $map_table = "migrate_map_{$migration}"; $database = \Drupal::database(); $result = $database->select($map_table, 'm') ->condition('m.sourceid1', "%" . $database->escapeLike($source_key_uri), 'LIKE') ->fields('m', ['destid1']) ->execute() ->fetchAll(); // Should only have one result. if (count($result) === 1) { // We got 1, call off the search. $mapkey = reset($result); $found_id = $mapkey->destid1; break; } } } return $found_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lookupSourceID(array $destination_id) {\n migrate_instrument_start('lookupSourceID');\n $query = $this->connection->select($this->mapTable, 'map')\n ->fields('map', $this->sourceKeyMap);\n foreach ($this->destinationKeyMap as $key_name) {\n $query = $query->condition(\"map.$key_name\", array_shift($destination_id), '=');\n }\n $result = $query->execute();\n $source_id = $result->fetchAssoc();\n migrate_instrument_stop('lookupSourceID');\n return $source_id;\n }", "public function lookupDestinationID(array $source_id) {\n migrate_instrument_start('lookupDestinationID');\n $query = $this->connection->select($this->mapTable, 'map')\n ->fields('map', $this->destinationKeyMap);\n foreach ($this->sourceKeyMap as $key_name) {\n $query = $query->condition(\"map.$key_name\", array_shift($source_id), '=');\n }\n $result = $query->execute();\n $destination_id = $result->fetchAssoc();\n migrate_instrument_stop('lookupDestinationID');\n return $destination_id;\n }", "protected function destinationIdExists($value, $migration_name) {\n /** @var \\Drupal\\migrate\\Plugin\\MigrationInterface $migration */\n $migration = $this->migrationPluginManager->createInstance($migration_name);\n\n // If destination ID is found, return TRUE.\n if ($destination_ids = $migration->getIdMap()->lookupDestinationID([$value])) {\n return TRUE;\n }\n\n return FALSE;\n }", "private function getMigrationSource($migration_id) {\n $sources = $this->state->get('jcc_migrate_sources');\n return !empty($sources[$migration_id]) ? $sources[$migration_id]['uri'] : FALSE;\n }", "abstract protected function getRoute($destination);", "public function pathId($path);", "public static function get_destination( $key ) {\r\n\r\n\t\t\t$key = strtoupper( $key );\r\n\r\n\t\t\tif ( isset( self::$destinations[ $key ] ) && is_object( self::$destinations[ $key ] ) )\r\n\t\t\t\treturn self::$destinations[ $key ];\r\n\r\n\t\t\t$reg_dests = self::get_registered_destinations();\r\n\t\t\tif ( ! empty( $reg_dests[ $key ][ 'class' ] ) ) {\r\n\t\t\t\tself::$destinations[ $key ] = new $reg_dests[ $key ][ 'class' ];\r\n\t\t\t} else {\r\n\t\t\t\treturn NULL;\r\n\t\t\t}\r\n\r\n\t\t\treturn self::$destinations[ $key ];\r\n\t\t}", "public function getDestinationId()\n {\n return $this->destination_id;\n }", "public function reverseLookup($dest) {}", "public function reverseLookup($dest) {}", "public function reverseLookup($dest);", "public function getDestinationId() : string\n {\n return $this->getProperty()->destinationId;\n }", "public function migrations_path();", "public static function getDestinationNid($source_nid) {\n // Each node type migration must be queried individually,\n // since they have no relational shared field for joining.\n $tables_to_query = [\n 'migrate_map_utexas_landing_page',\n 'migrate_map_utexas_standard_page',\n 'migrate_map_utexas_basic_page',\n 'migrate_map_utexas_article',\n 'migrate_map_utevent_nodes',\n 'migrate_map_utprof_nodes',\n 'migrate_map_utnews_nodes',\n 'migrate_map_moody_standard_page',\n 'migrate_map_moody_landing_page',\n 'migrate_map_moody_subsite_page',\n 'migrate_map_moody_media_page',\n ];\n $connection = \\Drupal::database();\n foreach ($tables_to_query as $table) {\n if ($connection->schema()->tableExists($table)) {\n $destination_nid = \\Drupal::database()->select($table, 'n')\n ->fields('n', ['destid1'])\n ->condition('n.sourceid1', $source_nid)\n ->execute()\n ->fetchField();\n if ($destination_nid) {\n return $destination_nid;\n }\n }\n }\n return FALSE;\n }", "static function get_attachment_id_from_src ($url) {\n\t\t$parse_url = explode( parse_url( WP_CONTENT_URL, PHP_URL_PATH ), $url );\n\n\t\t// Get the host of the current site and the host of the $url, ignoring www.\n\t\t$this_host = str_ireplace( 'www.', '', parse_url( home_url(), PHP_URL_HOST ) );\n\t\t$file_host = str_ireplace( 'www.', '', parse_url( $url, PHP_URL_HOST ) );\n\n\t\t// Return nothing if there aren't any $url parts or if the current host and $url host do not match.\n\t\tif ( ! isset( $parse_url[1] ) || empty( $parse_url[1] ) || ( $this_host != $file_host ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Now we're going to quickly search the DB for any attachment GUID with a partial path match.\n\t\t// Example: /uploads/2013/05/test-image.jpg\n\t\tglobal $wpdb;\n\n\t\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM {$wpdb->prefix}posts WHERE guid RLIKE %s;\", $parse_url[1] ) );\n\n\t\t// Returns null if no attachment is found.\n\t\treturn $attachment[0];\n\t}", "public function getMigrationPaths();", "public function getRowByDestination(array $destination_id) {\n migrate_instrument_start('getRowByDestination');\n $query = $this->connection->select($this->mapTable, 'map')\n ->fields('map');\n foreach ($this->destinationKeyMap as $key_name) {\n $query = $query->condition(\"map.$key_name\", array_shift($destination_id), '=');\n }\n $result = $query->execute();\n migrate_instrument_stop('getRowByDestination');\n return $result->fetchAssoc();\n }", "protected function resolve(string $path): ClickhouseMigrationContract\n {\n $class = Str::studly(implode('_', array_slice(explode('_', $path), 4)));\n\n return app($class);\n }", "public function getshowdestination($id) {\n return $this->packageDao->getshowdestination($id);\n }", "public function getMigrationPath($migration)\n {\n foreach ($this->migrationPathMap as $path => $migrations) {\n if (in_array($migration, $migrations)) {\n return $path;\n }\n }\n\n\t\tthrow new yii\\console\\Exception(\"Could not find path for: \" . $migration);\n }", "protected function _getMigrationIdFromFilename($filename) {\n \n $parts = explode('_', $filename);\n return $parts[0];\n }", "public static function getByID($id) {\n\n $db = dbConnect::getInstance();\n //query\n $q = \"SELECT * FROM destination WHERE dest_id =\" . $id;\n\n if (!$result = $db->query($q)) return null;\n \n $arr = mysqli_fetch_array($result);\n $dest = new Destination();\n $dest->setDestId($arr[\"dest_id\"]);\n $dest->setType($arr[\"type\"]);\n $dest->setName($arr[\"name\"]);\n $dest->setAddress($arr[\"address\"]);\n $dest->setAvgRating($arr[\"avg_rating\"]);\n $dest->setNumImages($arr[\"num_images\"]);\n $dest->setNumVideos($arr[\"num_videos\"]);\n $dest->setDescription($arr[\"description\"]);\n $dest->setImageUrl($arr[\"image_url\"]);\n $dest->setNumReviews($arr[\"num_reviews\"]);\n $dest->setCity($arr[\"city\"]);\n $dest->setState($arr[\"state\"]);\n $dest->setZipCode($arr[\"zip_code\"]);\n $dest->setWebsite($arr[\"website\"]);\n $dest->setPhoneNumber($arr[\"phone_number\"]);\n \n return $dest;\n }", "function thegrapes_get_attachment_id_by_url( $url ) {\n\n // Split the $url into two parts with the wp-content directory as the separator\n $parsed_url = explode( parse_url( WP_CONTENT_URL, PHP_URL_PATH ), $url );\n\n // Get the host of the current site and the host of the $url, ignoring www\n $this_host = str_ireplace( 'www.', '', parse_url( home_url(), PHP_URL_HOST ) );\n $file_host = str_ireplace( 'www.', '', parse_url( $url, PHP_URL_HOST ) );\n\n // Return nothing if there aren't any $url parts or if the current host and $url host do not match\n if ( ! isset( $parsed_url[1] ) || empty( $parsed_url[1] ) || ( $this_host != $file_host ) ) {\n return;\n }\n\n // Now we're going to quickly search the DB for any attachment GUID with a partial path match\n\n // Example: /uploads/2013/05/test-image.jpg\n global $wpdb;\n $attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM {$wpdb->prefix}posts WHERE guid RLIKE %s;\", $parsed_url[1] ) );\n\n // Returns null if no attachment is found\n return $attachment[0];\n}", "function getdirections_location_id_path($direction, $lid) {\n if (module_exists('location') && is_numeric($lid) && ($direction == 'to' || $direction == 'from')) {\n return \"getdirections/location_id/$direction/$lid\";\n }\n}", "function ts_get_attachment_id_from_src ($image_src) {\r\n\r\n\tglobal $wpdb;\r\n\t$query = $wpdb -> prepare(\"SELECT ID FROM {$wpdb->posts} WHERE guid= %s \",$image_src);\r\n\t$id = $wpdb->get_var($query);\r\n\treturn $id;\r\n}", "function get_attachment_id_from_src ($image_src) {\n\n\tglobal $wpdb;\n\t$query = \"SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'\";\n\t$id = $wpdb->get_var($query);\n\treturn $id;\n\n}", "function shoestrap_get_attachment_id_from_src( $image_src ) {\n global $wpdb;\n $query = \"SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'\";\n $id = $wpdb->get_var( $query );\n return $id;\n}", "public static function getDestinationFromSource($source) {\n // @todo: Add coverage for taxonomy ID mapping.\n if (strpos($source, 'node/') === 0) {\n $source_nid = substr($source, 5);\n $destination_nid = self::getDestinationNid($source_nid);\n if ($destination_nid) {\n return '/node/' . $destination_nid;\n }\n }\n elseif (strpos($source, 'file/') === 0) {\n $source_fid = substr($source, 5);\n $destination_fid = self::getDestinationMid($source_fid);\n if ($destination_fid) {\n return '/media/' . $destination_fid;\n }\n }\n elseif (strpos($source, 'user/') === 0) {\n $source_uid = substr($source, 5);\n $destination_uid = self::getDestinationUid($source_uid);\n if ($destination_uid) {\n return '/user/' . $destination_uid;\n }\n }\n return $source;\n }", "function get_attachment_id_from_src ($image_src) {\n global $wpdb;\n $query = \"SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'\";\n $id = $wpdb->get_var($query);\n return $id;\n}", "static public function get_key_from_path( $path ) {\n\t\t$sets = self::get_sets();\n\n\t\tforeach ( $sets as $key => $set ) {\n\t\t\tif ( $path == $set['path'] ) {\n\t\t\t\treturn $key;\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.58805597", "0.57700586", "0.5463282", "0.54414564", "0.5306253", "0.5270895", "0.5181246", "0.5121488", "0.50140274", "0.50140274", "0.49761644", "0.4968183", "0.4948763", "0.49432296", "0.49258888", "0.49146345", "0.49102888", "0.49101633", "0.4893724", "0.48656893", "0.48132652", "0.47972986", "0.4772082", "0.47450796", "0.47400913", "0.4726291", "0.46732503", "0.46545857", "0.4653909", "0.46506202" ]
0.7349503
0
Alter relative Flash source paths in page scripts. Relative src will be made either absolute or root relative depending on the value of $base_for_relative. If root relative is used, then attempts will be made to lookup the redirect and detect the final destination.
public static function rewriteFlashSourcePaths($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) { $scripts = $query_path->top('script[type="text/javascript"]'); foreach ($scripts as $script) { $needles = [ "'src','", "'movie','", ]; $script_content = $script->text(); foreach ($needles as $needle) { $start_loc = stripos($script_content, $needle); if ($start_loc !== FALSE) { $length_needle = strlen($needle); // Shift to the end of the needle. $start_loc = $start_loc + $length_needle; $end_loc = stripos($script_content, "'", $start_loc); $target_length = $end_loc - $start_loc; $old_path = substr($script_content, $start_loc, $target_length); if (!empty($old_path)) { // Process the path. $new_path = self::rewritePageHref($old_path, $url_base_alters, $file_path, $base_for_relative, $destination_base_url); // Replace. $script_content = str_replace("'$old_path'", "'$new_path'", $script_content); if ($old_path !== $new_path) { // The path changed, so put it back. $script->text($script_content); } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function setScriptRelativePath() {\n\t\tself::$_ScriptRelativePath = str_replace(\n\t\t\tself::getConfig()->getBasePath().self::getDirSeparator(), '', self::getScriptPath()\n\t\t);\n\t}", "public static function rewriteScriptSourcePaths($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $attributes = [\n 'src' => 'script[src], embed[src]',\n 'value' => 'param[value]',\n ];\n $script_path_count = 0;\n $report = [];\n self::rewriteFlashSourcePaths($query_path, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n foreach ($attributes as $attribute => $selector) {\n // Find all the selector on the page.\n $links_to_pages = $query_path->top($selector);\n // Initialize summary report information.\n $script_path_count += $links_to_pages->size();\n // Loop through them all looking for src or value path to alter.\n foreach ($links_to_pages as $link) {\n $href = trim($link->attr($attribute));\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $link->attr($attribute, $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n $report[] = \"$attribute: $href changed to $new_href\";\n }\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $script_path_count, 'Rewrote script src');\n }", "function resolve_relative_paths() {\r\n\t\r\n\t\t/*<link rel=\"shortcut icon\" href=\"../build/theme-gcwu-fegc/images/favicon.ico\" />\r\n\t\t<script src=\"../build/js/jquery.min.js\"></script>\r\n\t\t<link rel=\"stylesheet\" href=\"../build/grids/css/util-ie-min.css\" />\r\n\t\t<noscript><link rel=\"stylesheet\" href=\"../build/theme-gcwu-fegc/css/theme-ns-min.css\" /></noscript>\r\n\t\t<?php include('..' . DS . 'includes' . DS . 'header-eng.txt'); ?>\r\n\t\t<script src=\"../build/theme-gcwu-fegc/js/theme-min.js\"></script>*/\r\n\t\t\r\n\t\t$this->code = ReTidy::reverse_order_substr_preg_replace('<link([^<>]*?) href=\"([^\"]*?)\"([^<>]*?)>', 2, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');\r\n\t\t$this->code = ReTidy::reverse_order_substr_preg_replace('<script([^<>]*?) src=\"([^\"]*?)\"([^<>]*?)>', 2, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');\r\n\t\t//print('this one -&gt;<br>');\r\n\t\t/*$this->code = ReTidy::reverse_order_substr_preg_replace('<?php include\\(\\'([^\\']*?)\\'\\); ?>', 1, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');*/\r\n\t\t$this->code = ReTidy::reverse_order_substr_preg_replace('<\\?php include\\(\\'([^\\']*?)\\'\\); \\?>', 1, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');\r\n\t\t$this->code = ReTidy::reverse_order_substr_preg_replace('<\\!\\-\\-\\#include file=\"([^\"]*?)\" \\-\\->', 1, $this->code, '$changed_part = ReTidy::adjust_relative_path($part_to_change, $this->file);');\r\n\t\t\r\n\t\t/*<?php include('..' . DS . 'includes' . DS . 'header-eng.txt'); ?>*/\r\n\t\t/*\r\n\t\tpreg_match_all('/<\\?php include\\(\\'([^\\']*?)\\'\\); \\?>/is', $this->code, $matches, PREG_OFFSET_CAPTURE);\r\n\t\t//print($this->code);\r\n\t\t//var_dump($matches);\r\n\t\t//exit(0);\r\n\t\t$counter = sizeof($matches[0]) - 1;\r\n\t\twhile($counter > -1) {\r\n\t\t\t$full_match = $matches[0][$counter][0];\r\n\t\t\t$part_to_change = $matches[1][$counter][0];\r\n\t\t\t$offset = $matches[0][$counter][1];\r\n\t\t\tvar_dump($replacement_to_eval, eval($replacement_to_eval), $part_to_change, $this->file);\r\n\t\t\teval($replacement_to_eval);\r\n\t\t\t$replacement = str_replace($part_to_change, $changed_part, $full_match); // perhaps not perfect\r\n\t\t\tvar_dump($part_to_change, $replacement);\r\n\t\t\t$this->code = substr($this->code, 0, $offset) . $replacement . substr($this->code, $offset + strlen($full_match));\r\n\t\t\t$counter--;\r\n\t\t}*/\r\n\t\t//print('&lt;<br>');\r\n\t}", "function url_for($script_path) {\n //add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "function url_for($script_path) {\n\t\t// add the leading '/' if not present\n\t\tif($script_path[0] != '/') {\n\t\t\t$script_path = '/'. $script_path;\n\t\t}\n\t\treturn WWW_ROOT . $script_path;\n\t}", "private static function _initViewScriptsFullPathBase () {\n\t\t$app = & \\MvcCore\\Application::GetInstance();\n\t\tself::$_viewScriptsFullPathBase = implode('/', [\n\t\t\t$app->GetRequest()->GetAppRoot(),\n\t\t\t$app->GetAppDir(),\n\t\t\t$app->GetViewsDir()\n\t\t]);\n\t}", "protected function setInitialRelativePath() {}", "function url_for($script_path) {\r\n // add the leading '/' if not present\r\n if($script_path[0] != '/') {\r\n $script_path = \"/\" . $script_path;\r\n }\r\n return WWW_ROOT . $script_path;\r\n}", "function urlForPath($script_path)\n{\n // Add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "function url_for($script_path)\n{\n // Add a leading \"/\" if not present\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "public static function urlFor($script_path) {\r\n # add the leading '/' if not present\r\n if ($script_path[0] != '/') {\r\n $script_path = \"/\" . $script_path;\r\n }\r\n return WWW_ROOT . $script_path;\r\n }", "function url_to_relative($url) {\n\treturn str_replace(__CHV_BASE_URL__, __CHV_RELATIVE_ROOT__, $url);\n}", "function url_for($script_path) {\n\t// adds the leading '/' if it isn't already passed through the argument\n\tif($script_path[0] != '/') {\n\t\t$script_path = \"/\" . $script_path;\n\t}\n\treturn WWW_ROOT . $script_path;\n}", "public static function absolutize($base, $relative)\n {\n }", "public static function absolutize($base, $relative)\n {\n }", "public static function setFullUrl(): void\n\t{\n\t\t$requestUri = urldecode(Server::get('REQUEST_URI'));\n\t\tstatic::$fullUrl = rtrim(preg_replace('#^' . static::$scriptDirectory . '#', '', $requestUri), '/');\n\t}", "public function url( $relative_path = '/' ) {\n\t\treturn plugin_dir_url( $this->main_file ) . ltrim( $relative_path, '/' );\n\t}", "public static function url(String $relativeUrl = \"\"): String\n {\n // base url is originally called script's directory\n $baseUrl = dirname($_SERVER[\"SCRIPT_NAME\"]);\n\n // In local testing, we maycall a script in project root (')not /public) to simulate production .htaccess behavior\n if (self::endsWith($baseUrl, \"/public\")) {\n $baseUrl = dirname($baseUrl);\n }\n\n return $baseUrl . \"/\" . $relativeUrl;\n }", "function url_for($script_path){\r\n // return the absolute path\r\n if($script_path[0] != '/'){\r\n $script_path = \"/\" . $script_path;\r\n }\r\n return WWW_ROOT . $script_path;\r\n}", "function url_for($script_path) {\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "function url_for($script_path){\n\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n \n return WWW_ROOT . $script_path;\n \n}", "private function compensateForProtocolRelativeUrl() {\n if (substr($this->preparedOrigin, 0, strlen(self::PROTOCOL_RELATIVE_START)) == self::PROTOCOL_RELATIVE_START) {\n $this->preparedOrigin = $this->protocolRelativeDummyScheme() . ':' . $this->preparedOrigin;\n $this->hasProtocolRelativeDummyScheme = true;\n $this->isProtocolRelative = true;\n }\n }", "function changeRelativeAbsolute($string)\n{\n $data = preg_replace('#(href|src)=\"([^:\"]*)(\"|(?:(?:%20|\\s|\\+)[^\"]*\"))#', '$1=\"'.$_SESSION['site_sitehttp'].'/$2$3', $string);\n return $data;\n}", "private static function base_relative($path = null)\n\t{\n\t\t$test\t= self::getProtocol().$_SERVER['HTTP_HOST'].\"/\".apps::getGlobal(\"router\")->getBasePath();\n\t\treturn concat_path($test,$path);\n\t}", "public static function rewritePageHref($href, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n if (!empty($href)) {\n // Fix relatives Using the $base_for_relative and file_path.\n $source_file = $base_for_relative . '/' . $file_path;\n $href = self::convertRelativeToAbsoluteUrl($href, $source_file, $destination_base_url);\n\n // If the href matches a $url_base_alters swap them.\n foreach ($url_base_alters as $old_base => $new_base) {\n if (stripos($href, $old_base) !== FALSE) {\n $href = str_ireplace($old_base, $new_base, $href);\n // The first replacement won, so call it quits on the replacement.\n break;\n }\n }\n }\n\n // For local links, make them root relative.\n $href_host = parse_url($href, PHP_URL_HOST);\n $href_scheme = parse_url($href, PHP_URL_HOST);\n $destination_host = parse_url($destination_base_url, PHP_URL_HOST);\n if (!empty($href_scheme) && !empty($href_host) && ($destination_host == $href_host)) {\n // This is a local url so should have the scheme and host removed.\n $href_parsed = parse_url($href);\n $href = self::reassembleURL($href_parsed, $destination_base_url, FALSE);\n $href = '/' . ltrim($href, '/');\n }\n return $href;\n }", "public static function relpath($abs_path, $root = NULL) {\n $abs_path = self::abspath($abs_path);\n// self::logmsg('Source path: \"' . $abs_path . '\"');\n if (!isset($root)) {\n $root = $_SERVER['DOCUMENT_ROOT'];\n }\n// self::logmsg('root: \"' . $root . '\"');\n $source_rel = self::get_rel_dir($root, $abs_path);\n // self::logmsg('Relative path of source (calculated): \"' . $source_rel . '\"');\n if (preg_match('/\\.\\.\\//', $source_rel)) {\n // self::logmsg('<b>Note</b>: path is outside document root. You are allowed to, but its unusual setup. When used to calculate destination folder, the \"../\"s will be removed');\n }\n return $source_rel;\n }", "function cap_make_path_relative_to ($path, $base)\n{\n $base = rtrim ($base, '/') . '/';\n if (strncmp ($path, $base, strlen ($base)) == 0) {\n return substr ($path, strlen ($base));\n }\n return $path;\n}", "function assets_path( $relative, $file )\n {\n // Preparation\n $route = preg_replace( '/\\\\\\\\/', '/', $file );\n $path = rtrim( preg_replace( '/\\\\\\\\/', '/', get_wp_home_path() ), '/' );\n // Clean base path\n $route = preg_replace( '/.+?(?=wp-content)/', '', $route );\n // Clean project relative path\n $route = preg_replace( '/\\/app[\\/\\\\\\\\A-Za-z0-9\\.\\-]+/', '', $route );\n $route = preg_replace( '/\\/assets[\\/\\\\\\\\A-Za-z0-9\\.\\-]+/', '', $route );\n $route = preg_replace( '/\\/vendor[\\/\\\\\\\\A-Za-z0-9\\.\\-]+/', '', $route );\n return $path.'/'.apply_filters( 'app_route_path', $route ).'/assets/'.$relative;\n }", "function relative_to_url($filepath) {\n\treturn str_replace(__CHV_RELATIVE_ROOT__, __CHV_BASE_URL__, str_replace('\\\\', '/', $filepath));\n}", "function relative_path() {\n $rel = str_replace($_SERVER['DOCUMENT_ROOT'], null, str_replace(basename(dirname(__FILE__)), null, dirname(__FILE__)));\n return (preg_match('/^\\//', $rel)) ? substr($rel, 1, strlen($rel)) : $rel;\n}" ]
[ "0.6857575", "0.66331124", "0.61877054", "0.5860245", "0.5769984", "0.5703576", "0.56900877", "0.5679868", "0.56658036", "0.56458074", "0.5577309", "0.5548063", "0.55240655", "0.5494764", "0.54942423", "0.54836184", "0.5467772", "0.5460348", "0.54551667", "0.5441534", "0.5439393", "0.5414035", "0.5402377", "0.539219", "0.53733647", "0.53571993", "0.5339218", "0.53351474", "0.53134656", "0.5288732" ]
0.6858442
0
Alter hrefs in page if they point to htmlpage files. Relative src will be made either absolute or root relative depending on the value of $base_for_relative. If root relative is used, then attempts will be made to lookup the redirect and detect the final destination.
public static function rewriteAnchorHrefsToPages($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) { $attributes = [ 'href' => 'a[href], area[href]', 'longdesc' => 'img[longdesc]', ]; $pagelink_count = 0; $report = []; foreach ($attributes as $attribute => $selector) { // Find all the hrefs on the page. $links_to_pages = $query_path->top($selector); // Initialize summary report information. $pagelink_count += $links_to_pages->size(); // Loop through them all looking for href to alter. foreach ($links_to_pages as $link) { $href = trim($link->attr('href')); if (CheckFor::isPage($href)) { $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url); // Set the new href. $link->attr($attribute, $new_href); if ($href !== $new_href) { // Something was changed so add it to report. Message::make("$attribute: $href changed to $new_href", [], FALSE); $report[] = "$attribute: $href changed to $new_href"; } } } } // Message the report (no log). Message::makeSummary($report, $pagelink_count, 'Rewrote page hrefs'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function rewritePageHref($href, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n if (!empty($href)) {\n // Fix relatives Using the $base_for_relative and file_path.\n $source_file = $base_for_relative . '/' . $file_path;\n $href = self::convertRelativeToAbsoluteUrl($href, $source_file, $destination_base_url);\n\n // If the href matches a $url_base_alters swap them.\n foreach ($url_base_alters as $old_base => $new_base) {\n if (stripos($href, $old_base) !== FALSE) {\n $href = str_ireplace($old_base, $new_base, $href);\n // The first replacement won, so call it quits on the replacement.\n break;\n }\n }\n }\n\n // For local links, make them root relative.\n $href_host = parse_url($href, PHP_URL_HOST);\n $href_scheme = parse_url($href, PHP_URL_HOST);\n $destination_host = parse_url($destination_base_url, PHP_URL_HOST);\n if (!empty($href_scheme) && !empty($href_host) && ($destination_host == $href_host)) {\n // This is a local url so should have the scheme and host removed.\n $href_parsed = parse_url($href);\n $href = self::reassembleURL($href_parsed, $destination_base_url, FALSE);\n $href = '/' . ltrim($href, '/');\n }\n return $href;\n }", "protected function fix_supporting_file_references() {\r\n\t\tpreg_match_all('/<link([^<>]*?) href=\"([^\"]*?)\"([^<>]*?)\\/>/is', $this->code, $link_matches);\r\n\t\t/*$counter = sizeof($link_matches[0]) - 1;\r\n\t\twhile($counter > -1) {\r\n\t\t\t\r\n\t\t\t$counter--;\r\n\t\t}*/\r\n\t\t$array_replaces = array();\r\n\t\tforeach($link_matches[0] as $index => $value) {\r\n\t\t\t$href_content = $link_matches[2][$index];\r\n\t\t\tif($href_content[0] === '/' || strpos($href_content, 'http://') !== false) { // avoid root references and URLs\r\n\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$initial_href_content = $href_content;\r\n\t\t\t\t\t// first try looking closer\r\n\t\t\t\t\t$proper_reference = false;\r\n\t\t\t\t\twhile(!$proper_reference && substr($href_content, 0, 3) === '../') {\r\n\t\t\t\t\t\t$href_content = substr($href_content, 3);\r\n\t\t\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\t\t$proper_reference = true;\r\n\t\t\t\t\t\t\t$array_replaces['href=\"' . $initial_href_content . '\"'] = 'href=\"' . $href_content . '\"';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!$proper_reference) { // try looking farther\r\n\t\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\t\twhile(!$proper_reference && $counter < 10) {\r\n\t\t\t\t\t\t\t$href_content = '../' . $href_content;\r\n\t\t\t\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\t\t\t$proper_reference = true;\r\n\t\t\t\t\t\t\t\t$array_replaces['href=\"' . $initial_href_content . '\"'] = 'href=\"' . $href_content . '\"';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$counter++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!$proper_reference) { // give up or finish\r\n\t\t\t\t\t\tvar_dump($this->file, $href_content, $relative_path);exit(0);\r\n\t\t\t\t\t\tprint('<span style=\"color: red;\">Could not fix broken reference in &lt;link&gt;: ' . $value . '</span>');exit(0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->logMsg('Reference ' . htmlentities($value) . ' was fixed.');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($array_replaces as $index => $value) {\r\n\t\t\t$this->code = str_replace($index, $value, $this->code);\r\n\t\t}\r\n\t}", "public static function rewriteImageHrefsOnPage($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n // Find all the images on the page.\n $image_srcs = $query_path->top('img[src]');\n // Initialize summary report information.\n $image_count = $image_srcs->size();\n $report = [];\n // Loop through them all looking for src to alter.\n foreach ($image_srcs as $image) {\n $href = trim($image->attr('src'));\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $image->attr('src', $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n $report[] = \"$href changed to $new_href\";\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $image_count, 'Rewrote img src');\n }", "public static function rewriteAnchorHrefsToBinaryFiles($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $attributes = [\n 'href' => 'a[href], area[href]',\n 'longdesc' => 'img[longdesc]',\n ];\n $filelink_count = 0;\n $report = [];\n foreach ($attributes as $attribute => $selector) {\n // Find all the $selector on the page.\n $binary_file_links = $query_path->top($selector);\n $filelink_count += $binary_file_links->size();\n // Loop through them all looking for href to alter.\n foreach ($binary_file_links as $link) {\n $href = trim($link->attr($attribute));\n if (CheckFor::isFile($href)) {\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $link->attr($attribute, $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n $report[] = \"$attribute: $href changed to $new_href\";\n }\n }\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $filelink_count, 'Rewrote binary file hrefs');\n }", "static function absoluteURLs($html) {\n\t\t$html = str_replace('$CurrentPageURL', $_SERVER['REQUEST_URI'], $html);\n\t\treturn HTTP::urlRewriter($html, '(substr($URL,0,1) == \"/\") ? ( Director::protocolAndHost() . $URL ) : ( (ereg(\"^[A-Za-z]+:\", $URL)) ? $URL : Director::absoluteBaseURL() . $URL )' );\n\t}", "function substHREFsInHTML() {\n\t\tif (!is_array($this->theParts['html']['hrefs'])) return;\n\t\tforeach ($this->theParts['html']['hrefs'] as $urlId => $val) {\n\t\t\t\t// Form elements cannot use jumpurl!\n\t\t\tif ($this->jumperURL_prefix && ($val['tag'] != 'form') && ( !strstr( $val['ref'], 'mailto:' ))) {\n\t\t\t\tif ($this->jumperURL_useId) {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix . $urlId;\n\t\t\t\t} else {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix.t3lib_div::rawUrlEncodeFP($val['absRef']);\n\t\t\t\t}\n\t\t\t} elseif ( strstr( $val['ref'], 'mailto:' ) && $this->jumperURL_useMailto) {\n\t\t\t\tif ($this->jumperURL_useId) {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix . $urlId;\n\t\t\t\t} else {\n\t\t\t\t\t$substVal = $this->jumperURL_prefix.t3lib_div::rawUrlEncodeFP($val['absRef']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$substVal = $val['absRef'];\n\t\t\t}\n\t\t\t$this->theParts['html']['content'] = str_replace(\n\t\t\t\t$val['subst_str'],\n\t\t\t\t$val['quotes'] . $substVal . $val['quotes'],\n\t\t\t\t$this->theParts['html']['content']);\n\t\t}\n\t}", "public static function rewriteScriptSourcePaths($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $attributes = [\n 'src' => 'script[src], embed[src]',\n 'value' => 'param[value]',\n ];\n $script_path_count = 0;\n $report = [];\n self::rewriteFlashSourcePaths($query_path, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n foreach ($attributes as $attribute => $selector) {\n // Find all the selector on the page.\n $links_to_pages = $query_path->top($selector);\n // Initialize summary report information.\n $script_path_count += $links_to_pages->size();\n // Loop through them all looking for src or value path to alter.\n foreach ($links_to_pages as $link) {\n $href = trim($link->attr($attribute));\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $link->attr($attribute, $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n $report[] = \"$attribute: $href changed to $new_href\";\n }\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $script_path_count, 'Rewrote script src');\n }", "protected function applyUrl()\n\t{\n\t\t// CSS\n\t\t$nodes = $this->dom->getElementsByTagName('link');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t\t// JS\n\t\t$nodes = $this->dom->getElementsByTagName('script');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Image\n\t\t$nodes = $this->dom->getElementsByTagName('img');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Anchor\n\t\t$nodes = $this->dom->getElementsByTagName('a');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->base_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t}", "public static function relativeLinks($template, $s)\n\t{\n\t\treturn preg_replace(\n\t\t\t'#(src|href|action)\\s*=\\s*\"(?![a-z]+:|/|<|\\\\#)#',\n\t\t\t'$1=\"' . $template->baseUri,\n\t\t\t$s\n\t\t);\n\t}", "function _html_filter($file_contents,$fix_html,$base_url,$files,$file_base)\n\t{\n\t\t// If selected, clean up all the HTML\n\t\tif ($fix_html==1)\n\t\t{\n\t\t\trequire_code('xhtml');\n\t\t\t$file_contents=xhtmlise_html($file_contents);\n\t\t}\n\n\t\t// Strip base URL\n\t\tif ($base_url!='')\n\t\t{\n\t\t\t$file_contents=str_replace($base_url.'/','',$file_contents);\n\t\t\t$file_contents=str_replace(escape_html($base_url.'/'),'',$file_contents);\n\t\t}\n\n\t\t// Extra sense for rewriting local URLs in templates to image links and page-links\n\t\t$matches=array();\n\t\t$num_matches=preg_match_all('# (src|href)=\"([^\"]*)\"#',$file_contents,$matches);\n\t\tfor ($i=0;$i<$num_matches;$i++)\n\t\t{\n\t\t\t$this_url=$matches[2][$i];\n\t\t\t$this_url=preg_replace('#^\\.*/#','',$this_url);\n\t\t\tif (trim($this_url)=='') continue;\n\t\t\tif ((strpos($this_url,'://')===false) || (substr($this_url,0,strlen($base_url))==$base_url))\n\t\t\t{\n\t\t\t\tif (strpos($this_url,'://')!==false)\n\t\t\t\t\t$this_url=substr($this_url,strlen($base_url));\n\n\t\t\t\t$decoded_url=rawurldecode($this_url);\n\n\t\t\t\tif (substr($decoded_url,0,2)=='./') $decoded_url=substr($decoded_url,2);\n\n\t\t\t\t// Links to directories in a deep path will be changed so underscores replace slashes\n\t\t\t\tif ((substr(trim($decoded_url),-4)=='.htm') || (substr(trim($decoded_url),-5)=='.html'))\n\t\t\t\t{\n\t\t\t\t\tif (substr_count($decoded_url,'/')>1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$last_slash_pos=strrpos($decoded_url,'/');\n\t\t\t\t\t\t$decoded_url=str_replace('/','_',substr($decoded_url,0,$last_slash_pos)).substr($decoded_url,0,$last_slash_pos);\n\t\t\t\t\t}\n\t\t\t\t\t$decoded_url=trim(preg_replace('#(^|/)index\\.htm[l]#','${1}start.htm',$decoded_url));\n\t\t\t\t\t$stripped_decoded_url=preg_replace('#\\..*$#','',$decoded_url);\n\t\t\t\t\tif (strpos($stripped_decoded_url,'/')===false) $stripped_decoded_url='/'.$stripped_decoded_url;\n\t\t\t\t\tlist($zone,$page)=explode('/',$stripped_decoded_url,2);\n\t\t\t\t\tif ($page=='index') $page='start';\n\t\t\t\t\t$file_contents=str_replace($matches[2][$i],'{$PAGE_LINK*,'.$zone.':'.$page.'}',$file_contents);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tif (in_array($decoded_url,$files))\n\t\t\t\t\t{\n\t\t\t\t\t\t$target=get_custom_file_base().'/uploads/website_specific/'.$decoded_url;\n\t\t\t\t\t\t$create_path=$target;\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t@mkdir(dirname($create_path),0777);\n\t\t\t\t\t\t\t$create_path=dirname($create_path);\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (strlen($create_path)>1);\n\t\t\t\t\t\t@unlink($target);\n\t\t\t\t\t\t@copy($file_base.'/'.$decoded_url,$target);\n\n\t\t\t\t\t\t/*if (substr($decoded_url,-4)=='.css') Not needed, as relative paths maintained\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$css_file=file_get_contents($target);\n\t\t\t\t\t\t\t$css_file=preg_replace('#(url\\([\\'\"]?)(\\.*'.'/)?#','${1}{$BASE_URL;}/uploads/website_specific/',$css_file);\n\t\t\t\t\t\t\t$my_css_file=fopen($target,'wt');\n\t\t\t\t\t\t\tfwrite($my_css_file,$css_file);\n\t\t\t\t\t\t\tfclose($my_css_file);\n\t\t\t\t\t\t}*/\n\n\t\t\t\t\t\tfix_permissions($target);\n\t\t\t\t\t\tsync_file($target);\n\t\t\t\t\t}\n\n\t\t\t\t\t$decoded_url='uploads/website_specific/'.$decoded_url;\n\t\t\t\t\t$file_contents=str_replace('src=\"'.$matches[2][$i].'\"','src=\"{$BASE_URL*}/'.str_replace('%2F','/',rawurlencode($decoded_url)).'\"',$file_contents);\n\t\t\t\t\t$file_contents=str_replace('href=\"'.$matches[2][$i].'\"','href=\"{$BASE_URL*}/'.str_replace('%2F','/',rawurlencode($decoded_url)).'\"',$file_contents);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $file_contents;\n\t}", "function __sfPageContentTask_rel2abs($root,$file,$src){\n if(preg_match_all(\"/<(a|link|img|script|input|iframe)( [^>]*)(src|href)(=['\\\"])([^'\\\"]*)(['\\\"])/\",$src,$ms)){\n foreach($ms[0] as $k =>$from){\n $url = $ms[5][$k];\n if(strlen($url) > 0){\n $url= __sfPageContentTask_rel2abs_replace($file,$url);\n }\n $to = \"<\".$ms[1][$k].$ms[2][$k].$ms[3][$k].$ms[4][$k].$url.$ms[6][$k];\n $src = str_replace($from,$to,$src); \n }\n }\n return $src;\n}", "public static function absoluteURLs($html)\n {\n $html = str_replace('$CurrentPageURL', Controller::curr()->getRequest()->getURL(), $html);\n return HTTP::urlRewriter($html, function ($url) {\n //no need to rewrite, if uri has a protocol (determined here by existence of reserved URI character \":\")\n if (preg_match('/^\\w+:/', $url)) {\n return $url;\n }\n return Director::absoluteURL($url, true);\n });\n }", "private function relativePathFix($path){\n\t\t// check if page is a generated javadoc\n\t\t$page_str = $this->doc->saveHTML();\n\t\tif(preg_match('%.*Generated by javadoc.*%', $page_str)){\n\t\t\t// if it is, fix the frame-based links so that the path isn't appended to itself infinitely\n\t\t\t$path = preg_replace('%(.*\\/).*\\.html\\?(.*\\/.*)%', \"$1$2\", $path);\n\t\t}\n\t\t$dirs = explode('/', $path);\n\t\t// check if link goes up a directory\n\t\tif($dirs[0] == '..'){\n\t\t\t$new_path = explode('/', $this->current_path);\n\t\t\tif(count($dirs) == 2){\n\t\t\t\tarray_pop($new_path);\n\t\t\t\tarray_pop($new_path);\n\t\t\t\t$new_path = implode('/', $new_path).'/';\n\t\t\t} else {\n\t\t\t\t// remove slash from end of current path to ensure single slashes\n\t\t\t\tif(empty($new_path[count($new_path)-1]) || is_null($new_path[count($new_path)-1])){\n\t\t\t\t\tarray_pop($new_path);\n\t\t\t\t}\n\t\t\t\t// go up directories\n\t\t\t\twhile($dirs[0] == '..'){\n\t\t\t\t\tarray_shift($dirs);\n\t\t\t\t\tarray_pop($new_path);\n\t\t\t\t}\n\t\t\t\t// stick the two paths together to get new path\n\t\t\t\t$new_path = implode('/', $new_path).'/';\n\t\t\t\t$new_path .= implode('/', $dirs);\n\t\t\t}\n\t\t// if link it to same dir, remove the ./\n\t\t} elseif($dirs[0] == '.'){\n\t\t\t$new_path = $this->current_path.substr($path, 2);\n\t\t// if the link starts at root, use it without modification\n\t\t} elseif(empty($dirs[0]) || is_null($dirs[0])){\n\t\t\t$new_path = $path;\n\t\t} elseif(strlen($dirs[0]) == 2){\n\t\t\t$new_path = '/'.$path;\n\t\t// default to adding the link's value to the end of the current directory\n\t\t} else {\n\t\t\t$new_path = $this->current_path.$path;\n\t\t}\n\t\t\n\t\t// if the link doesn't point to a file or query string, but has no end slash, add one\n\t\tif(count(explode('.', $new_path)) < 2 && count(explode('?', $new_path)) < 2 && substr($new_path, -1) != '/'){\n\t\t\t$new_path .= '/';\n\t\t}\n\t\treturn $new_path;\n\t}", "function links_add_base_url($content, $base, $attrs = array('src', 'href'))\n {\n }", "function __sfPageContentTask_rel2abs_replace($file,$url){\n if(preg_match(\"|^/|\",$url)) return $url;\n if(preg_match(\"|^#|\",$url)) return $url;\n if(preg_match(\"|^https?://|\",$url)) return $url;\n if(preg_match(\"|^mailto:|\",$url)) return $url;\n $abs = \"/\" . dirname($file).\"/\".$url;\n $abs = str_replace(\"/./\",\"/\",$abs);\n do{\n $abs = preg_replace(\"|/[^/]+/../|\",\"/\",$abs,-1,$c);\n }while($c);\n return $abs;\n}", "function rel2abs_img( $rel, $base ) {\n\t\textract( parse_url( $base ) );\n\n\t\tif ( strpos( $rel,\"//\" ) === 0 ) {\n\t\t\treturn $scheme . ':' . $rel;\n\t\t}\n\n\t\t// return if already absolute URL\n\t\tif ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) {\n\t\t\treturn $rel;\n\t\t}\n\n\t\t// queries and anchors\n\t\tif ( $rel[0] == '#' || $rel[0] == '?' ) {\n\t\t\treturn $base . $rel;\n\t\t}\n\n\t\t// remove non-directory element from path\n\t\t$path = preg_replace( '#/[^/]*$#', '', $path );\n\n\t\t// destroy path if relative url points to root\n\t\tif ( $rel[0] == '/' ) {\n\t\t\t$path = '';\n\t\t}\n\n\t\t// dirty absolute URL\n\t\t$abs = $path . \"/\" . $rel;\n\n\t\t// replace '//' or '/./' or '/foo/../' with '/'\n\t\t$abs = preg_replace( \"/(\\/\\.?\\/)/\", \"/\", $abs );\n\t\t$abs = preg_replace( \"/\\/(?!\\.\\.)[^\\/]+\\/\\.\\.\\//\", \"/\", $abs );\n\n\t\t// absolute URL is ready!\n\t\treturn $abs;\n\t}", "public static function rewriteFlashSourcePaths($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $scripts = $query_path->top('script[type=\"text/javascript\"]');\n foreach ($scripts as $script) {\n $needles = [\n \"'src','\",\n \"'movie','\",\n ];\n $script_content = $script->text();\n foreach ($needles as $needle) {\n $start_loc = stripos($script_content, $needle);\n if ($start_loc !== FALSE) {\n $length_needle = strlen($needle);\n // Shift to the end of the needle.\n $start_loc = $start_loc + $length_needle;\n $end_loc = stripos($script_content, \"'\", $start_loc);\n $target_length = $end_loc - $start_loc;\n $old_path = substr($script_content, $start_loc, $target_length);\n if (!empty($old_path)) {\n // Process the path.\n $new_path = self::rewritePageHref($old_path, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Replace.\n $script_content = str_replace(\"'$old_path'\", \"'$new_path'\", $script_content);\n if ($old_path !== $new_path) {\n // The path changed, so put it back.\n $script->text($script_content);\n }\n }\n }\n }\n }\n }", "function _makeAbsolutPathOfContent($content, $sourcePath, $parentPath)\n\t{\n\t\t$sourcePath = substr($sourcePath, strlen($_SERVER['DOCUMENT_ROOT']));\n\t\tif (substr($sourcePath, 0, 1) != \"/\") {\n\t\t\t$sourcePath = \"/\" . $sourcePath;\n\t\t}\n\t\t\n\t\t// replace hrefs\n\t\tpreg_match_all(\n\t\t\t\t'/(<[^>]+href=[\"\\']?)([^\"\\' >]+)([^\"\\'>]?[^>]*>)/i', \n\t\t\t\t$content, \n\t\t\t\t$regs, \n\t\t\t\tPREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$orig_href = $regs[2][$i];\n\t\t\t\t$new_href = weSiteImport::_makeAbsolutePath($orig_href, $sourcePath, $parentPath);\n\t\t\t\tif ($new_href != $orig_href) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $new_href . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// replace src (same as href!!)\n\t\tpreg_match_all(\n\t\t\t\t'/(<[^>]+src=[\"\\']?)([^\"\\' >]+)([^\"\\'>]?[^>]*>)/i', \n\t\t\t\t$content, \n\t\t\t\t$regs, \n\t\t\t\tPREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$orig_href = $regs[2][$i];\n\t\t\t\t$new_href = weSiteImport::_makeAbsolutePath($orig_href, $sourcePath, $parentPath);\n\t\t\t\tif ($new_href != $orig_href) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $new_href . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// url() in styles with style=\"\"\n\t\tpreg_match_all('/(<[^>]+style=\")([^\"]+)(\"[^>]*>)/i', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\tpreg_match_all('/(url\\(\\'?)([^\\'\\)]+)(\\'?\\))/i', $style, $regs2, PREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeAbsolutePath($orig_url, $sourcePath, $parentPath);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace($orig_url, $new_url, $newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// url() in styles with style=''\n\t\tpreg_match_all('/(<[^>]+style=\\')([^\\']+)(\\'[^>]*>)/i', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\tpreg_match_all('/(url\\(\"?)([^\"\\)]+)(\"?\\))/i', $style, $regs2, PREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeAbsolutePath($orig_url, $sourcePath, $parentPath);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace($orig_url, $new_url, $newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// url() in <style> tags\n\t\tpreg_match_all('/(<style[^>]*>)(.*)(<\\/style>)/isU', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\t// url() in styles with style=''\n\t\t\t\tpreg_match_all(\n\t\t\t\t\t\t'/(url\\([\\'\"]?)([^\\'\"\\)]+)([\\'\"]?\\))/iU', \n\t\t\t\t\t\t$style, \n\t\t\t\t\t\t$regs2, \n\t\t\t\t\t\tPREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeAbsolutePath($orig_url, $sourcePath, $parentPath);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace(\n\t\t\t\t\t\t\t\t\t$regs2[0][$z], \n\t\t\t\t\t\t\t\t\t$regs2[1][$z] . $new_url . $regs2[3][$z], \n\t\t\t\t\t\t\t\t\t$newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $content;\n\t}", "public static function absolutize($base, $relative)\n {\n }", "public static function absolutize($base, $relative)\n {\n }", "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 wp_make_link_relative($link)\n {\n }", "function resolve_address($link, $page_base)\n {\n #----------------------------------------------------------\n # CONDITION INCOMING LINK ADDRESS\n #\n $link = trim($link);\n $page_base = trim($page_base);\n\n # if there isn't one, put a \"/\" at the end of the $page_base\n $page_base = trim($page_base);\n if( (strrpos($page_base, \"/\")+1) != strlen($page_base) )\n $page_base = $page_base.\"/\";\n\n # remove unwanted characters from $link\n $link = str_replace(\";\", \"\", $link);\t\t\t// remove ; characters\n $link = str_replace(\"\\\"\", \"\", $link);\t\t\t// remove \" characters\n $link = str_replace(\"'\", \"\", $link);\t\t\t// remove ' characters\n $abs_address = $page_base.$link;\n\n $abs_address = str_replace(\"/./\", \"/\", $abs_address);\n\n $abs_done = 0;\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO THE BASE DOMAIN ADDRESS\n #----------------------------------------------------------\n # There are essentially four types of addresses to resolve:\n # 1. References to the base domain address\n # 2. References to higher directories\n # 3. References to the base directory\n # 4. Addresses that are alreday fully resolved\n #\n if($abs_done==0)\n {\n # Use domain base address if $link starts with \"/\"\n if (substr($link, 0, 1) == \"/\")\n {\n // find the left_most \".\"\n $pos_left_most_dot = strrpos($page_base, \".\");\n\n # Find the left-most \"/\" in $page_base after the dot\n for($xx=$pos_left_most_dot; $xx<strlen($page_base); $xx++)\n {\n if( substr($page_base, $xx, 1)==\"/\")\n break;\n }\n\n $domain_base_address = get_base_domain_address($page_base);\n\n $abs_address = $domain_base_address.$link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO HIGHER DIRECTORIES\n #\n if($abs_done==0)\n {\n if (substr($link, 0, 3) == \"../\")\n {\n $page_base=trim($page_base);\n $right_most_slash = strrpos($page_base, \"/\");\n\n // remove slash if at end of $page base\n if($right_most_slash==strlen($page_base)-1)\n {\n $page_base = substr($page_base, 0, strlen($page_base)-1);\n $right_most_slash = strrpos($page_base, \"/\");\n }\n\n if ($right_most_slash<8)\n $unadjusted_base_address = $page_base;\n\n $not_done=TRUE;\n while($not_done)\n {\n // bring page base back one level\n list($page_base, $link) = move_address_back_one_level($page_base, $link);\n if(substr($link, 0, 3)!=\"../\")\n $not_done=FALSE;\n }\n if(isset($unadjusted_base_address))\n $abs_address = $unadjusted_base_address.\"/\".$link;\n else\n $abs_address = $page_base.\"/\".$link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO BASE DIRECTORY\n #\n if($abs_done==0)\n {\n if (substr($link, 0, \"1\") == \"/\")\n {\n $link = substr($link, 1, strlen($link)-1);\t// remove leading \"/\"\n $abs_address = $page_base.$link;\t\t\t// combine object with base address\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES THAT ARE ALREADY ABSOLUTE\n #\n if($abs_done==0)\n {\n if (substr($link, 0, 4) == \"http\")\n {\n $abs_address = $link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # ADD PROTOCOL IDENTIFIER IF NEEDED\n #\n if( (substr($abs_address, 0, 7)!=\"http://\") && (substr($abs_address, 0, 8)!=\"https://\") )\n $abs_address = \"http://\".$abs_address;\n\n return $abs_address;\n }", "function rel2abs($rel, $base)\n{\n if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;\n\n /* Url begins with // */\n if($rel[0] == '/' && $rel[1] == '/'){\n return 'https:' . $rel;\n }\n\n /* queries and anchors */\n if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;\n\n /* parse base URL and convert to local variables:\n $scheme, $host, $path */\n extract(parse_url($base));\n\n /* remove non-directory element from path */\n $path = preg_replace('#/[^/]*$#', '', $path);\n\n /* destroy path if relative url points to root */\n if ($rel[0] == '/') $path = '';\n\n /* dirty absolute URL */\n $abs = \"$host$path/$rel\";\n\n /* replace '//' or '/./' or '/foo/../' with '/' */\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\n for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {}\n\n /* absolute URL is ready! */\n return $scheme.'://'.$abs;\n}", "public function setUseRelativeUrls(bool $enable): void\n {\n $this->relativeUrls = $enable;\n }", "function rel2abs($rel, $base)\r\n{\r\n /* return if already absolute URL */\r\n if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;\r\n\r\n /* queries and anchors */\r\n if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;\r\n\r\n /* parse base URL and convert to local variables:\r\n $scheme, $host, $path */\r\n extract(parse_url($base));\r\n\r\n /* remove non-directory element from path */\r\n $path = preg_replace('#/[^/]*$#', '', $path);\r\n\r\n /* destroy path if relative url points to root */\r\n if ($rel[0] == '/') $path = '';\r\n\r\n /* dirty absolute URL */\r\n $abs = \"$host$path/$rel\";\r\n\r\n /* replace '//' or '/./' or '/foo/../' with '/' */\r\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\r\n for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {}\r\n\r\n /* absolute URL is ready! */\r\n return $scheme.'://'.$abs;\r\n}", "protected static function rewriteURLs($html)\n {\n if (isset($_SERVER['REQUEST_URI'])) {\n $html = str_replace('$CurrentPageURL', $_SERVER['REQUEST_URI'], $html);\n }\n return HTTP::urlRewriter($html, function ($url) {\n //no need to rewrite, if uri has a protocol (determined here by existence of reserved URI character \":\")\n if (preg_match('/^\\w+:/', $url)) {\n return $url;\n }\n return self::safeAbsoluteURL($url, true);\n });\n }", "function absolute_url($page, $url)\n{\n \n if (substr($page, 0, 7) !== APP_PROTOCOL . '://') return $url;\n\n $parse = parse_url($page);\n $root = $parse['scheme'] . '://' . $parse['host'];\n $p = strrpos(substr($parse, 7), '/');\n\n if ($p) {\n\n $base = substr($page, 0, $p + 8);\n\n } else {\n\n $base = \"$page/\";\n\n }\n\n if (substr($url, 0, 1) === '/') {\n\n $url = $root . $url;\n\n } elseif (substr($url, 0, 7) !== APP_PROTOCOL . '://') {\n\n $url = $base . $url;\n\n }\n\n $url_sanitized = sanitize_urls($url);\n\n return $url_sanitized;\n \n}", "function _wp_normalize_relative_css_links($css, $stylesheet_url)\n {\n }", "function setBaseHref($url, $source)\r\n {\r\n if (preg_match_all('|<base[^>]*href[\\s]*=[\\s\\'\\\"]*(.*?)[\\'\\\"\\s>]|is', $html, $matches, 0, 1)) {\r\n $this->baseHrefs[$url] = $matches[1][0];\r\n }\r\n }" ]
[ "0.69139534", "0.6278394", "0.59688115", "0.59531057", "0.5919959", "0.57591724", "0.57120806", "0.568371", "0.5624263", "0.5591684", "0.558102", "0.5512087", "0.5485052", "0.5478315", "0.5365989", "0.53144234", "0.5286549", "0.51799154", "0.5177023", "0.5174837", "0.5148383", "0.5130631", "0.51279145", "0.5036494", "0.50158536", "0.5015438", "0.4994197", "0.4979241", "0.49776122", "0.49382946" ]
0.6610211
1
Alter URIs and URLs in page that are relative, absolute or full alter base. Relative links will be made either absolute or root relative depending on the value of $base_for_relative. If root relative is used, then attempts will be made to lookup the redirect and detect the final destination.
public static function rewritePageHref($href, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) { if (!empty($href)) { // Fix relatives Using the $base_for_relative and file_path. $source_file = $base_for_relative . '/' . $file_path; $href = self::convertRelativeToAbsoluteUrl($href, $source_file, $destination_base_url); // If the href matches a $url_base_alters swap them. foreach ($url_base_alters as $old_base => $new_base) { if (stripos($href, $old_base) !== FALSE) { $href = str_ireplace($old_base, $new_base, $href); // The first replacement won, so call it quits on the replacement. break; } } } // For local links, make them root relative. $href_host = parse_url($href, PHP_URL_HOST); $href_scheme = parse_url($href, PHP_URL_HOST); $destination_host = parse_url($destination_base_url, PHP_URL_HOST); if (!empty($href_scheme) && !empty($href_host) && ($destination_host == $href_host)) { // This is a local url so should have the scheme and host removed. $href_parsed = parse_url($href); $href = self::reassembleURL($href_parsed, $destination_base_url, FALSE); $href = '/' . ltrim($href, '/'); } return $href; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function absolutize($base, $relative)\n {\n }", "public static function absolutize($base, $relative)\n {\n }", "public static function rewriteImageHrefsOnPage($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n // Find all the images on the page.\n $image_srcs = $query_path->top('img[src]');\n // Initialize summary report information.\n $image_count = $image_srcs->size();\n $report = [];\n // Loop through them all looking for src to alter.\n foreach ($image_srcs as $image) {\n $href = trim($image->attr('src'));\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $image->attr('src', $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n $report[] = \"$href changed to $new_href\";\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $image_count, 'Rewrote img src');\n }", "function resolve_address($link, $page_base)\n {\n #----------------------------------------------------------\n # CONDITION INCOMING LINK ADDRESS\n #\n $link = trim($link);\n $page_base = trim($page_base);\n\n # if there isn't one, put a \"/\" at the end of the $page_base\n $page_base = trim($page_base);\n if( (strrpos($page_base, \"/\")+1) != strlen($page_base) )\n $page_base = $page_base.\"/\";\n\n # remove unwanted characters from $link\n $link = str_replace(\";\", \"\", $link);\t\t\t// remove ; characters\n $link = str_replace(\"\\\"\", \"\", $link);\t\t\t// remove \" characters\n $link = str_replace(\"'\", \"\", $link);\t\t\t// remove ' characters\n $abs_address = $page_base.$link;\n\n $abs_address = str_replace(\"/./\", \"/\", $abs_address);\n\n $abs_done = 0;\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO THE BASE DOMAIN ADDRESS\n #----------------------------------------------------------\n # There are essentially four types of addresses to resolve:\n # 1. References to the base domain address\n # 2. References to higher directories\n # 3. References to the base directory\n # 4. Addresses that are alreday fully resolved\n #\n if($abs_done==0)\n {\n # Use domain base address if $link starts with \"/\"\n if (substr($link, 0, 1) == \"/\")\n {\n // find the left_most \".\"\n $pos_left_most_dot = strrpos($page_base, \".\");\n\n # Find the left-most \"/\" in $page_base after the dot\n for($xx=$pos_left_most_dot; $xx<strlen($page_base); $xx++)\n {\n if( substr($page_base, $xx, 1)==\"/\")\n break;\n }\n\n $domain_base_address = get_base_domain_address($page_base);\n\n $abs_address = $domain_base_address.$link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO HIGHER DIRECTORIES\n #\n if($abs_done==0)\n {\n if (substr($link, 0, 3) == \"../\")\n {\n $page_base=trim($page_base);\n $right_most_slash = strrpos($page_base, \"/\");\n\n // remove slash if at end of $page base\n if($right_most_slash==strlen($page_base)-1)\n {\n $page_base = substr($page_base, 0, strlen($page_base)-1);\n $right_most_slash = strrpos($page_base, \"/\");\n }\n\n if ($right_most_slash<8)\n $unadjusted_base_address = $page_base;\n\n $not_done=TRUE;\n while($not_done)\n {\n // bring page base back one level\n list($page_base, $link) = move_address_back_one_level($page_base, $link);\n if(substr($link, 0, 3)!=\"../\")\n $not_done=FALSE;\n }\n if(isset($unadjusted_base_address))\n $abs_address = $unadjusted_base_address.\"/\".$link;\n else\n $abs_address = $page_base.\"/\".$link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES TO BASE DIRECTORY\n #\n if($abs_done==0)\n {\n if (substr($link, 0, \"1\") == \"/\")\n {\n $link = substr($link, 1, strlen($link)-1);\t// remove leading \"/\"\n $abs_address = $page_base.$link;\t\t\t// combine object with base address\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # LOOK FOR REFERENCES THAT ARE ALREADY ABSOLUTE\n #\n if($abs_done==0)\n {\n if (substr($link, 0, 4) == \"http\")\n {\n $abs_address = $link;\n $abs_done=1;\n }\n }\n\n #----------------------------------------------------------\n # ADD PROTOCOL IDENTIFIER IF NEEDED\n #\n if( (substr($abs_address, 0, 7)!=\"http://\") && (substr($abs_address, 0, 8)!=\"https://\") )\n $abs_address = \"http://\".$abs_address;\n\n return $abs_address;\n }", "public static function rewriteAnchorHrefsToPages($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $attributes = [\n 'href' => 'a[href], area[href]',\n 'longdesc' => 'img[longdesc]',\n ];\n $pagelink_count = 0;\n $report = [];\n foreach ($attributes as $attribute => $selector) {\n // Find all the hrefs on the page.\n $links_to_pages = $query_path->top($selector);\n // Initialize summary report information.\n $pagelink_count += $links_to_pages->size();\n // Loop through them all looking for href to alter.\n foreach ($links_to_pages as $link) {\n $href = trim($link->attr('href'));\n if (CheckFor::isPage($href)) {\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $link->attr($attribute, $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n Message::make(\"$attribute: $href changed to $new_href\", [], FALSE);\n $report[] = \"$attribute: $href changed to $new_href\";\n }\n }\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $pagelink_count, 'Rewrote page hrefs');\n }", "function make_url_absolute($base_url, $relative_url) {\n // Replace any spaces out of the relative url\n // Not doing a full urlencode here b/c encoding only the characters we want to encode gets complicated\n $relative_url = str_replace(' ', '%20', $relative_url);\n\n if (substr($relative_url, 0, 4) === 'http') {\n // In this case the URL is already absolute, so we just return it\n return $relative_url;\n } else {\n $base_url_scheme = parse_url($base_url, PHP_URL_SCHEME);\n $base_url_host = parse_url($base_url, PHP_URL_HOST);\n $base_url_path = substr(parse_url($base_url, PHP_URL_PATH), 0, strrpos(parse_url($base_url, PHP_URL_PATH), '/'));\n\n if (substr($relative_url, 0, 1) === '/') {\n return $base_url_scheme . '://' . $base_url_host . $relative_url;\n } else {\n return $base_url_scheme . '://' . $base_url_host . $base_url_path . '/' . $relative_url;\n }\n }\n}", "private function compensateForProtocolRelativeUrl() {\n if (substr($this->preparedOrigin, 0, strlen(self::PROTOCOL_RELATIVE_START)) == self::PROTOCOL_RELATIVE_START) {\n $this->preparedOrigin = $this->protocolRelativeDummyScheme() . ':' . $this->preparedOrigin;\n $this->hasProtocolRelativeDummyScheme = true;\n $this->isProtocolRelative = true;\n }\n }", "function rel2abs($rel, $base)\r\n{\r\n /* return if already absolute URL */\r\n if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;\r\n\r\n /* queries and anchors */\r\n if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;\r\n\r\n /* parse base URL and convert to local variables:\r\n $scheme, $host, $path */\r\n extract(parse_url($base));\r\n\r\n /* remove non-directory element from path */\r\n $path = preg_replace('#/[^/]*$#', '', $path);\r\n\r\n /* destroy path if relative url points to root */\r\n if ($rel[0] == '/') $path = '';\r\n\r\n /* dirty absolute URL */\r\n $abs = \"$host$path/$rel\";\r\n\r\n /* replace '//' or '/./' or '/foo/../' with '/' */\r\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\r\n for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {}\r\n\r\n /* absolute URL is ready! */\r\n return $scheme.'://'.$abs;\r\n}", "function rel2abs($rel, $base)\n{\n if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;\n\n /* Url begins with // */\n if($rel[0] == '/' && $rel[1] == '/'){\n return 'https:' . $rel;\n }\n\n /* queries and anchors */\n if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;\n\n /* parse base URL and convert to local variables:\n $scheme, $host, $path */\n extract(parse_url($base));\n\n /* remove non-directory element from path */\n $path = preg_replace('#/[^/]*$#', '', $path);\n\n /* destroy path if relative url points to root */\n if ($rel[0] == '/') $path = '';\n\n /* dirty absolute URL */\n $abs = \"$host$path/$rel\";\n\n /* replace '//' or '/./' or '/foo/../' with '/' */\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\n for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {}\n\n /* absolute URL is ready! */\n return $scheme.'://'.$abs;\n}", "function rel2abs_img( $rel, $base ) {\n\t\textract( parse_url( $base ) );\n\n\t\tif ( strpos( $rel,\"//\" ) === 0 ) {\n\t\t\treturn $scheme . ':' . $rel;\n\t\t}\n\n\t\t// return if already absolute URL\n\t\tif ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) {\n\t\t\treturn $rel;\n\t\t}\n\n\t\t// queries and anchors\n\t\tif ( $rel[0] == '#' || $rel[0] == '?' ) {\n\t\t\treturn $base . $rel;\n\t\t}\n\n\t\t// remove non-directory element from path\n\t\t$path = preg_replace( '#/[^/]*$#', '', $path );\n\n\t\t// destroy path if relative url points to root\n\t\tif ( $rel[0] == '/' ) {\n\t\t\t$path = '';\n\t\t}\n\n\t\t// dirty absolute URL\n\t\t$abs = $path . \"/\" . $rel;\n\n\t\t// replace '//' or '/./' or '/foo/../' with '/'\n\t\t$abs = preg_replace( \"/(\\/\\.?\\/)/\", \"/\", $abs );\n\t\t$abs = preg_replace( \"/\\/(?!\\.\\.)[^\\/]+\\/\\.\\.\\//\", \"/\", $abs );\n\n\t\t// absolute URL is ready!\n\t\treturn $abs;\n\t}", "public static function rewriteScriptSourcePaths($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $attributes = [\n 'src' => 'script[src], embed[src]',\n 'value' => 'param[value]',\n ];\n $script_path_count = 0;\n $report = [];\n self::rewriteFlashSourcePaths($query_path, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n foreach ($attributes as $attribute => $selector) {\n // Find all the selector on the page.\n $links_to_pages = $query_path->top($selector);\n // Initialize summary report information.\n $script_path_count += $links_to_pages->size();\n // Loop through them all looking for src or value path to alter.\n foreach ($links_to_pages as $link) {\n $href = trim($link->attr($attribute));\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $link->attr($attribute, $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n $report[] = \"$attribute: $href changed to $new_href\";\n }\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $script_path_count, 'Rewrote script src');\n }", "function rel2abs($rel, $base) {\n if (empty($rel)) $rel = \".\";\n if (parse_url($rel, PHP_URL_SCHEME) != \"\" || strpos($rel, \"//\") === 0) return $rel; //Return if already an absolute URL\n if ($rel[0] == \"#\" || $rel[0] == \"?\") return $base.$rel; //Queries and anchors\n extract(parse_url($base)); //Parse base URL and convert to local variables: $scheme, $host, $path\n $path = isset($path) ? preg_replace('#/[^/]*$#', \"\", $path) : \"/\"; //Remove non-directory element from path\n if ($rel[0] == '/') $path = \"\"; //Destroy path if relative url points to root\n $port = isset($port) && $port != 80 ? \":\" . $port : \"\";\n $auth = \"\";\n if (isset($user)) {\n $auth = $user;\n if (isset($pass)) {\n $auth .= \":\" . $pass;\n }\n $auth .= \"@\";\n }\n $abs = \"$auth$host$path$port/$rel\"; //Dirty absolute URL\n for ($n = 1; $n > 0; $abs = preg_replace(array(\"#(/\\.?/)#\", \"#/(?!\\.\\.)[^/]+/\\.\\./#\"), \"/\", $abs, -1, $n)) {} //Replace '//' or '/./' or '/foo/../' with '/'\n return $scheme . \"://\" . $abs; //Absolute URL is ready.\n}", "function resolve_href ($base, $href) {\n if (!$href) {\n return $base;\n }\n\n // href=\"http://...\" ==> href isn't relative\n $rel_parsed = parse_url($href);\n if (array_key_exists('scheme', $rel_parsed)) {\n return $href;\n }\n\n // add an extra character so that, if it ends in a /, we don't lose the last piece.\n $base_parsed = parse_url(\"$base \");\n // if it's just server.com and no path, then put a / there.\n if (!array_key_exists('path', $base_parsed)) {\n $base_parsed = parse_url(\"$base/ \");\n }\n\n // href=\"/ ==> throw away current path.\n if ($href{0} === \"/\") {\n $path = $href;\n } else {\n $path = dirname($base_parsed['path']) . \"/$href\";\n }\n\n // bla/./bloo ==> bla/bloo\n $path = preg_replace('~/\\./~', '/', $path);\n\n // resolve /../\n // loop through all the parts, popping whenever there's a .., pushing otherwise.\n $parts = array();\n foreach (\n explode('/', preg_replace('~/+~', '/', $path)) as $part\n ) if ($part === \"..\") {\n array_pop($parts);\n } elseif ($part!=\"\") {\n $parts[] = $part;\n }\n\n return (\n (array_key_exists('scheme', $base_parsed)) ?\n $base_parsed['scheme'] . '://' . $base_parsed['host'] : \"\"\n ) . \"/\" . implode(\"/\", $parts);\n\n}", "function rel2abs($rel, $base)\n {\n if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;\n\n /* queries and anchors */\n if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;\n\n /* parse base URL and convert to local variables:\n $scheme, $host, $path */\n extract(parse_url($base));\n\n /* remove non-directory element from path */\n $path = preg_replace('#/[^/]*$#', '', $path);\n\n /* destroy path if relative url points to root */\n if ($rel[0] == '/') $path = '';\n\n /* dirty absolute URL */\n $abs = \"$host$path/$rel\";\n\n /* replace '//' or '/./' or '/foo/../' with '/' */\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\n for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {}\n\n /* absolute URL is ready! */\n return $scheme.'://'.$abs;\n}", "function rel2abs($rel, $base) {\n if (parse_url($rel, PHP_URL_SCHEME) != '')\n return $rel;\n if ($rel[0] == '#' || $rel[0] == '?')\n return $base . $rel;\n extract(parse_url($base));\n\t\t\n\t\tif(!isset($path))\n\t\t\treturn;\n\t\t\n $path = preg_replace('#/[^/]*$#', '', $path);\n if ($rel[0] == '/')\n $path = '';\n $abs = \"$host$path/$rel\";\n $re = array('#(/\\.?/)#', '#/(?!\\.\\.)[^/]+/\\.\\./#');\n for ($n = 1; $n > 0; $abs = preg_replace($re, '/', $abs, -1, $n)) {\n \n }\n $abs = str_replace(\"../\", \"\", $abs);\n return $scheme . '://' . $abs;\n }", "protected function fix_supporting_file_references() {\r\n\t\tpreg_match_all('/<link([^<>]*?) href=\"([^\"]*?)\"([^<>]*?)\\/>/is', $this->code, $link_matches);\r\n\t\t/*$counter = sizeof($link_matches[0]) - 1;\r\n\t\twhile($counter > -1) {\r\n\t\t\t\r\n\t\t\t$counter--;\r\n\t\t}*/\r\n\t\t$array_replaces = array();\r\n\t\tforeach($link_matches[0] as $index => $value) {\r\n\t\t\t$href_content = $link_matches[2][$index];\r\n\t\t\tif($href_content[0] === '/' || strpos($href_content, 'http://') !== false) { // avoid root references and URLs\r\n\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$initial_href_content = $href_content;\r\n\t\t\t\t\t// first try looking closer\r\n\t\t\t\t\t$proper_reference = false;\r\n\t\t\t\t\twhile(!$proper_reference && substr($href_content, 0, 3) === '../') {\r\n\t\t\t\t\t\t$href_content = substr($href_content, 3);\r\n\t\t\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\t\t$proper_reference = true;\r\n\t\t\t\t\t\t\t$array_replaces['href=\"' . $initial_href_content . '\"'] = 'href=\"' . $href_content . '\"';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!$proper_reference) { // try looking farther\r\n\t\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\t\twhile(!$proper_reference && $counter < 10) {\r\n\t\t\t\t\t\t\t$href_content = '../' . $href_content;\r\n\t\t\t\t\t\t\t$relative_path = ReTidy::resolve_relative_path($href_content, $this->file);\r\n\t\t\t\t\t\t\tif(file_exists($relative_path)) {\r\n\t\t\t\t\t\t\t\t$proper_reference = true;\r\n\t\t\t\t\t\t\t\t$array_replaces['href=\"' . $initial_href_content . '\"'] = 'href=\"' . $href_content . '\"';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$counter++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!$proper_reference) { // give up or finish\r\n\t\t\t\t\t\tvar_dump($this->file, $href_content, $relative_path);exit(0);\r\n\t\t\t\t\t\tprint('<span style=\"color: red;\">Could not fix broken reference in &lt;link&gt;: ' . $value . '</span>');exit(0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->logMsg('Reference ' . htmlentities($value) . ' was fixed.');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($array_replaces as $index => $value) {\r\n\t\t\t$this->code = str_replace($index, $value, $this->code);\r\n\t\t}\r\n\t}", "public function resolveAddress($link, $base)\n\t{\t\t\n\t\t/*\n\t\t * $link_compenents = $parse_url($link)\n\t\t */\n\t\t\n\t\t/*\n\t\t * if(isset($link_compenents['scheme'])\n\t\t * \treturn $link;\n\t\t */\n\t\t# Is link already fully resolved\n\t\t$firstThreeChars = substr($link, 0, 3);\n\t\t\n\t\tif ($firstThreeChars == 'www' || $firstThreeChars == 'htt')\n\t\t\treturn $link;\n\t\t\t\n\t\t# Is link pointing to root directory\n\t\tif(strpos($link, '/') === 0)\n\t\t\treturn $this->getURLBase($base) . substr($link, strpos($link, '/') + 1);\n\t\t\n\t\t# Is link pointing at a parent directory\n\t\tif($firstThreeChars == '../')\n\t\t{\n\t\t\t#determine how many directories to move up\n\t\t\t$parent_count = substr_count($link, '../');\n\t\t\t$link = str_replace('../', '', $link);\n\t\t\t$base = explode('/', $base);\n\t\t\t\n\t\t\tif(count($base) < $parent_count)\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t#traverse up the directory\n\t\t\tfor($i = 0; $i < $parent_count; $i++)\n\t\t\t\tarray_pop($base);\n\t\t\t\n\t\t\t$base = implode('/', $base);\n\t\t\treturn $base . '/' . $link;\n\t\t}\n\t\t\n\t\t/* If we have made it this far, link is either already fully resolved\n\t\t * with neither protocal or 'www', or link is pointing to\n\t\t * immediate parent directory\n\t\t */\n\t\t\t\t\t\n\t\t# Make sure our base doesn't contain any QSA's\n\t\t$qsa_pos = strpos($base, '?');\n\t\tif($qsa_pos !== false)\n\t\t{\n\t\t\t$base = substr($base, 0, $qsa_pos);\n\t\t\tif(strrpos($base, '/' + 1) == strlen($base))\n\t\t\t\t$base = substr($base, 0, strlen($base) - 1);\t\n\t\t}\n\t\t\n\t\t/*\n\t\t * Make sure base isn't pointing at a sibling file\n\t\t * If there is a file extension after the last directory sperator,\n\t\t * and the directory seperator isn't part of protocal, then we have a sibling file needing removal\n\t\t */\n\t\t$dir_sep_pos = strrpos($base, '/');\n\t\tif($dir_sep_pos !== false && $dir_sep_pos > 6 && $dir_sep_pos < strrpos($base, '.'))\n\t\t\t$base = substr($base, 0, $dir_sep_pos);\n\n\t\t# Link is pointing at immediate parent directory and $base contains no QSA's or sibling file\n\t\tif($dir_sep_pos == strlen($base) + 1)\n\t\t\treturn $base . $link;\n\n\t\t# I think we've accounted for everything. Just add the directory seperator\n\t\treturn $base . '/' . $link;\t\n\t}", "public function rel2abs($rel, $base){\n if (parse_url($rel, PHP_URL_SCHEME) != '')\n {return $rel;}\n if (!empty($rel[0])=='#' || !empty($rel[0])=='?')\n {return $base.$rel;}\n extract(parse_url($base));\n if (isset($path)){$path = preg_replace('#/[^/]*$#', '', $path);}\n else $path = '';\n if (!empty($rel[0]) == '/'){\n $path = '';\n }\n $abs = \"$host$path/$rel\";\n $re = array('#(/.?/)#', '#/(?!..)[^/]+/../#');\n for($n=1; $n>0;$abs=preg_replace($re,'/', $abs,-1,$n)){}\n $abs=str_replace(\"../\",\"\",$abs);\n return $scheme.'://'.$abs;\n }", "public static function rewriteFlashSourcePaths($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $scripts = $query_path->top('script[type=\"text/javascript\"]');\n foreach ($scripts as $script) {\n $needles = [\n \"'src','\",\n \"'movie','\",\n ];\n $script_content = $script->text();\n foreach ($needles as $needle) {\n $start_loc = stripos($script_content, $needle);\n if ($start_loc !== FALSE) {\n $length_needle = strlen($needle);\n // Shift to the end of the needle.\n $start_loc = $start_loc + $length_needle;\n $end_loc = stripos($script_content, \"'\", $start_loc);\n $target_length = $end_loc - $start_loc;\n $old_path = substr($script_content, $start_loc, $target_length);\n if (!empty($old_path)) {\n // Process the path.\n $new_path = self::rewritePageHref($old_path, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Replace.\n $script_content = str_replace(\"'$old_path'\", \"'$new_path'\", $script_content);\n if ($old_path !== $new_path) {\n // The path changed, so put it back.\n $script->text($script_content);\n }\n }\n }\n }\n }\n }", "function wp_make_link_relative($link)\n {\n }", "public static function rewriteAnchorHrefsToBinaryFiles($query_path, array $url_base_alters, $file_path, $base_for_relative, $destination_base_url) {\n $attributes = [\n 'href' => 'a[href], area[href]',\n 'longdesc' => 'img[longdesc]',\n ];\n $filelink_count = 0;\n $report = [];\n foreach ($attributes as $attribute => $selector) {\n // Find all the $selector on the page.\n $binary_file_links = $query_path->top($selector);\n $filelink_count += $binary_file_links->size();\n // Loop through them all looking for href to alter.\n foreach ($binary_file_links as $link) {\n $href = trim($link->attr($attribute));\n if (CheckFor::isFile($href)) {\n $new_href = self::rewritePageHref($href, $url_base_alters, $file_path, $base_for_relative, $destination_base_url);\n // Set the new href.\n $link->attr($attribute, $new_href);\n\n if ($href !== $new_href) {\n // Something was changed so add it to report.\n $report[] = \"$attribute: $href changed to $new_href\";\n }\n }\n }\n }\n // Message the report (no log).\n Message::makeSummary($report, $filelink_count, 'Rewrote binary file hrefs');\n }", "function absolute_url($page, $url)\n{\n \n if (substr($page, 0, 7) !== APP_PROTOCOL . '://') return $url;\n\n $parse = parse_url($page);\n $root = $parse['scheme'] . '://' . $parse['host'];\n $p = strrpos(substr($parse, 7), '/');\n\n if ($p) {\n\n $base = substr($page, 0, $p + 8);\n\n } else {\n\n $base = \"$page/\";\n\n }\n\n if (substr($url, 0, 1) === '/') {\n\n $url = $root . $url;\n\n } elseif (substr($url, 0, 7) !== APP_PROTOCOL . '://') {\n\n $url = $base . $url;\n\n }\n\n $url_sanitized = sanitize_urls($url);\n\n return $url_sanitized;\n \n}", "public static function relativeLinks($template, $s)\n\t{\n\t\treturn preg_replace(\n\t\t\t'#(src|href|action)\\s*=\\s*\"(?![a-z]+:|/|<|\\\\#)#',\n\t\t\t'$1=\"' . $template->baseUri,\n\t\t\t$s\n\t\t);\n\t}", "public function adaptRelativeId($id) {\n global $conf;\n\n if ($id === '') {\n return $id;\n }\n\n $abs_id = resolve_id($this->ns, $id, false);\n $clean_id = cleanID($abs_id);\n // FIXME this simply assumes that the link pointed to :$conf['start'], but it could also point to another page\n // resolve_pageid does a lot more here, but we can't really assume this as the original pages might have been\n // deleted already\n if (substr($clean_id, -1) === ':')\n $clean_id .= $conf['start'];\n\n if (isset($this->moves[$clean_id]) || $this->id !== $this->new_id) {\n if (isset($this->moves[$clean_id])) {\n $new = $this->moves[$clean_id];\n } else {\n $new = $clean_id;\n }\n $new_link = $new;\n $new_ns = getNS($new);\n // try to keep original pagename\n if (noNS($new) == noNS($clean_id)) {\n if ($new_ns == $this->new_ns) {\n $new_link = noNS($id);\n if ($id == ':')\n $new_link = ':';\n } else if ($new_ns != false) {\n $new_link = $new_ns.':'.noNS($id);\n } else {\n $new_link = noNS($id);\n }\n }\n // TODO: change subnamespaces to relative links\n\n //msg(\"Changing $match, clean id is $clean_id, new id is $new, new namespace is $new_ns, new link is $new_link\");\n\n if ($this->new_ns != '' && $new_ns == false) {\n $new_link = ':'.$new_link;\n }\n\n return $new_link;\n } else {\n return $id;\n }\n }", "static function absoluteURLs($html) {\n\t\t$html = str_replace('$CurrentPageURL', $_SERVER['REQUEST_URI'], $html);\n\t\treturn HTTP::urlRewriter($html, '(substr($URL,0,1) == \"/\") ? ( Director::protocolAndHost() . $URL ) : ( (ereg(\"^[A-Za-z]+:\", $URL)) ? $URL : Director::absoluteBaseURL() . $URL )' );\n\t}", "public function rel2abs($rel, $base) {\n if (parse_url($rel, PHP_URL_SCHEME) != '') {\n return $rel;\n }\n if ($rel[0] == '#' || $rel[0] == '?') {\n return $base . $rel;\n }\n extract(parse_url($base));\n $path = preg_replace('#/[^/]*$#', '', $path);\n if ($rel[0] == '/') {\n $path = '';\n }\n $abs = \"$host$path/$rel\";\n $re = array('#(/.?/)#', '#/(?!..)[^/]+/../#');\n for ($n = 1; $n > 0; $abs = preg_replace($re, '/', $abs, -1, $n)) {}\n $abs = str_replace('../', '', $abs);\n return $scheme . '://' . $abs;\n }", "public static function relativize(Psr7UriInterface|UriInterface $uri, Psr7UriInterface|UriInterface $baseUri): Psr7UriInterface|UriInterface\n {\n return BaseUri::from($baseUri)->relativize($uri)->getUri();\n }", "private function initUrlProcess() {\n $url = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $urld = urldecode($url);\n $url = trim(str_replace($this->subdir, \"\", $urld), '/');\n\n // Redirect index aliases\n if (in_array($url, ['home', 'index', 'index.php'])) {\n redirect($this->subdir, 301);\n }\n\n $this->url = $url;\n $this->segments = empty($url) ? [] : explode('/', $url);\n }", "function ozi_make_absolute_url($absolute, $relative) \r\n{\r\n\tif (empty($relative)) $relative=$absolute;\r\n $p = ozi_parse_url($relative);\r\n \r\n if(isset($p[\"scheme\"])) return $relative;\r\n $path = isset($p[\"path\"]) ? $p[\"path\"] : \"\";\r\n $path = dirname($path);\r\n extract(ozi_parse_url($absolute));\r\n if($relative{0} == '/') {\r\n $cparts = explode(\"/\", $relative);\r\n }\r\n else {\r\n $aparts = explode(\"/\", $path);\r\n \tif (count($aparts)>0) array_pop($aparts);\r\n $rparts = explode(\"/\", $relative);\r\n $cparts = array_merge($aparts, $rparts);\r\n foreach($cparts as $i => $part) {\r\n if($part == '.') $cparts[$i] = null;\r\n if($part == '..') {$cparts[$i - 1] = null;$cparts[$i] = null;}\r\n }\r\n }\r\n\t\r\n\t//Filter cparts, removing empty elements\r\n\t$res = array();\r\n\tforeach ($cparts as $v) if (strlen($v)>0) $res[] = $v;\r\n\t$cparts = $res;\r\n\r\n\t//##+kenfoo 14042007. Added proper handling of paths ending with a slash.\r\n\t//Earlier code dropped the final slash, causing problems with Facebook /inbox/.\r\n $n = strlen($relative);\r\n if ($n>0 && $relative[$n-1]=='/') $cparts[]='';\r\n \r\n $path = implode(\"/\", $cparts);\r\n $url = \"\";\r\n if(isset($scheme)) $url = \"$scheme://\";\r\n if(isset($user)) {\r\n $url .= \"$user\";\r\n if($pass) $url .= \":$pass\";\r\n $url .= \"@\";\r\n }\r\n if(isset($host)) {\r\n\t\t$url .= $host;\r\n\t if(isset($port)) $url .= \":$port\";\r\n\t\t$url .='/';\r\n\t}\r\n $url .= $path;\r\n return $url;\r\n\r\n}", "private static function absolutize( $path, $base ) {\n\t\tif ( ! empty( $path ) && ! \\WP_CLI\\Utils\\is_path_absolute( $path ) ) {\n\t\t\t$path = $base . DIRECTORY_SEPARATOR . $path;\n\t\t}\n\t\treturn $path;\n\t}" ]
[ "0.6627413", "0.6626928", "0.6193491", "0.6181398", "0.61551595", "0.61425257", "0.60920715", "0.6072377", "0.60543996", "0.60346735", "0.5965375", "0.5954869", "0.5911563", "0.58710635", "0.58592075", "0.57885355", "0.5721136", "0.57173127", "0.56767446", "0.564738", "0.5629766", "0.56228703", "0.5620419", "0.56192887", "0.5613452", "0.55912876", "0.5540441", "0.5525507", "0.55070776", "0.54964465" ]
0.70726913
0
getEngine Return the adapter if there is one, else return the scheme
public function getEngine() { $adapter = $this->getAdapter(); if ($adapter) { return $adapter; } return ucfirst($this->dsn->scheme); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEngine ()\n {\n return $this->engine;\n }", "public function getEngine()\n {\n return $this->engine;\n }", "public function getEngine()\n {\n return $this->engine;\n }", "public function getEngine()\n {\n return $this->engine;\n }", "public function getEngine()\n {\n return $this->engine;\n }", "public function getEngine();", "public function getEngine();", "public function getEngine();", "public function getEngine() {\n return $this->engine;\n }", "public function getEngine() {\n return $this->engine;\n }", "public function getEngine() {\n\t\treturn $this->engine;\n\t}", "public function getEngine()\n\t{\n\t\treturn $this->engine;\n\t}", "public function getEngine()\n {\n if (Mage::helper('conversionpro')->isActiveEngine()) {\n\t\t\treturn Mage::helper('conversionpro')->getSearchEngine();\n\t\t}\n\t\t\n\t\treturn parent::getEngine();\n }", "function getEngine();", "public function getActiveBackend()\n {\n \treturn $this->engine;\n }", "public function getEngine()\r\n\t{\r\n\t\treturn null;\r\n\t}", "public function getEngine()\n {\n return $this;\n }", "public function getEngine(): Engine;", "public function engine()\n {\n if ($this->engine === null) {\n return $this->defaultEngine();\n }\n\n return $this->engine;\n }", "public function getEngine()\n {\n return $this->environment;\n }", "public abstract function getBackend();", "public function getEngine()\n\t\t{\n\t\t\t$f = new ECash_CFE_RulesetFactory($this->db);\n\n\t\t\t//temporary hack to insure we have a model and context\n\t\t\t$this->getModel();\n\t\t\t$engine = ECash_CFE_Engine::getInstance($this->context);\n\t\t\t$engine->setRuleset($f->fetchRuleset($this->model->cfe_rule_set_id));\n\n\t\t\treturn $engine;\n\t\t}", "function getEngineType() {\n\t\treturn $this->engineType;\n\t}", "public function tEngine() : EngineInterface {\n return $this -> tEngine;\n }", "public function getBackend();", "public function getEngine(): Engine\r\n {\r\n return $this->template;\r\n }", "public function getBackend() {\n\t\t$data = unserialize($this->Data);\n\t\tif(isset($data['EnvironmentType']) && class_exists($data['EnvironmentType'])) {\n\t\t\t$env = Injector::inst()->get($data['EnvironmentType']);\n\t\t\tif($env instanceof EnvironmentCreateBackend) {\n\t\t\t\treturn $env;\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Invalid backend: \" . $data['EnvironmentType']);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public function getAdapter()\n\t{\n\t\treturn $this->config['adapter'];\n\t}", "public static function getEngine() {\n\t\tif(self::$engine == NULL)\n\t\t\tself::$engine = new self();\n\t\treturn self::$engine;\n\t}", "public function defaultEngine()\n\t{\n\t\t$result = $this->forceQuery( \"SHOW ENGINES\" );\n\n\t\twhile( $engine = $result->fetch_assoc() )\n\t\t{\n\t\t\tif( \\strtoupper( $engine['Support'] ) == 'DEFAULT' )\n\t\t\t{\n\t\t\t\treturn $engine['Engine'];\n\t\t\t}\n\t\t}\n\n\t\tif( \\IPS\\Db::i()->server_version < 50600 )\n\t\t{\n\t\t\treturn 'MyISAM';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'InnoDB';\n\t\t}\n\t}" ]
[ "0.7190013", "0.7158358", "0.7158358", "0.7158358", "0.7158358", "0.7147801", "0.7147801", "0.7147801", "0.7085785", "0.7085785", "0.7026126", "0.6999034", "0.69233555", "0.688366", "0.683487", "0.6812323", "0.6802913", "0.6795979", "0.6776267", "0.6615872", "0.654559", "0.6504516", "0.6416825", "0.6397639", "0.63724095", "0.63685906", "0.6345599", "0.6338554", "0.63368326", "0.63193846" ]
0.83037037
0
parse a url as a log dsn
public static function parse($url, $options = []) { $inst = new LogDsn($url, $options); return $inst->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function parseURL($url) {\n\t\t\t\t\n\t\t}", "protected static function parse_url($url)\n {\n }", "public static function parse_URL($url)\n {\n }", "function parseDSN($dsn)\n\t{\n\t\tif (is_array($dsn)) return $dsn;\n\t\t$parsed = parse_url($dsn);\n\t\tif (!$parsed) return null;\n\t\t$params = null;\n\t\tif (!empty($parsed['query'])) {\n\t\t\tparse_str($parsed['query'], $params);\n\t\t\t$parsed += $params;\n\t\t}\n\t\t$parsed['dsn'] = $dsn;\n\t\treturn $parsed;\n\t}", "function core_github_parse($url){\n\tpreg_match(\"/https:\\/\\/([^\\/]+)\\/(.*)/is\", $url, $matches);\n\t$return = array();\n\t$return['domain'] = $matches[1];\n\t$return['url'] = $matches[2];\n\treturn $return;\n}", "public function parse($url);", "function vap_url_parse ($url) {\n $sp = null;\n $sp2 = null;\n $len = null;\n $absurl = null;\n $urllen = null;\n $urlparse = null;\n\n if ($url == null) {\n return false;\n }\n\n if (strncasecmp($url, \"http://\", 7) == 0) {\n $urlparse['protocol'] = \"http\";\n $absurl = substr($url, 7);\n } else\n if (strncasecmp($url, \"https://\", 8) == 0) {\n $urlparse['protocol'] = \"https\";\n $absurl = substr($url, 8);\n } else {\n return false;\n }\n\n $urllen = strlen($absurl);\n\n if (($sp = strstr($absurl, \":\")) == null) {\n\n if (($sp = strstr($absurl, \"/\")) == null) {\n $urlparse['host'] = $absurl;\n $urlparse['file'] = \"/\";\n } else {\n $len = strlen($absurl) - strlen($sp);\n $urlparse['host'] = substr($absurl, 0, $len);\n $urlparse['file'] = $sp;\n }\n\n $urlparse['port'] = \"80\";\n } else {\n $len = strlen($absurl) - strlen($sp);\n\n $urlparse['host'] = substr($absurl, 0, $len);\n\n if (($sp2 = strstr($sp, \"/\")) == null) {\n $urlparse['port'] = substr($sp, 1);\n $urlparse['file'] = \"/\";\n } else {\n $len = null;\n\n $len = strlen($sp) - strlen($sp2) - 1;\n\n $urlparse['port'] = substr($sp, 1, $len);\n\n if (strcmp($sp2, substr($absurl, $urllen - 1)) == 0) {\n\n $urlparse['file'] = \"/\";\n } else {\n $urlparse['file'] = $sp2;\n }\n }\n }\n\n if (! eregi(\n \"([a-zA-Z0-9][a-zA-Z0-9_\\-\\.]*[a-zA-Z0-9]+\\.)([a-zA-Z0-9][a-zA-Z0-9_\\-]*[a-zA-Z0-9]+)(\\.cn$|\\.com$|\\.net$|\\.name$|\\.org$|\\.com\\.cn$|\\.com\\.ru$|\\.net\\.cn$|\\.org\\.cn$|\\.gov\\.cn$|\\.info$|\\.biz$|\\.tv$|\\.cc$)\",\n $urlparse['host'])) {\n return false;\n }\n\n if (! eregi(\n \"\\.([a-zA-Z0-9][a-zA-Z0-9_\\-]*[a-zA-Z0-9]+)(\\.cn$|\\.com$|\\.net$|\\.name$|\\.org$|\\.com\\.cn$|\\.com\\.ru$|\\.net\\.cn$|\\.org\\.cn$|\\.gov\\.cn$|\\.info$|\\.biz$|\\.tv$|\\.cc$)\",\n $urlparse['host'], $ee)) {\n return false;\n }\n\n $urlparse['domain'] = substr($ee[0], 1);\n\n if (! eregi(\"^[0-9]+$\", $urlparse['port'])) {\n return false;\n }\n\n return $urlparse;\n }", "private function log_url($args) {\n\n\t\t@preg_match('/((\\d+).(\\d+).(\\d+).(\\d+))/', $args[1], $ip);\n\t\t@$ip = $ip[0];\n\t\tmysql_query(\"INSERT INTO log SET source='$ip', destination='$args[0]'\");\n\n\t}", "private function extract_host($url) {\n\t\tpreg_match('/https?:\\/\\/(?:\\w+\\.)*(\\w+)(?:\\.\\w{2,3})/', $url, $match);\n\n\t\treturn $match[1];\n\t}", "function parseUrl($url)\n {\n $simple_url = \"/^(?:(?P<scheme>[^:\\/?#]+):\\/\\/)(?:(?P<userinfo>[^\\/@]*)@)?(?P<host>[^\\/?#]*)(?P<path>[^?#]*?(?:\\.(?P<format>[^\\.?#]*))?)?(?:\\?(?P<query>[^#]*))?(?:#(?P<fragment>.*))?$/i\";\n $url_parts = array();\n preg_match($simple_url, $url, $url_parts);\n return $url_parts;\n }", "private function parse_url( $url ) {\r\n\t\t$parsed_url = get_rocket_parse_url( $url );\r\n\r\n\t\t/** This filter is documented in inc/front/htaccess.php */\r\n\t\tif ( apply_filters( 'rocket_url_no_dots', false ) ) {\r\n\t\t\t$parsed_url['host'] = str_replace( '.', '_', $parsed_url['host'] );\r\n\t\t}\r\n\r\n\t\treturn $parsed_url;\r\n\t}", "function parseURL( $url ) {\n\n // Empty\n if ( empty( $url ) ) return null;\n\n // Regex\n $match = parse_url( $url );\n\n // Make sure URL is ok before returning...\n if ( empty( $match[ 'host' ] ) ) {\n\n return null;\n\n } else if ( !is_int( $match[ 'port' ] ) ) { // No port or not numeric, default to 80\n\n $match[ 'port' ] = 80;\n\n }\n\n // Host isn't empty, return :)\n return \"{$match['scheme']}://{$match['host']}:{$match['port']}\";\n\n }", "public function parseUrl($url)\r\n\t{\r\n\t\tpreg_match('`^([a-z0-9]+://)?([^/:]+)(/.*$)?`i', $url, $out);\r\n\r\n\t\t$components = parse_url($url);\r\n\t\t$scheme = $components['scheme'];\r\n\t\t$host = $components['host'];\r\n\t\t$path = $components['path'];\r\n\t\tif ($scheme == 'http')\r\n\t\t{\r\n\t\t\t$this->is_ssl = false;\r\n\t\t\t$this->port = 80;\r\n\t\t}\r\n\t\tif ($scheme == 'https')\r\n\t\t{\r\n\t\t\t$this->is_ssl = true;\r\n\t\t\t$this->port = 443;\r\n\t\t}\r\n\t\t$this->host = $host;\r\n\t\t$this->path = $path;\r\n\t}", "function parser_host($url) {\n\t$server = strtr($url, array(\"youtu.be/\" => \"youtube.com/watch?v=\", \"my1.imgsmail.ru\" => \"video.mail.ru\", \"vkontakte.ru\" => \"vk.com\", \"kwimg.kz\" => \"kiwi.kz\", \"-\" => \"\", \"video.rutube.ru\" => \"rutube.ru\", \"video.meta.ua\" => \"video.metas.ua\"));\n\t$host1 = explode(\"/\", strtr($server, array(\"http://\" => \"\", \"https://\" => \"\")));\n\t$server = current($host1);\n\tpreg_match('/[a-zA-Z0-9]+\\.[a-zA-Z0-9]{1,3}\\.[a-zA-Z0-9]{2,4}$|[a-zA-Z0-9]{4,}\\.[a-zA-Z0-9]{2,4}$/', $server, $host);\n\tif(isset($host[0]) && !empty($host[0])) {\n\t\t$loc = $host[0];\n\t} else {\n\t\t$loc = $server;\n\t}\n\t$ret = str_replace(array(\".com\", \".ru\", \".at.ua\", \".ua\", \".kz\", \".tv\", \".pro\", \".to\", \".net\", \".uz\", \"www.\", \".info\", \".\"), \"\", $loc);\n\t$ret = str_replace(\"mail\", \"mailru\", $ret);\n\tif(preg_match(\"#([0-9]+)#\", $ret)) {\n\t\t$ret = \"v\".$ret;\n\t}\nreturn $ret;\n}", "static function parseUrl($url) {\n\t\t$r = '!(?:(\\w+)://)?(?:(\\w+)\\:(\\w+)@)?([^/:]+)?(?:\\:(\\d*))?([^#?]+)?(?:\\?([^#]+))?(?:#(.+$))?!i';\n\t\tpreg_match ( $r, $url, $out );\n\t\treturn array(\n\t\t\t'full' => $out[0],\n\t\t\t'scheme' => $out[1],\n\t\t\t'username' => $out[2],\n\t\t\t'password' => $out[3],\n\t\t\t'domain' => $out[4],\n\t\t\t'host' => $out[4],\n\t\t\t'port' => $out[5],\n\t\t\t'path' => $out[6],\n\t\t\t'query' => $out[7],\n\t\t\t'fragment' => $out[8],\n\t\t);\n\t}", "function url_parts($url) {\n if (!preg_match('/^(?P<protocol_domain>(?P<protocol>https?\\:\\/+)(?P<domain>([^\\/\\W]|[\\.\\-])+))(?P<request_uri>(?P<pathname>(?P<path>\\/(.+\\/)?)?(?P<file>[^\\?\\#]+?)?)?(?P<query_string>\\?[^\\#]*)?)(\\#(?P<hash>.*))?$/',$url,$url_parts)) {\n echo debug_backtrace();\n throw new Exception(\"Invalid url: $url\");\n }\n return $url_parts;\n}", "function parseUrl($origin) {\n preg_match('<http.+/post/\\d+>', $origin, $new);\n\n return $new[0];\n}", "private function parseUrl($url): string {\n $splittedUrl = explode('/', $url);\n $newUrl = '';\n foreach ($splittedUrl as $partUrl) {\n if($partUrl !== '') {\n if($partUrl[0] === '{' && $partUrl[strlen($partUrl) - 1] === '}') {\n $newUrl.= '/VALUE';\n continue;\n }\n $newUrl .= '/' . $partUrl;\n }\n }\n return $newUrl;\n }", "function formatURL($url) {\n $url = trim($url, '/');\n if (!preg_match('#^http(s)?://#', $url)) {\n $url = 'http://' . $url;\n }\n $urlParts = parse_url($url);\n $domain = preg_replace('/^www\\./', '', $urlParts['host']);\n return $domain;\n}", "function url_parser($url) {\n$url = preg_replace('/(\\/{2,})/','//',$url);\n\n$parse_url = parse_url($url);\n\nif(empty($parse_url[\"scheme\"])) {\n $parse_url[\"scheme\"] = \"http\";\n}\nif(empty($parse_url[\"host\"]) && !empty($parse_url[\"path\"])) {\n // Strip slash from the beginning of path\n $parse_url[\"host\"] = ltrim($parse_url[\"path\"], '\\/');\n $parse_url[\"path\"] = \"\";\n} \n\n$return_url = \"\";\n\n// Check if scheme is correct\nif(!in_array($parse_url[\"scheme\"], array(\"http\", \"https\", \"gopher\"))) {\n $return_url .= 'http'.'://';\n} else {\n $return_url .= $parse_url[\"scheme\"].'://';\n}\n\n// Check if the right amount of \"www\" is set.\n$explode_host = explode(\".\", $parse_url[\"host\"]);\n\n// Remove empty entries\n$explode_host = array_filter($explode_host);\n// And reassign indexes\n$explode_host = array_values($explode_host);\n\n// Contains subdomain\nif(count($explode_host) > 2) {\n // Check if subdomain only contains the letter w(then not any other subdomain).\n if(substr_count($explode_host[0], 'w') == strlen($explode_host[0])) {\n // Replace with \"www\" to avoid \"ww\" or \"wwww\", etc.\n $explode_host[0] = \"www\";\n\n }\n}\n$return_url .= implode(\".\",$explode_host);\n\nif(!empty($parse_url[\"port\"])) {\n $return_url .= \":\".$parse_url[\"port\"];\n}\nif(!empty($parse_url[\"path\"])) {\n $return_url .= $parse_url[\"path\"];\n}\nif(!empty($parse_url[\"query\"])) {\n $return_url .= '?'.$parse_url[\"query\"];\n}\nif(!empty($parse_url[\"fragment\"])) {\n $return_url .= '#'.$parse_url[\"fragment\"];\n}\n\n\nreturn $return_url;\n}", "private static function parseURL($url) {\n if (($urlParts = @parse_url($url)) === false) {\n throw new \\Exception(\"$url is not a valid URL\");\n }\n if (!array_key_exists('port', $urlParts)) {\n $urlParts['port'] = self::DEFAULT_PORT;\n }\n return $urlParts;\n }", "function _parseUrl($url) {\n\n\t\t// parse url\n\t\t$url = array_merge(array('user' => null, 'pass' => null, 'path' => '/', 'query' => null, 'fragment' => null), parse_url($url));\n\t\t\n\t\t// set scheme\n\t\tif (!isset($url['scheme'])) {\n\t\t\t$url['scheme'] = 'http';\n\t\t}\n\n\t\t// set host\n\t\tif (!isset($url['host'])) {\n\t\t\t$url['host'] = $_SERVER['SERVER_NAME'];\n\t\t}\n\n\t\t// set port\n\t\tif (!isset($url['port'])) {\n\t\t\t$url['port'] = $url['scheme'] == 'https' ? 443 : 80;\n\t\t}\n\n\t\t// set path\n\t\tif (!isset($url['path'])) {\n\t\t\t$url['path'] = '/';\n\t\t}\n\t\t\n\t\treturn $url;\n\t}", "public function testParseDomainFromUrl()\n\t{\n\t\t$res = $this->object->getDomain('http://www.facebook.com/liren');\n\t\t$exp = 'facebook';\n\n\t $this->assertEquals($res, $exp, 'Domain name was not parsed correctly.');\n\n\t}", "private static function parseUrl($url)\n {\n //the valid url should be : http(s)://aaa.bbb.ccc/ddd/eee\n //so directly use / to explode:\n // http(s): / / aaa.bbb.ccc / ddd/eee\n // 0 1 2 3\n $splitArr = explode(\"/\", $url, 4);\n\n if (3 > sizeof($splitArr)) {\n return false;\n }\n\n $returnArr = array();\n\n $returnArr['protocol'] = substr($splitArr[0], 0, -1);\n\n //host may contain port number\n if (false !== strpos($splitArr[2], ':')) {\n $explodeHost = explode(':', $splitArr[2]);\n $returnArr['host'] = $explodeHost[0];\n $returnArr['port'] = (int)$explodeHost[1];\n } else {\n $returnArr['host'] = $splitArr[2];\n\n if ('http' === $returnArr['protocol']) {\n $returnArr['port'] = 80;\n } elseif ('https' === $returnArr['protocol']) {\n $returnArr['port'] = 443;\n } else {\n $returnArr['port'] = -1;\n }\n }\n\n if (isset($splitArr[3])) {\n $returnArr['resource'] = $splitArr[3];\n } else {\n $returnArr['resource'] = '';\n }\n\n if (\n '' === $returnArr['host'] or\n '' === $returnArr['protocol'] or\n '' === $returnArr['port']\n ) {\n return false;\n }\n\n return $returnArr;\n }", "protected function parseUrl(string $url)\n {\n $url_parts = Utils::multibyteParseUrl($url);\n\n if (isset($url_parts['scheme'])) {\n /** @var UniformResourceLocator $locator */\n $locator = Grav::instance()['locator'];\n\n // Special handling for the streams.\n if ($locator->schemeExists($url_parts['scheme'])) {\n if (isset($url_parts['host'])) {\n // Merge host and path into a path.\n $url_parts['path'] = $url_parts['host'] . (isset($url_parts['path']) ? '/' . $url_parts['path'] : '');\n unset($url_parts['host']);\n }\n\n $url_parts['stream'] = true;\n }\n }\n\n return $url_parts;\n }", "function _parse_url($url) {\n\t\tif (!preg_match('/http:\\/\\/www.last.fm\\/music\\/(.*?)\\/_\\/(.*)/', $url, $matches)) return false;\n\n\t\t$this->artist = $this->_decode($matches[1]);\n\t\t$this->name = $this->_decode($matches[2]);\n\t}", "function get_url_host($url)\n {\n $build_url = parse_url($url);\n return $build_url['scheme'] . '://' . $build_url['host'];\n }", "function cjpopups_parse_domain($url, $return = 'host'){\n\t// possible values host, path, scheme\n\t$parse = parse_url($url);\n\treturn $parse[$return];\n}", "function _parse_url($url) {\n\t\tif (!preg_match('/http:\\/\\/www.last.fm\\/music\\/(.*?)\\/(.*)/', $url, $matches)) return false;\n\n\t\t$this->artist = $this->_decode($matches[1]);\n\n\t}", "function aiGet2ndLvlDomainName($url) {\r\n static $doubleTlds = array('co.uk', 'me.uk', 'net.uk', 'org.uk', 'sch.uk', 'ac.uk', 'gov.uk', 'nhs.uk', 'police.uk', 'mod.uk', 'asn.au', 'com.au','net.au', 'id.au', 'org.au', 'edu.au', 'gov.au', 'csiro.au','br.com', 'com.cn', 'com.tw', 'cn.com', 'de.com', 'eu.com','hu.com', 'idv.tw', 'net.cn', 'no.com', 'org.cn', 'org.tw','qc.com', 'ru.com', 'sa.com', 'se.com', 'se.net', 'uk.com','uk.net', 'us.com', 'uy.com', 'za.com');\r\n\r\n // sanitize the URL\r\n $url = trim($url);\r\n\r\n // check if we can parse the URL\r\n if ($host = parse_url($url, PHP_URL_HOST)) {\r\n\r\n // check if we have IP address\r\n if (preg_match('/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/', $host)) {\r\n return $host;\r\n }\r\n\r\n // sanitize the hostname\r\n $host = strtolower($host);\r\n\r\n // get parts of the URL\r\n $parts = explode('.', $host);\r\n\r\n // if we have just one part (eg localhost)\r\n if (!isset($parts[1])) {\r\n return $parts[0];\r\n }\r\n\r\n // grab the TLD\r\n $tld = array_pop($parts);\r\n\r\n // grab the hostname\r\n $host = array_pop($parts) . '.' . $tld;\r\n\r\n // have we collected a double TLD?\r\n if (!empty($parts) && in_array($host, $doubleTlds)) {\r\n $host = array_pop($parts) . '.' . $host;\r\n }\r\n\r\n return $host;\r\n }\r\n\r\n return 'unknown domain';\r\n}" ]
[ "0.61583436", "0.59065944", "0.5868655", "0.58603984", "0.5765981", "0.5735782", "0.57347053", "0.56680137", "0.56613755", "0.5647521", "0.56222355", "0.5615698", "0.5603398", "0.5595814", "0.55361044", "0.55060124", "0.5461985", "0.54554796", "0.54172283", "0.5416639", "0.54040563", "0.54038686", "0.5392019", "0.53522295", "0.5350775", "0.53430915", "0.5314087", "0.5303709", "0.52601117", "0.525814" ]
0.6448802
1
Gets the value of the CurrencyCode property.
public function getCurrencyCode() { return $this->_fields['CurrencyCode']['FieldValue']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrencyCode()\n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->_currencyCode;\n }", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "public function getCurrencyCode(){\n if(!$this->currencyCode){\n return $this->currencyCode = Shop_CurrencySettings::get()->code;\n }\n return $this->currencyCode;\n }", "public function currencyCode()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencyCode();\n }", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getInvoiceCurrencyCode()\n {\n return $this->invoiceCurrencyCode;\n }", "public static function getCode()\n {\n return Currency::get('code', false);\n }", "public function getOrderCurrencyCode()\n {\n return $this->orderCurrencyCode;\n }", "public function getCurrentCurrencyCode()\n {\n if ($this->currentCurrencyCode === null) {\n $this->currentCurrencyCode = strtoupper(\n $this->getStore()->getCurrentCurrencyCode()\n );\n }\n\n return $this->currentCurrencyCode;\n }", "public function getCurrency()\n {\n if (is_null($this->currency)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CURRENCY);\n if (is_null($data)) {\n return null;\n }\n $this->currency = (string) $data;\n }\n\n return $this->currency;\n }", "public function getCurrentCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyCode();\r\n\t}", "public function getCurrency()\n {\n return $this->MoneyCurrency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return isset($this->Currency) ? $this->Currency : null;\n }", "public function getCurrency()\n {\n return $this->getData(self::CURRENCY);\n }" ]
[ "0.8591661", "0.8483913", "0.8483913", "0.8483913", "0.8483913", "0.8483913", "0.84665734", "0.813115", "0.7941929", "0.77447", "0.76291627", "0.76291627", "0.76291627", "0.7570783", "0.75682145", "0.7538617", "0.7508259", "0.73747396", "0.73710793", "0.7292958", "0.72928685", "0.72928685", "0.72928685", "0.72928685", "0.72928685", "0.72928685", "0.72928685", "0.72928685", "0.7281737", "0.7275788" ]
0.8508329
1
Checks if CurrencyCode is set
public function isSetCurrencyCode() { return !is_null($this->_fields['CurrencyCode']['FieldValue']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCurrencyCode($currencyCode);", "function setCurrencyCode($currencycode) {\n\t\tif (strlen($currencycode) == 3) {\n\t\t\t$this->currencycode = $currencycode;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid Currency Code\";\n\t\t}\n\t}", "function setCurrencyCode($currencycode) {\n\t\tif (strlen($currencycode) == 3) {\n\t\t\t$this->currencycode = $currencycode;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid Currency Code\";\n\t\t}\n\t}", "function setCurrencyCode(){\n switch($this->Currency){\n case \"USD\": $this->CurrencyCode = 840;\n break;\n case \"EUR\": $this->CurrencyCode = 978;\n break;\n case \"AUD\": $this->CurrencyCode = 036;\n break;\n case \"CAD\": $this->CurrencyCode = 124;\n break;\n case \"GBP\": $this->CurrencyCode = 826;\n break;\n case \"JPY\": $this->CurrencyCode = 392;\n break;\n }// end switch\n }", "public function checkCurrency()\n {\n $idCurrency = $this->context->cart->id_currency;\n\n $currency = new Currency($idCurrency);\n $moduleCurrencies = $this->getCurrency($idCurrency);\n\n if (is_array($moduleCurrencies)) {\n foreach ($moduleCurrencies as $moduleCurrency) {\n if ($currency->id == $moduleCurrency['id_currency']) {\n return true;\n }\n }\n }\n\n return false;\n }", "private function checkCurrency()\n {\n $currency_order = new Currency($this->context->cart->id_currency);\n $currencies_module = $this->module->getCurrency($this->context->cart->id_currency);\n // Check if cart currency is one of the enabled currencies\n if (is_array($currencies_module)) {\n foreach ($currencies_module as $currency_module) {\n if ($currency_order->id == $currency_module['id_currency']) {\n return true;\n }\n }\n }\n // Return false otherwise\n return false;\n }", "function tep_currency_exists($code) {\n $code = tep_db_prepare_input($code);\n\n $currency_code = tep_db_query(\"select currencies_id from \" . TABLE_CURRENCIES . \" where code = '\" . tep_db_input($code) . \"'\");\n if (tep_db_num_rows($currency_code)) {\n return $code;\n } else {\n return false;\n }\n }", "function CheckIfCurrencyExists($currency_code) {\n $query = \"SELECT * FROM conversion_rates WHERE currency='$currency_code';\";\n $result = mysqli_num_rows($GLOBALS['conn']->query($query));\n\n return ($result != 0) ? true : false;\n }", "public function setStoreCurrencyCode($code);", "public function isWithoutCurrencyCode(): bool\n {\n return self::ISO_STATUS_WITHOUT_CURRENCY_CODE === $this->isoStatus;\n }", "public function getCurrencyCode(){\n if(!$this->currencyCode){\n return $this->currencyCode = Shop_CurrencySettings::get()->code;\n }\n return $this->currencyCode;\n }", "public static function isValidCode($code): bool\n {\n if (array_key_exists($code, self::getInfoForCurrencies())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesIncomplete())) {\n return true;\n }\n\n return false;\n }", "public function setGlobalCurrencyCode($code);", "public function checkEqualToBalanceCurrency()\n {\n if ($this->balance->currency !== $this->currency) {\n $this->addError('currency', 'Operation currency must be equal ' . $this->balance->currency);\n return false;\n }\n\n return true;\n }", "public function setBaseCurrencyCode($code);", "public function testCurrencyValids($currencyOption)\n {\n static::callGetCurrency($currencyOption);\n }", "public function getCurrency()\n {\n if ($this->accountType !== 'starter') {\n return $this->request('currency');\n }\n\n $this->errors[ 301 ] = 'Unsupported Get Currency. Tipe akun starter tidak mendukung pengecekan currency.';\n\n return false;\n }", "function is_valid_for_use() {\n if ( ! in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_payu_supported_currencies', array( 'USD', 'UAH', 'RUB', 'TRY', 'EUR' ) ) ) ) return false;\n return true;\n }", "public function has($code) {\n\t\treturn array_key_exists(strtoupper($code), $this->currencies);\n\t}", "public function equals(Currency $currency): bool\n {\n return $currency->getCode() === $this->code;\n }", "function is_valid_for_use()\n {\n if (!in_array(get_option('woocommerce_currency'), array('RUB', 'USD'))) {\n return false;\n }\n\n return true;\n }", "public function setOrderCurrencyCode($code);", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "protected function formatCurrency()\n {\n // Remove any non-digits from the input.\n //TODO: Validate that any non-digits are valid currency characters.\n $input = preg_filter('/^\\D./', '', $this->input);\n\n if (empty($input)) {\n return true;\n }\n\n // Check that the remainder of the input matches an expected currency format.\n // This regex is provided by Tim Pietzcker here: http://stackoverflow.com/a/4983648.\n return (true == preg_match('/\\b\\d{1,3}(?:,?\\d{3})*(?:\\.\\d{2})?\\b/', $input));\n }", "public function isOriginalCurrency($code)\n {\n return $this->getOriginalCurrency() === strtoupper($code);\n }", "private static function validateCurrency(string $currency): bool\n {\n return in_array($currency, Operation::CURRENCIES);\n }", "public static function usesCurrency()\n {\n return static::$currency;\n }" ]
[ "0.6791662", "0.66001415", "0.66001415", "0.65941393", "0.6545575", "0.65001446", "0.64931166", "0.6310719", "0.62493145", "0.6245121", "0.6243182", "0.62299335", "0.62265265", "0.6215503", "0.61691916", "0.61512613", "0.61329395", "0.61286527", "0.6121935", "0.6098899", "0.6084083", "0.60547763", "0.60454434", "0.60454434", "0.60454434", "0.6044333", "0.60132617", "0.5992615", "0.5990228", "0.5979392" ]
0.761548
1
Checks if Amount is set
public function isSetAmount() { return !is_null($this->_fields['Amount']['FieldValue']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasAmount()\n {\n return isset($this->amount);\n }", "public function hasAmount(): bool\n {\n return isset($this->amount);\n }", "public function isEmptyAmount()\n {\n if ($this->amount == 0) {\n return true;\n }\n return false;\n }", "public function Amount($amount) {\n\t\t$this->Param('amount', $amount);\n\n\t\treturn true;\n\t}", "public function Amount($amount) {\n\t\t$this->Param('amount', $amount);\n\n\t\treturn true;\n\t}", "public function isSetTransactionAmount()\n {\n return !is_null($this->_fields['TransactionAmount']['FieldValue']);\n\n }", "public function issetPaymentAmount(): bool\n {\n return isset($this->paymentAmount);\n }", "protected function setAmount()\n {\n if ( ! isset( $_POST['amount'] ) ) {\n $this->error = true;\n $this->data['error']['amount'] = 'Please enter a donation amount.';\n return;\n }\n \n $amount = trim( $_POST['amount'] );\n\n // Remove illegal characters\n $regex = '/[[^0-9.]]/';\n $value = preg_replace( $regex, '', $amount );\n \n \tif ( $value && is_numeric( $value ) && $value > 0 ) {\n $value = floor( $value * 100 ); // Set the amount in cents.\n \t\t$this->data['amount'] = $value;\n \t} else {\n \t\t$this->data['amount'] = 0;\n \t}\n }", "public function isAmountAllowed()\n {\n $totalAmount = $this->getTotalAmount();\n $isCurrencyEuro = $this->isCurrencyEuro();\n\n if ($isCurrencyEuro && $totalAmount >=200 && $totalAmount <=5000) {\n return true;\n }\n\n return false;\n }", "public function isSomeAmountMissing(): bool\n {\n if ( $this->getAmountMissing() > 0 )\n return true;\n return false;\n }", "public function isAmountValid(TdbShopArticle $product, $requestedAmount);", "public function setAmount($amount);", "public function isByAmount(): bool\n {\n return $this -> charging_type == ChargingTypeEnum :: BY_AMOUNT;\n }", "public function hasAmountsInc()\n {\n return $this->AmountsInc !== null;\n }", "public function hasMoneytype(){\n return $this->_has(15);\n }", "public function hasAmountsDec()\n {\n return $this->AmountsDec !== null;\n }", "public function test_validate_amount()\n {\n $amount = 50;\n $amt = $this->obj->validate_amount($amount);\n $this->assertTrue(is_numeric($amount));\n $this->assertNotNull($amount);\n $this->assertGreaterThan(0,$amount);\n $this->assertTrue($amt);\n }", "public function setAmount()\n {\n $exact = $this->getOriginalPurgeValue('amount_exact');\n $percentage = $this->getOriginalPurgeValue('amount_percentage');\n\n $this->amount = $this->is_percentage\n ? $percentage\n : $exact;\n }", "public function isSetAmountDescription()\n {\n return !is_null($this->_fields['AmountDescription']['FieldValue']);\n }", "public function validateMinimumAmount()\n {\n return !(Mage::getStoreConfigFlag('sales/minimum_order/active')\n && Mage::getStoreConfigFlag('sales/minimum_order/multi_address')\n && !$this->getQuote()->validateMinimumAmount());\n }", "public function setAmount($amount){\n\n $this->amount = $amount;\n\n }", "function validateAmount($amount)\n{ \n return is_numeric($amount) && $amount > 0;\n}", "public function setAmount($amount)\n {\n $this->amount = Checker::int($amount, self::AMOUNT_MIN, self::AMOUNT_MAX, \"amount\");\n }", "function SetAmountSoldOutside ($amount = 0) {\n\t\n}", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "public function setAmount($value)\n\t{\n\t\treturn $this->set('Amount', $value);\n\t}", "public function isSetPaymentAmountType()\n {\n return !is_null($this->_fields['PaymentAmountType']['FieldValue']);\n }", "public function testAddAmount() {\n $amount = 1000;\n $date = '3/10/2015';\n $this->assertNull( $this->tranche->addAmount($amount, $date));\n }", "public function testAmountValidator()\n {\n $this->assertTrue(Validators\\AmountValidator::validateAmount(452.36));\n $this->assertTrue(Validators\\AmountValidator::validateAmount(0.36, 0.1));\n $this->assertFalse(Validators\\AmountValidator::validateAmount(-23.5));\n }" ]
[ "0.74502075", "0.7343876", "0.69951534", "0.6973139", "0.6973139", "0.68393075", "0.67648447", "0.668805", "0.6523347", "0.6479692", "0.64644533", "0.64603716", "0.6388301", "0.6384029", "0.63306344", "0.6271671", "0.6245531", "0.62161994", "0.61704725", "0.61674845", "0.6167089", "0.61138237", "0.6103992", "0.60736156", "0.60232085", "0.60232085", "0.60189813", "0.6008838", "0.59679943", "0.59635025" ]
0.75796276
1