query
stringlengths
10
8.11k
document
stringlengths
17
398k
negatives
sequencelengths
19
20
metadata
dict
The number of bytes that have been processed for the given resource. int64 committed_size = 1;
public function setCommittedSize($var) { GPBUtil::checkInt64($var); $this->committed_size = $var; }
[ "public function getCommittedSize()\n {\n return $this->committed_size;\n }", "public function getCommitCount();", "public function getSize(): int\n {\n return $this->buffer->getSize();\n }", "public function getCommittedBlockCount()\n {\n return $this->committedBlockCount;\n }", "public function getSize()\n {\n if ($this->size === null && $this->resource !== null) {\n $stats = fstat($this->resource);\n if (isset($stats['size'])) {\n $this->size = $stats['size'];\n }\n }\n return $this->size;\n }", "public function getProcessedBytes()\n {\n return $this->processed_bytes;\n }", "public function getPendingOperations() : int\n {\n return $this->bufferSize;\n }", "public function size()\n {\n return intval($this->fileData('bytes'));\n }", "public function getInternalSize()\n {\n return strlen($this->buffer);\n }", "public function getProcessedCount(): int\n {\n return $this->saveCounters[MigrateIdMapInterface::STATUS_IMPORTED] +\n $this->saveCounters[MigrateIdMapInterface::STATUS_NEEDS_UPDATE] +\n $this->saveCounters[MigrateIdMapInterface::STATUS_IGNORED] +\n $this->saveCounters[MigrateIdMapInterface::STATUS_FAILED];\n }", "public function getUsedBytes()\n {\n // Check connection\n if(!$this->connection)\n {\n // Cannot transact without an active connection\n $this->parent->log('Cannot perform RSC transactions when not connected.');\n return false;\n }\n \n // Obtain the container name\n $containerName = $this->parent->config->get('com.b2bfront.rackspace.container', true);\n \n $this->parent->log('Attempting to open RSC container: ' . $containerName);\n \n // Open container\n $container = $this->connection->get_container($containerName);\n \n // Get object list\n $objects = $container->get_objects();\n \n // Add sizes\n $totalSize = 0;\n foreach($objects as $object)\n {\n $totalSize += $object->content_length;\n }\n \n return $totalSize;\n }", "private function getTotalBytes()\n {\n $total = 0;\n\n foreach ($this->filesToDelete() as $path)\n {\n $total += $this->phar[$path]->getCompressedSize();\n }\n\n foreach ($this->filesToSet() as $path)\n {\n $total += filesize($path);\n }\n\n return $total;\n }", "public function getUploadSize()\n\t{\n\t\t$iter = $this->files->getIterator();\n\t\t$result = 0;\n\t\t\n\t\t/* @var $file SplFileInfo */\n\t\tforeach ($this->files as $file)\n\t\t{\n\t\t\t$result += $file->getSize();\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function getTotalFileSize(){\n\t\treturn $this->getFileSize();\n\t}", "protected function getStreamSize(): int\n {\n $size = 0;\n $it = clone $this->files;\n $it->rewind();\n\n foreach($it as $file) { $size += filesize($file); }\n\n return $size;\n }", "public function getProcessedCount()\n {\n return $this->processed_count;\n }", "public function size() : int\n {\n if ($this->bufSize == null) {\n $this->bufSize = strlen($this->buf);\n }\n return $this->bufSize;\n }", "public function size()\n {\n return intval($this->objectData('bytes', 0));\n }", "function get_bytes_uploaded()\n {\n if (!@$this->_is_valid_handle())\n {\n return FALSE;\n }\n $ret = @curl_getinfo($this->handle_id, CURLINFO_SIZE_UPLOAD);\n $this->_check_error();\n return $ret;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the deviation to the desired height specified by $this>getDesiredHeight().
public function getBiasFromDesiredHeight() : float { return abs($this->getHeightWithoutMargin() - $this->getDesiredHeight()); }
[ "public function getHeight() : float\n {\n return $this->height;\n }", "public function getHeight() {\n\t\treturn $this->getAttribute( 'height' );\n\t}", "public function getCalulatedHeight();", "public function getHeight() {\n return $this->dimensions->height;\n }", "function getHeight() {\n\t\treturn $this->getData('height');\n\t}", "public function getHeight() { return $this->height; }", "private function getHeight() {\n return $this->properties->getWidgetProperty(self::PROPERTY_HEIGHT);\n }", "public function getHeight() : int {\n return $this -> height;\n }", "public function getBestHeight()\n {\n return $this->best_height;\n }", "public function getHeightSq();", "public function get_height();", "public final function getHeight()\n {\n return $this->googleVisualization->getHeight();\n }", "public function getMaturityHeight()\n {\n return $this->maturity_height;\n }", "public function getDeviation()\n {\n return $this->deviation;\n }", "public function getSecondHeight()\n {\n return $this->secondHeight;\n }", "function _getDiameter()\n {\n $diameter = 0;\n if ($this->_diameter === false) {\n $diameter = min($this->height(), $this->width()) * 0.75;\n }\n else {\n if ($this->_diameter === 'max') {\n $diameter = min($this->height(), $this->width());\n }\n elseif ($this->_diameter < 0) {\n $diameter = min($this->height(), $this->width()) + $this->_diameter;\n } else {\n $diameter = $this->_diameter;\n }\n }\n return $diameter;\n }", "public function getHeight() {\n return $this->_getGridParam('height');\n }", "public function getHeight() {\n\t\treturn $this->image['height'];\n\t}", "public function getHeight() {\n return $this->imageInfo['height'];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function name: setUserStatus Return type : Boolean Date created : 20th April 2013 Date last modified : 20th April 2013 Author : Deepesh Pathak Last modified by : Deepesh Pathak Comments: Change User status. User instruction: $objUser>setUserStatus($argArrPOST)
function setUserStatus($argArrPOST) { $objCore = new Core(); $varMessage=''; foreach($argArrPOST['frmUsersID'] as $varUsersID) { /* To get the page status */ //Listing related child category $varUsersWhereCon = 'pkMailingList = \''.$varUsersID.'\''; $arrUsersClms = array('MailingListStatus' => $argArrPOST['frmChangeAction'],'MailingListDateUpdated' =>'now()'); $varaffectedRecord = $this->update(TABLE_MAILING_LIST, $arrUsersClms, $varUsersWhereCon); } if($argArrPOST['frmChangeAction'] == 'Approve') { $objCore->setSuccessMsg(ADMIN_MAILING_REQUEST_STATUS_APPROVE_SUCCESS_MSG); return true; } else { $objCore->setSuccessMsg(ADMIN_MAILING_REQUEST_STATUS_DISAPPROVE_SUCCESS_MSG); return true; } }
[ "public function changeStatus($user_id,$status);", "function _check_set_status()\n {\n if( $_POST['status_orig'] != (int)$_POST['status'] )\n {\n // check permission\n $_success = $this->B->F( USER_FILTER,\n 'permission',\n array( 'action' => 'set_status',\n 'user_id' => (int) $_POST['uid'])); \n \n if(FALSE == $_success)\n {\n $this->B->tpl_error = 'You can not change status of this user!';\n return FALSE;\n }\n } \n return TRUE;;\n }", "public function changeuserstatusAction() {\n global $mySession;\n $db = new Db();\n $BcID = $_REQUEST['Id'];\n $status = $_REQUEST['Status'];\n if ($status == '1') {\n $status = '0';\n } else {\n $status = '1';\n }\n $data_update['user_status'] = $status;\n $condition = \"user_id='\" . $BcID . \"'\";\n $db->modify(USERS, $data_update, $condition);\n exit();\n }", "public function change_user_status(){\n\t\tif ($this->checkLogin('CA') == ''){\n\t\t\tredirect('deals_crm');\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$user_id = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $user_id);\n\t\t\t$this->user_model->update_details(USERS,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','User Status Changed Successfully');\n\t\t\tredirect('crmadmin/users/display_user_list');\n\t\t}\n\t}", "public function setUserStatus($userStatus) {\n\t\t$this->userStatus = $userStatus;\n\t}", "function updateUserStatus($a_user_id = 0)\n {\n global $ilUser;\n\n if ($a_user_id == 0)\n {\n $a_user_id = $ilUser->getId();\n }\n $st = $this->determineStatusOfUser($a_user_id);\n\n include_once(\"./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphorusMembers.php\");\n ilEphorusMembers::_writeStatus($this->getId(), $a_user_id, $st[\"overall_status\"]);\n }", "public function change_status_staff_user_post(){\n try{\n $staff_user_id = $this->post_data['staff_user_id'];\n $status = $this->post_data['status'];\n\n if (empty($staff_user_id) || empty($status)) {\n $this->bad_request();\n }\n // TODO : need to check implement in permission\n $result = $this->db->update(TBL_USERS,array('user_status' => $status),array('user_id' => $staff_user_id));\n if($result){\n $where = array(\n \"udt_u_id\" => $staff_user_id\n );\n \n $this->Common_model->delete_data(TBL_USER_DEVICE_TOKENS, $where);\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('clinic_staff_status_success');\n }else{\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('clinic_staff_status_error');\n }\n $this->send_response();\n }catch(Exception $ex){\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "function _ereolen_support_change_jira_user_status($jiraUser, $form_state) {\n $data = [\n 'active' => true,\n ];\n $requestParts = _ereolen_support_get_request_parts('PUT', $data);\n $result = drupal_http_request($requestParts['jira_path'] . '/user?username=' . $jiraUser->name, $requestParts['options']);\n if (_ereolen_support_result_confirmed($result)){\n $jiraUser = json_decode($result->data);\n }\n\n return $jiraUser;\n}", "function aiowps_set_user_account_status($user_id, $status)\r\n {\r\n global $wpdb, $aio_wp_security;\r\n $res = update_user_meta($user_id, 'aiowps_account_status', $status);\r\n if (!$res){\r\n $aio_wp_security->debug_logger->log_debug(\"aiowps_set_user_account_status: Error updating user meta data: aiowps_account_status\",4);\r\n }\r\n }", "public function verify_user_status()\n\t{\n\t\techo(\"inside function\");\n\t\tif ($this->checkLogin('A') == '') \n\t\t{\n\t\t\tredirect('admin');\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$mode = $this->uri->segment(4, 0);\n\t\t\t$user_id = $this->uri->segment(5, 0);\n\t\t\t$status = ($mode == '0') ? 'No' : 'Yes';\n\t\t\t$newdata = array('is_verified' => $status);\n\t\t\t$condition = array('id' => $user_id);\n\t\t\t$this->user_model->update_details(USERS, $newdata, $condition);\n\t\t\t$this->setErrorMessage('success', 'User Status Changed Successfully');\n\t\t\tredirect('admin/users/display_user_list');\n\t\t}\n\t}", "public function userTypeChangeStatus($status)\n\t\t\t{\n\t\t\t\t$type_ids = $this->fields_arr['type_ids'];\n\t\t\t\t$sql = 'UPDATE '.$this->CFG['db']['tbl']['user_type_settings'].\n\t\t\t\t\t\t' SET type_status = '.$this->dbObj->Param($status).\n\t\t\t\t\t\t' WHERE type_id IN ('.$type_ids.')';\n\n\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t$rs = $this->dbObj->Execute($stmt, array($status));\n\t\t\t\tif (!$rs)\n\t\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\t\treturn true;\n\t\t\t}", "public function setStatusType(){\n\t try{\n\t\t\t$this->getData['modify_by'] = $this->Useconfig['user_id'];\n\t\t\t$this->getData['modify_ip'] = commonfunction::loggedinIP();\n\t\t\t$this->getData['modify_date'] = '';\n\t\tif(isset($this->getData['table']) && $this->getData['table'] == 'master'){\n\t\t\t\t$where = 'master_id ='.$this->getData['errorID'];\n\t\t\t\treturn ($this->UpdateInToTable(STATUS_MASTER,array($this->getData),$where)) ? TRUE : FALSE;\n\t\t}elseif(isset($this->getData['table']) && $this->getData['table'] == 'list'){\n\t\t\t\t$where = 'error_id ='.$this->getData['errorID'];\n\t\t\t\treturn ($this->UpdateInToTable(STATUS_LIST,array($this->getData),$where)) ? TRUE : FALSE;\n\t\t}else{\n\t\t\t\treturn false;\n\t\t\t\n\t\t}\n\t }catch (Exception $e) {\n\t\t\t\t\t $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\t }\n }", "function ChangeReviewStatus($argArrPOST)\n\t\t{\n \n $varWhereCon = 'PageName='.\"'$argArrPOST'\";\n //echo $varWhereCon;die;\n $arrClms = array('PageStatus' => 'Review','PageDateModified' =>'now()');\n $varaffectedRecord = $this->update(TABLE_PAGES, $arrClms, $varWhereCon);\n return true;\n\t\t}", "public function statusUpdate($user_id='', $status='')\n {\n //Ban status 0 - Active; 1 - Banned\n $where_array = array('user_id' => $user_id); \n $this->mcommon->common_edit('users', array('banned' => $status), $where_array);\n\n if($status == '1')\n { \n $this->session->set_flashdata('msg', 'Success! User Has Been Deactivated');\n $this->session->set_flashdata('alertType', 'danger');\n redirect(base_url('modules/users/add'));\n }else\n {\n $this->session->set_flashdata('msg', 'Success! User Has Been Activated');\n $this->session->set_flashdata('alertType', 'success');\n redirect(base_url('modules/users/add'));\n }\n }", "public function update_user_status( $user, $status ) {\n $user_id = absint( $user );\n if ( !$user_id ) {\n return false;\n }\n\n if ( !in_array( $status, array( 'approve', 'deny' ) ) ) {\n return false;\n }\n\n $do_update = apply_filters( 'new_user_approve_validate_status_update', true, $user_id, $status );\n if ( !$do_update ) {\n return false;\n }\n\n // where it all happens\n do_action( 'new_user_approve_' . $status . '_user', $user_id );\n do_action( 'new_user_approve_user_status_update', $user_id, $status );\n\n return true;\n }", "function change_user_status($id) {\n\t\tif($this->aauth->is_banned($id)) {\n\t\t\t$this->aauth->unban_user($id);\n\t\t} else {\n\t\t\t$this->aauth->ban_user($id);\n\t\t}\n\n\t\techo json_encode([\n\t\t\t'status' => true,\n\t\t\t'message' => 'User status successfully!',\n\t\t\t'goto' => base_url('admin/users')\n\t\t]);\n\t}", "public static function update_system_calender_status($user_id,$status){\n $model \t\t= User_model::find($user_id);\n $model->system_calender_status \t= $status;\n $saved \t\t= $model->save();\n if(!$saved){\n return false;\n }\n return true;\n }", "public function updateUserStatus($userId, $status) {\r\n $this->user->update(array('activated' => $status), \"id = $userId\");\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new violation with the message and adds it to this list.
public function addViolationWithMessage(TranslatableMarkup $message, $uuid = NULL) { $violation = new IntegrityViolation(); $violation->setMessage($message); $violation->setUuid($uuid); $this[] = $violation; }
[ "public function addViolation(string $message, array $params = []);", "public function addViolation($message, array $parameters = [])\n {\n $this->violations[] = [\n 'path' => $this->path,\n 'message' => vsprintf($message, $parameters),\n ];\n }", "public function addViolation(string $source, string $msg, int $line, int $start = 0, int $end = -1): void\n {\n $this->violations[] = new Violation($source, $msg, $line, $start, $end);\n }", "public function addViolation(Violation $violation)\n {\n $this->violations[] = $violation;\n }", "public static function createFromViolationList(ConstraintViolationListInterface $violationList)\n {\n $message = sprintf(\n \"Validation failed because of %s :\\n\",\n (count($violationList) > 1 ? 'these violations' : 'this violation')\n );\n\n foreach ($violationList as $key => $violation) {\n /** @var ConstraintViolationInterface $violation */\n $message .= sprintf(\"%s : %s\\n\", $violation->getPropertyPath(), $violation->getMessage());\n }\n\n $exception = new self($message);\n $exception->violationList = $violationList;\n\n return $exception;\n }", "function setViolation($message, $delta) {\n $this->context->buildViolation($message)\n ->atPath((string) $delta)\n ->addViolation();\n }", "protected function addViolation(ConstraintViolationListInterface $violations)\n {\n foreach ($violations as $violation) {\n $this->context->buildViolation($violation->getMessage())->addViolation();\n }\n }", "public function setFieldViolations($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Rpc\\BadRequest\\FieldViolation::class);\n $this->field_violations = $arr;\n\n return $this;\n }", "public function testGetValidViolationByViolationCode(): void {\n\t\t// count number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"violation\");\n\n\t\t//create a new Violation and insert into mySQL\n\t\t$violation = new Violation(null, $this->category->getCategoryId(), $this->VALID_VIOLATIONCODE, $this->VALID_VIOLATIONCODEDESCRIPTION);\n\t\t$violation->insert($this->getPDO());\n\n\t\t//grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Violation::getViolationByViolationCode($this->getPDO(), $violation->getViolationCode());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"violation\"));\n\t\t$this->assertCount(1, $results);\n\n\t\t//enforce no other objects are bleeding into the test\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Foodquisition\\\\Violation\", $results);\n\n\t\t//grab the result from the array and validate it\n\t\t$pdoViolation = $results[0];\n\t\t$this->assertEquals($pdoViolation->getViolationCategoryId(), $this->category->getCategoryId());\n\t\t$this->assertEquals($pdoViolation->getViolationCode(), $this->VALID_VIOLATIONCODE);\n\t\t$this->assertEquals($pdoViolation->getViolationCodeDescription(), $this->VALID_VIOLATIONCODEDESCRIPTION);\n\t}", "public function addConstraintViolation(ConstraintViolation $constraintViolation): void\n {\n $this->constraintViolations[] = $constraintViolation;\n }", "public function setViolations($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Rpc\\PreconditionFailure\\Violation::class);\n $this->violations = $arr;\n\n return $this;\n }", "public function testInsertValidViolation(): void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"violation\");\n\n\t\t//create a new Violation and insert to into mySQL\n\t\t$violation = new Violation(null, $this->category->getCategoryId(), $this->VALID_VIOLATIONCODE, $this->VALID_VIOLATIONCODEDESCRIPTION);\n\t\t$violation->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoViolation = Violation::getViolationByViolationId($this->getPDO(), $violation->getViolationId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"violation\"));\n\t\t$this->assertEquals($pdoViolation->getViolationCategoryId(), $this->category->getCategoryId());\n\t\t$this->assertEquals($pdoViolation->getViolationCode(), $this->VALID_VIOLATIONCODE);\n\t\t$this->assertEquals($pdoViolation->getViolationCodeDescription(), $this->VALID_VIOLATIONCODEDESCRIPTION);\n\t}", "protected function checkForConstraintViolation($message)\n {\n if ($message[0] = 23000) {\n throw new ConstraintViolationException('Constraint violation on insert into \"' . $this->table . '\": ' . $message[2]);\n }\n }", "public function testGetValidViolationByViolationCodeDescription(): void {\n\t\t// count number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"violation\");\n\n\t\t//create a new Violation and insert into mySQL\n\t\t$violation = new Violation(null, $this->category->getCategoryId(), $this->VALID_VIOLATIONCODE, $this->VALID_VIOLATIONCODEDESCRIPTION);\n\t\t$violation->insert($this->getPDO());\n\n\t\t//grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Violation::getViolationByViolationCodeDescription($this->getPDO(), $violation->getViolationCodeDescription());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"violation\"));\n\t\t$this->assertCount(1, $results);\n\n\t\t//enforce no other objects are bleeding into the test\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Foodquisition\\\\Violation\", $results);\n\n\t\t//grab the result from the array and validate it\n\t\t$pdoViolation = $results[0];\n\t\t$this->assertEquals($pdoViolation->getViolationCategoryId(), $this->category->getCategoryId());\n\t\t$this->assertEquals($pdoViolation->getViolationCode(), $this->VALID_VIOLATIONCODE);\n\t\t$this->assertEquals($pdoViolation->getViolationCodeDescription(), $this->VALID_VIOLATIONCODEDESCRIPTION);\n\t}", "protected function checkViolations(ConstraintViolationListInterface $violations, $msgTemplate = ArticleController::VLD_MSG_TEMPLATE, $msgParam = ArticleController::VLD_MSG_TEMPLATE_PARAM)\n {\n if(count($violations) > 0) {\n $message = $msgTemplate;\n foreach($violations as $violation) {\n $message .= sprintf($msgParam, $violation->getPropertyPath(), $violation->getMessage());\n }\n throw new ResourceValidationException($message);\n }\n }", "public function addViolationAt($subPath, $message, array $params = array(), $invalidValue = null, $pluralization = null, $code = null);", "public function addWarning($message);", "public function __construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null)\n {\n $this->violations = $violations;\n $this->message = $message;\n $this->parameters = $parameters;\n $this->root = $root;\n $this->propertyPath = $propertyPath;\n $this->invalidValue = $invalidValue;\n $this->translator = $translator;\n $this->translationDomain = $translationDomain;\n $this->constraint = $constraint;\n }", "public function setViolations($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Rpc\\QuotaFailure\\Violation::class);\n $this->violations = $arr;\n\n return $this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation addItemSerialAsyncWithHttpInfo Create an itemSerial
public function addItemSerialAsyncWithHttpInfo($body) { $returnType = '\Infoplus\Infoplus\Model\ItemSerial'; $request = $this->addItemSerialRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content); } } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; }, function ($exception) { $response = $exception->getResponse(); $statusCode = $response->getStatusCode(); throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } ); }
[ "public function addItemSerialTagAsyncWithHttpInfo($item_serial_id, $item_serial_tag)\n {\n $returnType = '';\n $request = $this->addItemSerialTagRequest($item_serial_id, $item_serial_tag);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "protected function addItemSerialTagRequest($item_serial_id, $item_serial_tag)\n {\n // verify the required parameter 'item_serial_id' is set\n if ($item_serial_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $item_serial_id when calling addItemSerialTag'\n );\n }\n // verify the required parameter 'item_serial_tag' is set\n if ($item_serial_tag === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $item_serial_tag when calling addItemSerialTag'\n );\n }\n\n $resourcePath = '/beta/itemSerial/{itemSerialId}/tag/{itemSerialTag}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($item_serial_id !== null) {\n $resourcePath = str_replace(\n '{' . 'itemSerialId' . '}',\n ObjectSerializer::toPathValue($item_serial_id),\n $resourcePath\n );\n }\n // path params\n if ($item_serial_tag !== null) {\n $resourcePath = str_replace(\n '{' . 'itemSerialTag' . '}',\n ObjectSerializer::toPathValue($item_serial_tag),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function updateItemSerialAsyncWithHttpInfo($body)\n {\n $returnType = '';\n $request = $this->updateItemSerialRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "protected function addItemSerialRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addItemSerial'\n );\n }\n\n $resourcePath = '/beta/itemSerial';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function getItemSerialByIdRequest($item_serial_id)\n {\n // verify the required parameter 'item_serial_id' is set\n if ($item_serial_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $item_serial_id when calling getItemSerialById'\n );\n }\n\n $resourcePath = '/beta/itemSerial/{itemSerialId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($item_serial_id !== null) {\n $resourcePath = str_replace(\n '{' . 'itemSerialId' . '}',\n ObjectSerializer::toPathValue($item_serial_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function addItemSerialTagWithHttpInfo($item_serial_id, $item_serial_tag)\n {\n $returnType = '';\n $request = $this->addItemSerialTagRequest($item_serial_id, $item_serial_tag);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function addItemSerialTagAsync($item_serial_id, $item_serial_tag)\n {\n return $this->addItemSerialTagAsyncWithHttpInfo($item_serial_id, $item_serial_tag)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "protected function addItemSerialFileByURLRequest($body, $item_serial_id)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addItemSerialFileByURL'\n );\n }\n // verify the required parameter 'item_serial_id' is set\n if ($item_serial_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $item_serial_id when calling addItemSerialFileByURL'\n );\n }\n\n $resourcePath = '/beta/itemSerial/{itemSerialId}/file';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($item_serial_id !== null) {\n $resourcePath = str_replace(\n '{' . 'itemSerialId' . '}',\n ObjectSerializer::toPathValue($item_serial_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function updateItemSerialWithHttpInfo($body)\n {\n $returnType = '';\n $request = $this->updateItemSerialRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function addItemSerialSchemeWithHttpInfo($body)\n {\n $returnType = '\\Infoplus\\Infoplus\\Model\\ItemSerialScheme';\n $request = $this->addItemSerialSchemeRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Infoplus\\Infoplus\\Model\\ItemSerialScheme',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 405:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Infoplus\\Infoplus\\Model\\ApiResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "protected function addItemSerialAuditRequest($item_serial_id, $item_serial_audit)\n {\n // verify the required parameter 'item_serial_id' is set\n if ($item_serial_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $item_serial_id when calling addItemSerialAudit'\n );\n }\n // verify the required parameter 'item_serial_audit' is set\n if ($item_serial_audit === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $item_serial_audit when calling addItemSerialAudit'\n );\n }\n\n $resourcePath = '/beta/itemSerial/{itemSerialId}/audit/{itemSerialAudit}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($item_serial_id !== null) {\n $resourcePath = str_replace(\n '{' . 'itemSerialId' . '}',\n ObjectSerializer::toPathValue($item_serial_id),\n $resourcePath\n );\n }\n // path params\n if ($item_serial_audit !== null) {\n $resourcePath = str_replace(\n '{' . 'itemSerialAudit' . '}',\n ObjectSerializer::toPathValue($item_serial_audit),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function addItemSerialFileByURLWithHttpInfo($body, $item_serial_id)\n {\n $returnType = '';\n $request = $this->addItemSerialFileByURLRequest($body, $item_serial_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function addItemSerialSchemeTagAsyncWithHttpInfo($item_serial_scheme_id, $item_serial_scheme_tag)\n {\n $returnType = '';\n $request = $this->addItemSerialSchemeTagRequest($item_serial_scheme_id, $item_serial_scheme_tag);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "protected function deleteItemSerialRequest($item_serial_id)\n {\n // verify the required parameter 'item_serial_id' is set\n if ($item_serial_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $item_serial_id when calling deleteItemSerial'\n );\n }\n\n $resourcePath = '/beta/itemSerial/{itemSerialId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($item_serial_id !== null) {\n $resourcePath = str_replace(\n '{' . 'itemSerialId' . '}',\n ObjectSerializer::toPathValue($item_serial_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function addItemSerialScheme($body)\n {\n list($response) = $this->addItemSerialSchemeWithHttpInfo($body);\n return $response;\n }", "protected function getItemSerialTagsRequest($item_serial_id)\n {\n // verify the required parameter 'item_serial_id' is set\n if ($item_serial_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $item_serial_id when calling getItemSerialTags'\n );\n }\n\n $resourcePath = '/beta/itemSerial/{itemSerialId}/tag';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($item_serial_id !== null) {\n $resourcePath = str_replace(\n '{' . 'itemSerialId' . '}',\n ObjectSerializer::toPathValue($item_serial_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getItemSerialTagsWithHttpInfo($item_serial_id)\n {\n $returnType = '';\n $request = $this->getItemSerialTagsRequest($item_serial_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "public function addItemReceiptActivityAsyncWithHttpInfo($body)\n {\n $returnType = '\\Infoplus\\Infoplus\\Model\\ItemReceiptActivity';\n $request = $this->addItemReceiptActivityRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function getItemSerialFilesAsyncWithHttpInfo($item_serial_id)\n {\n $returnType = '';\n $request = $this->getItemSerialFilesRequest($item_serial_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves qualified name of a given short name
public function qualifiedNameOf($short) { if (strstr($short, '.')) { $q= $short; } else { $q= $this->getMapping($short); } if (!$this->current) return $q; $current= $this->current->qualifiedName(); if ($current === $q) { // If this class is the same as the current, use "self" keyword return 'self'; } else if (substr($current, 0, strrpos($current, '.')) == substr($q, 0, strrpos($q, '.'))) { // If this class is in the same package as the current omit package name return substr($q, strrpos($q, '.')+ 1); } return $q; }
[ "public function getFQCN($shortName)\n {\n $useStatements = $this->getUseStatements();\n foreach ($useStatements as $useStatement) {\n if ($useStatement['as'] === stripslashes($shortName) || substr($useStatement['as'], -strlen($shortName)) === $shortName) {\n return $useStatement['class'];\n }\n }\n return $shortName;\n }", "private function get_full_name( $short )\n {\n switch( $short )\n {\n case 'ff':\n return __( 'Firefox', 'advanced-browser-check' );\n case 'chrome':\n return __( 'Chrome', 'advanced-browser-check' );\n case 'safari':\n return __( 'Safari', 'advanced-browser-check' );\n case 'opera':\n return __( 'Opera', 'advanced-browser-check' );\n case 'ie':\n return __( 'Internet Explorer', 'advanced-browser-check' );\n case 'edge':\n return __( 'Edge', 'advanced-browser-check' );\n default:\n return __( 'other', 'advanced-browser-check' );\n }\n }", "public function resolveNamespace($short)\n\t{\n\t\tif (isset($this->aliases[$short]))\n\t\t{\n\t\t\tLogger::get()->{ConfigStore::get('log.aliases')}('Aliases: Matched in the list of known aliases.', array($short, $this->aliases[$short]));\n\n\t\t\treturn $this->aliases[$short];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Handle implicit aliases in the same namespace.\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$namespace = $this->class->getNamespaceName() . '\\\\' . $short;\n\t\t\t\tnew ReflectionClass($namespace);\n\n\t\t\t\tLogger::get()->{ConfigStore::get('log.aliases')}('Aliases: Matched in the current namespace.', array($short, $namespace));\n\n\t\t\t\t// If we didn't throw an exception, we're good.\n\t\t\t\treturn $namespace;\n\t\t\t}\n\t\t\tcatch (ReflectionException $e)\n\t\t\t{\n\t\t\t\t// Handle implicit namespaces in an extended/implemented namespace.\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->namespaces as $ns)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$namespace = $ns . '\\\\' . $short;\n\t\t\t\t\t\t\tnew ReflectionClass($namespace);\n\n\t\t\t\t\t\t\tLogger::get()->{ConfigStore::get('log.aliases')}('Aliases: Matched in an extended/implemented namespace.', array($short, $namespace));\n\n\t\t\t\t\t\t\t// If we didn't throw an exception, we're good.\n\t\t\t\t\t\t\treturn $namespace;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (ReflectionException $e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tthrow new ReflectionException();\n\t\t\t\t}\n\t\t\t\tcatch (ReflectionException $e)\n\t\t\t\t{\n\t\t\t\t\t// Try removing the beginning '\\' to see if we find a match.\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$class = preg_replace('/^\\\\\\/', '', $short);\n\t\t\t\t\t\tnew ReflectionClass($class);\n\n\t\t\t\t\t\tLogger::get()->{ConfigStore::get('log.aliases')}('Aliases: Matched by stripping the \\ prefix.', array($short, $class));\n\n\t\t\t\t\t\t// If we didn't throw an exception, we're good.\n\t\t\t\t\t\treturn $class;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Complain and return the class name as-is.\n\t\t\t\t\tcatch (ReflectionException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$formatter = ConsoleUtil::formatters();\n\t\t\t\t\t\tInconsistency::add($class . $formatter->gold->apply(' => No match found for ' . $short . ' (' . SystemStore::get('_.current') . ')'));\n\t\t\t\t\t\tLogger::get()->{ConfigStore::get('log.aliases')}('Aliases: No match found.', array($short));\n\n\t\t\t\t\t\t// No match. Return it as-is (without any starting backslash).\n\t\t\t\t\t\treturn $class;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function macro_get_class_short_name($class)\n{\n $parts = explode('\\\\', $class);\n\n return array_pop($parts);\n}", "public function getFullClassName($short_class_name)\n\t{\n\t\tif (strpos($short_class_name, BS)) {\n\t\t\ttrigger_error('Full class name given', E_USER_ERROR);\n\t\t}\n\t\tif (isset($this->full_class_names[$short_class_name])) {\n\t\t\t$class_name = $this->full_class_names[$short_class_name];\n\t\t\tif (!class_exists($class_name)) {\n\t\t\t\t$class_name = $this->addFullClassName($short_class_name);\n\t\t\t}\n\t\t\treturn $class_name;\n\t\t}\n\t\telse {\n\t\t\treturn $this->addFullClassName($short_class_name);\n\t\t}\n\t}", "public function getFullQualifiedName();", "private function _getShortClassname()\n {\n if( $this->_shortClassName )\n return $this->_shortClassName;\n\n $this->_shortClassName = substr( $this->_getFullClassname(), strrpos( $this->_getFullClassname(), '\\\\' ) + 1 );\n\n return $this->_shortClassName;\n }", "function get_class_short_name($arg1) {\n return (new ReflectionClass($arg1))->getShortName();\n }", "function short_class($class) {\n return (new \\ReflectionClass($class))->getShortName();\n}", "protected function qualifiedClassName($class) {\n return xp::nameOf($class);\n }", "function _getShortName($longname) {\n $shortname = $longname;\n if (strlen($longname)>2) {\n $shortname = substr($longname,0,1) . substr($longname,-1);\n }\n return $shortname;\n }", "protected function returnShortName()\r\n {\r\n $owner = $this->owner;\r\n $class = new \\ReflectionClass($owner);\r\n $name = Inflector::camel2id($class->getShortName());\r\n return $name;\r\n }", "public function getShortName(): string\n {\n if (empty($this->shortName)) {\n $name = strtolower($this->getName());\n $replaced = preg_replace('|bundle$|', '', $name);\n\n $this->shortName = trim($replaced);\n }\n\n return $this->shortName;\n }", "public static function getShortName(string $namespace){\n $tempArr = explode('\\\\' , $namespace);\n return $tempArr[count($tempArr)-1];\n }", "public function getQualifiedName();", "public function getShortName()\n {\n $class = new ReflectionClass(get_called_class());\n\n return $class->getShortName();\n }", "public function extractFullyQualifiedClassName() {\n\t\t$fullyQualifiedClassName = $this->extractClassName();\n\t\tif ($fullyQualifiedClassName === NULL) {\n\t\t\treturn NULL;\n\t\t}\n\t\t$namespace = $this->extractNamespace();\n\t\tif ($namespace !== NULL) {\n\t\t\t$fullyQualifiedClassName = $namespace . '\\\\' . $fullyQualifiedClassName;\n\t\t}\n\t\treturn $fullyQualifiedClassName;\n\t}", "public function getQualifiedName(): string\n {\n return $this->namespace.'.'.$this->name;\n }", "private function shortName($resourceOrResourceClass): string\n {\n if (is_string($resourceOrResourceClass)) {\n $refl = new ReflectionClass($resourceOrResourceClass);\n\n return $refl->getShortName();\n }\n\n return $this->shortName(get_class($resourceOrResourceClass));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a graphic link from an item (styled and unstyled)
function mk_graphic_link($args) { extract($args); $anchor_class .= ($is_current_page ? ' current_item' : ''); $anchor_class = NAVT_FE::set_item_class($style_flags, 'a', $anchor_class); $item_class = NAVT_FE::set_item_class($style_flags, $sBeforeItem, $navt_item_class, $user_item_class, $wp_item_class); $img_class = NAVT_FE::set_item_class($style_flags, 'img', $img_class . ' ' . $usr_defined_class); $div_class = NAVT_FE::set_item_class($style_flags, 'div', 'navt_gl'); $li = _indentt($in) . "<$sBeforeItem" . (!isBlank($item_class) ? " $item_class" : '' ) . "><div" . (!isBlank($div_class) ? " $div_class":'') . "><a href='$link_url' title='" . attribute_escape($tooltip) . "'" . (!isBlank($reltags) ? " $reltags":'') . (!isBlank($anchor_class) ? " $anchor_class":'') . "><img src='$img_src' alt='". attribute_escape($nme) ."'" . (!isBlank($img_class) ? " $img_class":'') . "/>" . "<span style='margin-left:-5000px;'>$alt_text</span></a></div>$sAfterItem\n"; return($li); }
[ "function build_item_link($item)\n {\n $dev=0;\n dev_dump($item,\"item in build_item_link()\",$dev);\n $item_type=get_item_type($item[\"itemTypeID\"]);\n if ($item_type[\"itemTypeID\"]==3) $item_type_append=\"\"; else $item_type_append=\"/\".$item_type[\"itemType\"];\n return $item_type_append.\"/\".$item[\"categoryUrlAppend\"].\"/\".$item[\"itemUrlAppend\"];\n }", "function _dkp_link_item($item) {\n$link_method=0;\nswitch ($link_method) {\n\tcase 1: $data = _warcraft_armory_process('[item]'.$item->item_name.'[/item]'); break;\n\tcase 2: $data = _lootz_link_item($item->item_name); break;\n\tdefault: $data = l($item->item_name, 'dkp/items/'.$item->item_id);\n\t}\nreturn array('data' => $data, 'class' => 'item');\n}", "function dh_link_to_item($text = null, $props = array(), $action = 'show', $item = null, $queryParams = array())\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n $text = (!empty($text) ? $text : strip_formatting(metadata($item, array('Dublin Core', 'Title'))));\n return link_to($item, $action, $text, $props, $queryParams);\n}", "function mk_uri_item($args) {\n\n extract($args);\n\n $li = '';\n $opt = intval($nav_item[OPT], 10);\n $nme = $nav_item[NME];\n $ttl = $nav_item[TTL];\n\n $nameAsClass = sanitize_title_with_dashes(strtolower($nme));\n $args['navt_item_class'] .= ' ' . $nameAsClass . '-uri ' . TAB_ELINK;\n $args['img_class'] = $nameAsClass . '-img';\n $args['reltags'] = ($opt & NOFOLLOW) ? \" rel='nofollow' \" : '';\n $args['reltags'] .= ($opt & OPEN_SAMEWIN) ? '' : \"target='_blank'\";\n $args['anchor_class'] = 'navt_elink';\n $args['link_url'] = $ttl;\n\n if( $opt & GRAPHIC_LINK ) {\n $args['anchor_class'] = 'navt_glink';\n $li = NAVT_FE::mk_graphic_link($args);\n }\n else {\n // Link text with a side graphic\n if( $opt & TEXT_WITH_SIDE_GRAPHIC ) {\n $li = NAVT_FE::mk_text_with_side_graphic($args);\n }\n else if( $opt & TEXT_OVER_GRAPHIC ) {\n $li = NAVT_FE::mk_text_over_graphic($args);\n }\n else {\n\n // plain text\n extract($args);\n\n $item_class = NAVT_FE::set_item_class($style_flags, $sBeforeItem, $navt_item_class, $user_item_class, $wp_item_class);\n $anchor_class .= ($is_current_page ? ' current_item' : '');\n $anchor_class = NAVT_FE::set_item_class($style_flags, 'a', $anchor_class, $usr_defined_class, '', 1);\n\n $li = _indentt($in) . \"<$sBeforeItem\" .\n (!isBlank($item_class) ? \" $item_class\":'') . \"><a href='$link_url' title='\" . attribute_escape($alt_text) . \"'\" .\n (!isBlank($reltags) ? \" $reltags\": '') . (!isBlank($anchor_class) ? \" $anchor_class\": '') . \">$alt_text</a> $sAfterItem\\n\";\n }\n }\n return( $li );\n }", "private function createLink()\n\t{\n\t\treturn \"<a href=\\\"\".$this->properties['link'].\"\\\" class='\".implode(' ', $this->properties['classes']).\"'>\".$this->properties['text'].\"</a>\";\n\t}", "public function getItemvisualization ($item) {\n\t\t$html = \"\";\n\t\tswitch ($item[\"idtype\"]) {\n\t\t\tcase 1: // image\n\t\t\t\t\t\t$html .= '<img src=\"'.$item[\"url\"].'\" title=\"'.$item[\"name\"].'\" alt=\"'.$item[\"name\"].'\" />';\n\t\t\t\t\t\tbreak;\n\t\t\tcase 2: // video\n\t\t\t\t\t\t$html .= '<video src=\"'.$item[\"url\"].'\" title=\"'.$item[\"name\"].'\"></video>';\n\t\t\t\t\t\tbreak;\n\t\t\tcase 3: // audio\n\t\t\t\t\t\t$html .= '<audio controls=\"controls\">\n \t\t\t\t\t\t\t\t\t<source src=\"'.$item[\"url\"].'\" type=\"audio/mpeg\" />\n \t\t\t\t\t\t\t\t\t\t\t'._(\"Your browser does not support the audio element.\").'</audio>';\n\t\t\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t\t$html .= '<a href=\"'.$item[\"url\"].'\" title=\"'._(\"Download\").' '.$item[\"name\"].'\">'._(\"Download\").'</a>';\n\t\t\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "function shortcode_simple_client_item( $atts ) {\r\r\n\r\r\n\t// Attributes\r\r\n\textract( shortcode_atts(\r\r\n\t\tarray(\r\r\n\t\t\t'link' => 'http://themesmarts.com',\r\r\n\t\t\t'image' => '',\r\r\n\t\t), $atts )\r\r\n\t);\r\r\n\r\r\n\t// Code\r\r\n\treturn '<li class=\"four columns item\"><a href=\"'.$link.'\"><img src=\"'.$image.'\" /></a> </li>';\r\r\n}", "private static function get_item_link( $item ) {\n\n\t\t$item['external'] = true;\n\n\t\t//Handle internal links\n\t\tif( 'internal' === $item['linkType'] ) {\n\n\t\t\tif( isset($item['post']['id']) ) {\n\t\t\t\t$item['link'] = get_permalink( $item['post']['id'] );\n\t\t\t}\n\n\t\t\t$item['external'] = false;\n\n\t\t}\n\n\t\treturn $item;\n\t}", "function printAppearanceItem ($item, $a, $params) {\n extract($params);\n $class = \"$type appearance-item\";\n // Check if this item is the active item.\n if ($item === $active) {\n $class .= \" appearance-active\";\n }\n // Set url for the .png file so that the user can see a preview of option.\n $previewUrl = \"$thumbPath/$item.png\";\n ?>\n <a href=\"#\" data-ref=\"<?php echo $item ?>\" class=\"<?php echo $class ?>\">\n <div style=\"background-image:url('<?php echo $previewUrl ?>')\" class=\"appearance-preview\">\n </div>\n </a>\n <?php }", "function column_link( $item ) {\r\n\t\treturn esc_html( $item->link );\r\n\t}", "function get_item_html($item) {\n\t$output = \"<li><a href='details.php?id=\"\n\t\t. $item[\"media_id\"] . \"'><img src='\" \n\t\t. $item[\"img\"] . \"' alt='\" \n\t\t. $item[\"title\"] . \"' />\" \n\t\t. \"<p>View Details</p>\"\n\t\t. \"</a></li>\";\n\treturn $output;\n}", "public function get_nav_item() {\n\t\t\tglobal $CFG;\n\t\t\t$url = $CFG->wwwroot . \"/pix/i/navigationitem.png\";\n\t\t\treturn '<img src=\"' . $url .'\" alt=\"\"/>'; \n\t\t}", "function fubik_menu_item_link($link) {\n $link['localized_options']['attributes']['class'] = 'link-' . (isset($link['mlid']) ? $link['mlid'] : '');\n $link['localized_options']['html'] = true;\n return l('<span>'.$link['title'].'</span>', $link['href'], $link['localized_options']);\n}", "function prepare_link_item($A, &$template)\r\n{\r\n global $_CONF, $_USER, $_LI_CONF, $LANG_ADMIN, $LANG_LINKS, $LANG_DIRECTION,\r\n $_IMAGE_TYPE;\r\n\r\n $url = COM_buildUrl($_CONF['site_url']\r\n . '/links/portal.php?what=link&amp;item=' . $A['lid']);\r\n $actualUrl = stripslashes($A['url']);\r\n $title = stripslashes($A['title']);\r\n\r\n $template->set_var('link_url', $url);\r\n $template->set_var('link_actual_url', $actualUrl);\r\n $template->set_var('link_actual_url_encoded', urlencode($actualUrl));\r\n $template->set_var('link_name', $title);\r\n $template->set_var('link_name_encoded', urlencode($title));\r\n $template->set_var('link_hits', COM_numberFormat($A['hits']));\r\n $template->set_var('link_description',\r\n nl2br(stripslashes($A['description'])));\r\n\r\n $attr = array('title' => $actualUrl);\r\n if (substr($actualUrl, 0, strlen($_CONF['site_url'])) != $_CONF['site_url']) {\r\n $class = 'ext-link';\r\n if ((!empty($LANG_DIRECTION)) && ($LANG_DIRECTION == 'rtl')) {\r\n $class .= '-rtl';\r\n }\r\n $attr['class'] = $class;\r\n if ($_LI_CONF['new_window']) {\r\n $attr['target'] = '_blank';\r\n }\r\n }\r\n $html = COM_createLink($title, $url, $attr);\r\n $template->set_var('link_html', $html);\r\n\r\n if (!COM_isAnonUser() && !SEC_hasRights('links.edit')) {\r\n $reporturl = $_CONF['site_url']\r\n . '/links/index.php?mode=report&amp;lid=' . $A['lid'];\r\n $template->set_var('link_broken',\r\n COM_createLink($LANG_LINKS[117], $reporturl,\r\n array('class' => 'pluginSmallText',\r\n 'rel' => 'nofollow'))\r\n );\r\n } else {\r\n $template->set_var('link_broken', '');\r\n }\r\n\r\n if ((SEC_hasAccess($A['owner_id'], $A['group_id'], $A['perm_owner'],\r\n $A['perm_group'], $A['perm_members'], $A['perm_anon']) == 3) &&\r\n SEC_hasRights('links.edit')) {\r\n $editurl = $_CONF['site_admin_url']\r\n . '/plugins/links/index.php?mode=edit&amp;lid=' . $A['lid'];\r\n $template->set_var('link_edit',\r\n COM_createLink($LANG_ADMIN['edit'], $editurl));\r\n $edit_icon = \"<img src=\\\"{$_CONF['layout_url']}/images/edit.$_IMAGE_TYPE\\\" \"\r\n . \"alt=\\\"{$LANG_ADMIN['edit']}\\\" title=\\\"{$LANG_ADMIN['edit']}\\\"\" . XHTML . \">\";\r\n $template->set_var('edit_icon', COM_createLink($edit_icon, $editurl));\r\n } else {\r\n $template->set_var('link_edit', '');\r\n $template->set_var('edit_icon', '');\r\n }\r\n}", "public function renderLink();", "protected function renderMenuItem($item)\n\t{\n\t\tif (isset($item['icon']) and !empty($item['icon'])) {\n\t\t\t$icon = '<i class=\"icon-'.$item['icon'];\n\t\t\tif (isset($item['iconWhite']) and ($item['iconWhite'] == true))\n\t\t\t\t$icon .= ' icon-white';\n\t\t\t$icon .= '\"></i> ';\n\t\t}\n\t\telse {\n\t\t\t$icon = '';\n\t\t}\n\t\tif(isset($item['url'])) {\n\t\t\t$label=$this->linkLabelWrapper===null ? $icon.$item['label'] : '<'.$this->linkLabelWrapper.'>'.$icon.$item['label'].'</'.$this->linkLabelWrapper.'>';\n\t\t\treturn EBootstrap::link($label,$item['url'],isset($item['linkOptions']) ? $item['linkOptions'] : array());\n\t\t}\n\t\telse {\n\t\t\treturn EBootstrap::tag('span',isset($item['linkOptions']) ? $item['linkOptions'] : array(), $icon.$item['label']);\n\t\t}\n\t}", "public function lineItemLink($in){\n\treturn( '<a href=\"https://www.google.com/dfp/'.DFP_NETWORK_ID.'?#delivery/LineItemDetail/lineItemId='.$in.'\" target=\"_new\">'.$in.'</a>' );\n }", "public function addItem(){\n\t\t$item = '';\n\t\t$item .='\n\t\t<item>\n\t\t\t\t<title><![CDATA['.$this->itemTitle.']]></title>\n\t\t\t\t<link><![CDATA['.$this->itemLink.']]></link>\n\t\t\t\t<guid isPermaLink=\"true\">'.$this->itemLink.'</guid>\n\t\t\t\t<description><![CDATA['.substr($this->itemDescription, 0,300).'...'.']]></description>\n\t\t\t\t<pubDate><![CDATA['.$this->itemDate.' -0300]]></pubDate>\n\t\t\t\t<category><![CDATA['.$this->itemCategory.']]></category>\n\t\t\t\t<content:encoded><![CDATA['.$this->itemDescription.']]></content:encoded>\n\t\t\t\t';\n\t\tforeach ($this->itemImg as $img) {\n\t\t\t$imgInfo = getimagesize($img);\n\t\t\t$item .= '<enclosure url=\"'.$img.'\" length=\"'.$this->getRemoteFileSize($img).'\" type=\"'.image_type_to_mime_type($imgInfo[2]).'\" />'.\"\\n\";\n\t\t}\t\t\t\t\n\t\t$item .= '\n\t\t</item>\n\t\t';\n\t\t$this->item[] = $item;\n\t}", "public function fancylink($item, $viewtype=\"album\", $groupImg = true, $displayComment = true, $parentTitleClass = \"h2\") {\r\n\t\t$link = \"\";\r\n\t\taccess::required(\"view\", $item);\r\n\t\t\r\n\t\t$photo_size = module::get_var(\"theme_3nids\",\"photo_size\");\r\n\t\tif ($photo_size == \"full\"){\r\n\t\t\t$width = $item->width;\r\n\t\t\t$height = $item->height;\r\n\t\t}else{\r\n\t\t\t$width = $item->resize_width;\r\n\t\t\t$height = $item->resize_height;\r\n\t\t}\r\n\t\t\r\n\t\t$desriptionMode = module::get_var(\"theme_3nids\", \"description\");\r\n\t\t$description = \"\";\r\n\t\t$tags = tag::item_tags($item);\r\n\t\tif(count($tags) && $desriptionMode == \"tags\"){\r\n\t\t\t$description = \" || \" . implode(\", \", $tags);\r\n\t\t}elseif($desriptionMode == \"item\" && $item->description != \"\"){\r\n\t\t\t$description = \" || \" . str_replace(\"\\\"\",\"&quot;\",$item->description);\r\n\t\t}elseif (($desriptionMode == \"parent\" || $desriptionMode == \"item\") && $item->parent()->description != \"\"){\r\n\t\t\t$description = \" || \" . str_replace(\"\\\"\",\"&quot;\",$item->parent()->description);\r\n\t\t}\r\n\t\t\r\n\t\t$titleMode = module::get_var(\"theme_3nids\", \"title\");\r\n\t\tif ($titleMode == \"parent\"){\r\n\t\t\t$title = html::clean($item->parent()->title);\r\n\t\t}else{\r\n\t\t\t$title = html::clean($item->title);\r\n\t\t}\r\n\t\t\r\n\t\t$rel = \"\";\r\n\t\tif ($groupImg == true) {$rel = \" rel=\\\"fancygroup\\\" \";}\r\n\t\t\r\n\t\tif ($item->is_photo() || ($item->is_movie()) ){\r\n\t\t\t$fancymodule = \"\"; \r\n\t\t\tif (module::is_active(\"exif\")){\r\n\t\t\t\t$fancymodule .= \"exif::\" . url::site(\"exif/show/{$item->id}\") . \";;\";} \r\n\t\t\tif (module::is_active(\"comment\") ){\r\n\t\t\t\t$fancymodule .= \"comment::\" . url::site(\"comments_3nids?item_id={$item->id}\") . \";;comment_count::\" . comment_3nids::count($item) . \";;\" ;} \r\n\t\t\tif ($item->is_photo()){\r\n\t\t\t\t$link .= \"<a href=\\\"\" . url::site(\"photo_3nids/show/{$item->id}\") .\"/?w=\" . $width . \"xewx&h=\" . $height . \"xehx\\\" \" . $rel . \" class=\\\"fancyclass iframe\\\" title=\\\"\" . $title . $description .\"\\\" name=\\\"\" . $fancymodule . \" \\\">\";\r\n\t\t\t}else{\r\n\t\t\t\t$link .= \"<a href=\\\"\" . url::site(\"movie_3nids/show/{$item->id}\") . \"/?w=\" . strval(20+($width)) . \"xewx&h=\" . strval(50+($height)) . \"xehx\\\" \" . $rel . \" class=\\\"fancyclass iframe\\\" title=\\\"\" . $item->parent()->title . $description .\"\\\" name=\\\"\" . $fancymodule . \" \\\">\";\r\n\t\t\t}\r\n\t\t} elseif( $item->is_album() && $viewtype != \"header\"){\r\n\t\t\t$link .= \"<a href=\\\"\" . $item->url() . \"\\\">\";\r\n\t\t}\r\n\r\n\t\tif($viewtype != \"header\"){\r\n\t\t\t$link .= $item->thumb_img(array(\"class\" => \"g-thumbnail\")) . \"</a>\";\r\n\t\t\tif( $item->is_album() && $viewtype == \"album\" ){\r\n\t\t\t\t$link .= \"<a href=\\\"\" . $item->url() . \"?show=\" . $item->id . \"\\\"><$parentTitleClass><span></span>\" . html::clean($item->title) . \"</$parentTitleClass></a>\";\r\n\t\t\t} elseif ( !($item->is_album()) && $viewtype == \"dynamic\") {\r\n\t\t\t\t$link .= \"<a href=\\\"\" . $item->parent()->url() . \"?show=\" . $item->id . \"\\\" class=\\\"g-parent-album\\\"><$parentTitleClass><span></span>\" . html::clean($item->parent()->title) . \"</$parentTitleClass></a>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (($item->is_photo() || $item->is_movie()) && $displayComment==true && module::is_active(\"comment\") ) {\r\n\t\t\t\t$link .= \"<ul class=\\\"g-metadata\\\"><li><a href=\\\"\" . url::site(\"comments_3nids?item_id={$item->id}\") .\"\\\" class=\\\"iframe fancyclass g-hidden\\\">\" . comment_3nids::count($item) . \" \" . t(\"comments\") . \"</a></li></ul>\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$link .= \"</a>\";\r\n\t\t}\r\n\t\treturn $link;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation addDesiredJobTypesAsync POST: Add a candidate's desired job type
public function addDesiredJobTypesAsync($body, $id) { return $this->addDesiredJobTypesAsyncWithHttpInfo($body, $id) ->then( function ($response) { return $response[0]; } ); }
[ "protected function addEmploymentType(): void\n {\n if (empty($this->job->getJobType())) {\n return;\n }\n\n $this->json['employmentType'] = $this->job->getJobType();\n }", "protected function addJobTypeRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addJobType'\n );\n }\n\n $resourcePath = '/beta/jobType';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testCreateDesiredJobTypes()\n {\n }", "public function addType($type);", "function job_add($type)\n{\n\tglobal $user;\n\n\t$types = jobs_get_job_types();\n\tif($types[$type->type])\n\t{\n\t\t$job = new Job(array('user' => $user->uid, 'type' => $type->type));\n\t\tdrupal_set_title(t('Create @name', array('@name' => $types[$type->type]->type)), PASS_THROUGH);\n\t\t$output = drupal_get_form($type->type . '_job_form', $job);\n\t}\n\telse\n\t{\n\t\treturn t('Error in retrieving job type');\n\t}\n\treturn $output;\n}", "function jobboard_register_job_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Job Types', 'Taxonomy General Name', 'jobboard' ),\n\t\t'singular_name' => _x( 'Job Type', 'Taxonomy Singular Name', 'jobboard' ),\n\t\t'menu_name' => __( 'Job Types', 'jobboard' ),\n\t\t'all_items' => __( 'All Job Types', 'jobboard' ),\n\t\t'parent_item' => __( 'Parent Job Type', 'jobboard' ),\n\t\t'parent_item_colon' => __( 'Parent Job Type:', 'jobboard' ),\n\t\t'new_item_name' => __( 'New Job Type Name', 'jobboard' ),\n\t\t'add_new_item' => __( 'Add New Job Type', 'jobboard' ),\n\t\t'edit_item' => __( 'Edit Job Type', 'jobboard' ),\n\t\t'update_item' => __( 'Update Job Type', 'jobboard' ),\n\t\t'separate_items_with_commas' => __( 'Separate job types with commas', 'jobboard' ),\n\t\t'search_items' => __( 'Search Job Types', 'jobboard' ),\n\t\t'add_or_remove_items' => __( 'Add or remove job types', 'jobboard' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used job types', 'jobboard' ),\n\t\t'not_found' => __( 'Not Found', 'jobboard' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'show_tagcloud' => true,\n\t);\n\tregister_taxonomy( 'job_type', array( 'job' ), $args );\n\n}", "public function addDesiredJobTypesAsyncWithHttpInfo($body, $id)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->addDesiredJobTypesRequest($body, $id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function addMatchTypes($matchTypes) \n {\n $this->matchTypes = array_merge($this->matchTypes, $matchTypes);\n }", "public function addMatchTypes($matchTypes) {\n\t\t$this->matchTypes = array_merge($this->matchTypes, $matchTypes);\n\t}", "public function register_post_types() {}", "public function addMatchTypes($matchTypes)\n {\n $this->matchTypes = Arrayify::merge($this->matchTypes,$matchTypes);\n }", "public function addDesiredJobTypesWithHttpInfo($body, $id)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse2006';\n $request = $this->addDesiredJobTypesRequest($body, $id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse2006',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "protected function addJob( $job, $type ) {\n \n if( empty( $job['heading'] ) || empty( $job['subheading'] ) ) {\n throw new InvalidArgumentException( 'Headings cannot be blank' );\n }\n \n $sql = <<<_SQL_\nINSERT INTO job\nSET heading = '{$job['heading']}',\nsubheading = '{$job['subheading']}',\ntype = $type\n_SQL_;\n \n $sth = $this->pdo->prepare( $sql );\n $sth->execute();\n \n $added = ( $type == self::TYPE_JOB )\n ? 'Job'\n : 'Experience';\n \n $this->message = \"$added added successfully\";\n }", "function kp_entities_create_content_types_job() {\n\n $types = kp_entities_types_list();\n foreach ($types as $type) {\n\n $term = $bundle = NULL;\n\n // First create the Tripal Term (Example: Genetic Marker).\n $term = tripal_load_term_entity(array(\n 'vocabulary' => $type['vocabulary'],\n 'accession' => $type['accession']\n ));\n\n // If we have the term already then we might also have the bundle...\n if ($term) {\n $bundle = tripal_load_bundle_entity(array('term_id' => $term->id));\n }\n\n // If not, then create it.\n if (!$bundle) {\n $error = '';\n $bundle = tripal_create_bundle($type, $error);\n drush_log('Created '.$type['label'].' Tripal Content Type.', 'ok');\n }\n\n }\n}", "public function addMultiple($type, array $data);", "public function create(Request $request)\n {\n $job_type = new job_type;\n $request->validate([\n 'name' => 'required|unique:job_types|string',\n ]);\n $job_type->fill($request->input())->save();\n $job_type->save();\n return response()->json([\n 'message' => \"Successfully created job_type!\"\n ], 200);\n }", "public static function mla_add_post_mime_type( $request ) {\r\n\t\tif ( ! self::_get_post_mime_templates() ) {\r\n\t\t\tself::$mla_post_mime_templates = array ();\r\n\t\t}\r\n\r\n\t\t$messages = '';\r\n\t\t$errors = '';\r\n\r\n\t\t/*\r\n\t\t * Sanitize slug value\r\n\t\t */\r\n\t\t$slug = sanitize_mime_type( $request['slug'] );\r\n\t\tif ( $request['post_mime_type'] ) {\r\n\r\n\t\t\tif ( !empty( $request['specification'] ) ) {\r\n\t\t\t\t$request['specification'] = '';\r\n\t\t\t\t$messages .= '<br>' . __( 'Ignoring specification for Post MIME Type; using slug', 'media-library-assistant' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( $slug != $request['slug'] ) {\r\n\t\t\t/* translators: 1: element name 2: bad_value 3: good_value */\r\n\t\t\t$messages .= sprintf( __( '<br>' . 'Changing %1$s \"%2$s\" to valid value \"%3$s\"', 'media-library-assistant' ), __( 'Slug', 'media-library-assistant' ), $request['slug'], $slug );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Make sure new slug is unique\r\n\t\t */\r\n\t\tif ( isset( self::$mla_post_mime_templates[ $slug ] ) ) {\r\n\t\t\t\t/* translators: 1: ERROR tag 2: slug */\r\n\t\t\t$errors .= '<br>' . sprintf( __( '%1$s: Could not add Slug \"%2$s\"; value already exists', 'media-library-assistant' ), __( 'ERROR', 'media-library-assistant' ), $slug );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Validate specification, if present\r\n\t\t */\r\n\t\tif ( !empty( $request['specification'] ) ) {\r\n\t\t\t$specification = MLACore::mla_parse_view_specification( $request['specification'] );\r\n\t\t\tif ( isset( $specification['error'] ) ) {\r\n\t\t\t\t$errors .= $specification['error'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $errors ) ) {\r\n\t\t\treturn array(\r\n\t\t\t\t'message' => substr( $errors . $messages, 4),\r\n\t\t\t\t'body' => ''\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t$new_type = array();\r\n\t\t$new_type['singular'] = sanitize_text_field( $request['singular'] );\r\n\t\t$new_type['plural'] = sanitize_text_field( $request['plural'] );\r\n\t\t$new_type['specification'] = trim( $request['specification'] );\r\n\t\t$new_type['post_mime_type'] = $request['post_mime_type'];\r\n\t\t$new_type['table_view'] = $request['table_view'];\r\n\t\t$new_type['menu_order'] = absint( $request['menu_order'] );\r\n\t\t$new_type['description'] = sanitize_text_field( $request['description'] );\r\n\t\t$new_type['post_ID'] = ++self::$mla_post_mime_highest_ID;\r\n\r\n\t\tself::$mla_post_mime_templates[ $slug ] = $new_type;\r\n\t\tself::_put_post_mime_templates();\r\n\r\n\t\treturn array(\r\n\t\t\t/* translators: 1: slug */\r\n\t\t\t'message' => substr( $messages . '<br>' . sprintf( __( 'Edit view \"%1$s\"; added', 'media-library-assistant' ), $slug ), 4),\r\n\t\t\t'body' => ''\r\n\t\t);\r\n\t}", "public function add_type($type)\n\t{\n\t\t$this->type[] = $type;\n\t}", "public function create_post_types() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add an array of lines
public function addMultiple($lines = array()) { foreach ($lines as $line) { $this->add($line); } }
[ "public function addLine($array)\n {\n\n // we always want to add an array, even if the line\n // has only a single element\n if (!is_array($array)) {\n $array = [$array];\n }\n\n $this->lines[] = $array;\n }", "function addLines(array $lines = array()) {\n foreach ($lines as $line) {\n $this->addLine($line);\n }\n }", "public function append($line, array $newLines);", "private function add($line = '') {\n\t\t$this->output[] = $line;\n\t}", "function addOrMerge(array $arr, string|array $lines): array\n{\n if (is_array($lines))\n return $arr + $lines;\n $arr[] = $lines;\n return $arr;\n}", "public function addLine($line);", "public function addLines(array $lines, string $locale, string $namespace = '*'): void\n {\n foreach ($lines as $key => $value) {\n list($group, $item) = explode('.', $key, 2);\n\n Arr::set($this->loaded, \"$namespace.$group.$locale.$item\", $value);\n }\n }", "function add_lines($lines, $group = 'default', $before = FALSE)\n\t{\n\t\t// check if lines are supposed to be set before the files\n\t\t$pos = ($before != FALSE ? 'before' : 'after');\n\t\t// add lines\n\t\t$this->current['data']['lines'][$pos][$group] = \n\t\t(isset($this->current['data']['lines'][$pos][$group]) ? $this->current['data']['lines'][$pos][$group].' ' : '').$lines;\n\t}", "abstract function &doneAddingLines();", "public function addLines(array $lines, $locale, $namespace = '*')\n {\n foreach ($lines as $key => $value) {\n [$group, $item] = explode('.', $key, 2);\n\n Arr::set($this->loaded, \"$namespace.$group.$locale.$item\", $value);\n }\n }", "public function modify(array $lines);", "private function write_lines($array)\n {\n $array = implode(PHP_EOL, $array);\n file_put_contents($this->filename, $array);\n }", "final public function add(lineObj $line) {}", "public function setLineItems(array $line_items);", "function addArray ($array) {\n foreach ($array as $k => $v):\n $this->addRow ($v);\n endforeach;\n\n }", "private function addLines()\n {\n if(isset($this->lines))\n {\n foreach($this->lines as $line)\n {\n $lineColor = $this->makeColor($line->getColor(), $this->captchaImage);\n\n // Adding line\n imageline($this->captchaImage, $line->getXStart(), $line->getYStart(), $line->getXEnd(), $line->getYEnd(), $lineColor);\n }\n }\n }", "function addArray ($array) {\r\n\r\n // run through the array and add them into rows\r\n foreach ($array as $k => $v):\r\n $this->addRow ($v);\r\n endforeach;\r\n\r\n }", "function addArray ($array) {\n\n // run through the array and add them into rows\n foreach ($array as $k => $v):\n $this->addRow ($v);\n endforeach;\n\n }", "public function setLines(array $lines)\n {\n $this->lines = ['validation' => $lines];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get reservation by id
public function getReservationById($reservation_id);
[ "public function getReservationById($id);", "function get_reservation($id)\n {\n return $this->db->get_where('reservations',array('id'=>$id))->row_array();\n }", "public function getReservationById($id) {\n return $this->ReservationDao->getReservationById($id);\n }", "public function getReservation($id) {\r\n try {\r\n $sql = '\r\n SELECT * \r\n FROM equipment_reservation, user, equipment, user_access_level\r\n WHERE equipment_reservation.equipment_id = equipment.equipment_id\r\n AND equipment_reservation.user_id = user.user_id\r\n AND user.access_level_id = user_access_level.user_access_level_id\r\n AND equipment_reservation.eqreservation_id = :id\r\n \r\n ';\r\n $params = array(':id' => $id);\r\n $results = $this->conn->query($sql, $params);\r\n if (\\count($results) == 0) {\r\n return false;\r\n }\r\n\r\n $reservation = self::ExtractReservationFromRow($results[0]);\r\n\r\n return $reservation;\r\n } catch (\\Exception $e) {\r\n $this->logger->error(\"Failed to fetch reservation with id '$id': \" . $e->getMessage());\r\n return false;\r\n }\r\n }", "public function fetchById(int $id)\n {\n return $this->reservationServiceMapper->findByPk($id);\n }", "public function fetchById(int $id)\n {\n return $this->reservationMapper->fetchById($id);\n }", "public static function getReserva($id){\n return (new Database('reserva'))->select('rsv_codigo = '.$id)\n ->fetchObject(self::class);\n }", "public function getReservation($equipment_reservation_id)\n\t{\n return EquipmentReservation::model()->findByPk($equipment_reservation_id);\n\t}", "public function reservation_info($id)\n {\n return DB::table('reservations')\n ->join('reservation_info', function($query) {\n $query->on( 'reservations.id', '=', 'reservation_info.reservation_id');\n })\n ->select(\n 'reservation_info.*'\n )\n ->where('deleted_at', null)\n ->where('reservation_info.id', $id)\n ->get();\n }", "public function getReservedSeat(int $id);", "public function getBooking($id){\n \treturn Self::find($id);\n }", "public function getReservationId();", "public function findBookingById($id);", "public function find($id) {\n return $this->booking->findOrFail($id);\n }", "function kigo_find_reservation($kigo_id) {\n $fids_json = '\"'.SOURCE_ID_KIGO.'\":\"'.$kigo_id.'\"';\n return find_object('reservation', array('fids' => \"*\".$fids_json.\"*\"));\n}", "function getBookingByRoomIdFromDb($id){\n\t\t$query = \"SELECT bookingid, userid, checkin, checkout, person, total, payment_method, requests FROM bookings WHERE roomid=$id\"; \n\t\t$result = executeQuery($query);\t\n\t\t$booking = null;\n\t\tif($result){\n\t\t\t$booking = mysqli_fetch_assoc($result);\n\t\t}\n\t\treturn $booking;\n\t}", "public function get_hotel($id);", "public function get_restaurant($id);", "public function getReservation($seat_id)\n {\n return ($this->reservations[$seat_id]);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The builders availables in the CRUD theme.
static public function builders() { return array_merge(parent::builders(), [ 'index-component' => Builders\IndexComponent::class, 'create-component' => Builders\CreateComponent::class, 'edit-component' => Builders\EditComponent::class, 'show-component' => Builders\ShowComponent::class, ]); }
[ "function getModelBuilders() {\n return $this->model_builders;\n }", "static public function builders() {\n return [\n 'migration-class' => Builders\\Migration::class,\n 'model-class' => Builders\\Model::class,\n 'factory-file' => Builders\\Factory::class,\n 'seeds-class' => Builders\\Seeds::class,\n 'request-class' => Builders\\Request::class,\n 'resource-class' => Builders\\Resource::class,\n 'controller-class' => Builders\\Controller::class,\n ];\n }", "public function builders(): array {\n\t\t\treturn $this->items;\n\t\t}", "public function get_registered_builders(){\r\n\t\treturn $this->registered_builders;\r\n\t}", "public function getAvailableBuilders()\r\n {\r\n //retrieve all available builders if not done already\r\n if ($this->_init) $this->initBuilders();\r\n\r\n return array_keys($this->_builders);\r\n }", "public function getMenuBuilders()\n {\n return [\n self::MENU_BUILDER => Yii::t('writesdown', 'Yes'),\n self::NOT_MENU_BUILDER => Yii::t('writesdown', 'No'),\n ];\n }", "public function getAdditionalBuilders(): array\n {\n return $this->additionalBuilders;\n }", "public function getAvailableWidgets()\n {\n return array(\n array(\n 'title' => \"Text Widget\",\n \"id\" => \"\",\n \"bundle\" => \"ArnmContent\",\n \"controller\" => \"Text\"\n ),\n array(\n 'title' => \"Html Widget\",\n \"id\" => \"\",\n \"bundle\" => \"ArnmContent\",\n \"controller\" => \"Html\"\n ),\n array(\n 'title' => \"Menu Widget\",\n \"id\" => \"\",\n \"bundle\" => \"ArnmMenu\",\n \"controller\" => \"PlainMenu\"\n ),\n array(\n 'title' => \"Slide Show Widget\",\n \"id\" => \"\",\n \"bundle\" => \"MediaContent\",\n \"controller\" => \"SlideShow\"\n ),\n array(\n 'title' => \"Small Slide Show Widget\",\n \"id\" => \"\",\n \"bundle\" => \"MediaContent\",\n \"controller\" => \"SmallSlideShow\"\n ),\n array(\n 'title' => \"Filmstrip Widget\",\n \"id\" => \"\",\n \"bundle\" => \"MediaContent\",\n \"controller\" => \"FilmStrip\"\n ),\n array(\n 'title' => \"Showcase Collections List Widget\",\n \"id\" => \"\",\n \"bundle\" => \"ArnmCatalog\",\n \"controller\" => \"CollectionsList\"\n ),\n array(\n 'title' => \"Showcase Container Widget\",\n \"id\" => \"\",\n \"bundle\" => \"ArnmCatalog\",\n \"controller\" => \"ShowcaseContainer\"\n )\n );\n }", "function panels_get_layout_builders() {\n ctools_include('plugins');\n $plugins = ctools_get_plugins('panels', 'layouts');\n $builders = array();\n foreach ($plugins as $name => $plugin) {\n if (!empty($plugin['builder'])) {\n $builders[$name] = $plugin;\n }\n }\n\n return $builders;\n}", "protected function widgets() {\n return array();\n }", "public function getWidgets();", "public function getBrands();", "public function getForms() {\n $build['replication_unblock_button'] = $this->formBuilder()->getForm('Drupal\\workspace\\Form\\UnblockReplicationForm');\n $build['clear_queue_button'] = $this->formBuilder()->getForm('Drupal\\workspace\\Form\\ClearReplicationQueueForm');\n $build['replication_settings'] = $this->formBuilder()->getForm('Drupal\\replication\\Form\\SettingsForm');\n return $build;\n }", "public function builderHasKeyBuilders() {\n return $this->dataHolderHasProperty('key_builders', TRUE);\n }", "public function getWidgets() {\n $aHomeWidgets = [];\n\n # Get all widgets from database\n $oWidgetsDB = CoreController::$aCoreTables['core-widget']->select();\n if(count($oWidgetsDB) > 0) {\n foreach($oWidgetsDB as $oWid) {\n $aHomeWidgets[] = $oWid;\n }\n }\n return $aHomeWidgets;\n }", "public function getBrands() {\n return $this->brands;\n }", "private function loadActionBuilders(): array\n {\n $cachePool = $this->getCacheItemPool();\n $cacheHit = $cachePool->getItem($cacheKey = sha1(__METHOD__));\n\n if (!$cacheHit->isHit()) {\n $allBuilders = [];\n $classPaths = $this->getClassPaths();\n\n array_walk(\n $classPaths,\n function (string $path, string $namespace) use (&$allBuilders) {\n $path = realpath($path);\n\n if ($path) {\n $path .= DIRECTORY_SEPARATOR;\n\n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS)\n );\n\n foreach ($iterator as $name) {\n $className = $namespace . str_replace(\n [$path, DIRECTORY_SEPARATOR, '.php'],\n ['', '\\\\', ''],\n $name\n );\n\n try {\n $reflection = new ReflectionClass($className);\n\n if (!$reflection->isAbstract() && !$reflection->isInterface() &&\n $reflection->implementsInterface(ActionBuilderInterface::class)\n ) {\n $allBuilders[] = $className;\n }\n } catch (ReflectionException $exc) {\n // Ignore \"broken\" classes.\n }\n }\n }\n }\n );\n\n $cacheHit->set($allBuilders);\n\n if ($allBuilders) {\n $cachePool->save($cacheHit);\n }\n }\n\n return $cacheHit->get();\n }", "public function getBrands()\n {\n return $this->model->orderBy('created_at', 'desc')->get();\n }", "public function getBrands()\r\n {\r\n return $this->brands;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
All the completed tasks
public function CompleteTasks() { return $this->Tasks()->filter(array( 'isComplete' => true, )); }
[ "public function get_keep_completed_task_list()\n {\n }", "public function pendingTasks();", "public function finishedTasks()\n {\n return Taskr_Model_DataMapper::getInstance()->loadList('tasks.finished');\n }", "public function getCompletedThings();", "public function deleteAllTasks() {}", "protected function executeTasks() {}", "protected function _listTasks() {\n\t\t$this->out('Available tasks:');\n\t\tforeach ($this->taskNames as $loadedTask) {\n\t\t\t$this->out('\t- ' . $loadedTask);\n\t\t}\n\t}", "public static function all() {\n\t\t$task = new Task();\n\t\treturn $task->get_all();\n\t}", "public function getCompletedTasks()\n {\n return array_diff($this->tasks, $this->getPendingTasks());\n }", "public function getTasks();", "public function getTasklist();", "function shutdownAll(){\n \n foreach ($this->tasks as $task){\n\t$this->log( \"initiating shutdown of \".$task->name );\n\t$task->shutdown();\n }\n \n $this->shutdown();\n \n }", "public function get_task_list()\n {\n }", "function tasks()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['tasks'] == 1 ) ? 'Task' : 'Tasks';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$taskkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t{\n\t\t\t$taskkeys[] = \"'{$v['task_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'task_manager', \"task_key IN (\".implode( \",\", $taskkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_task( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['tasks']} {$object} {$operation}....\" );\n\t}", "public function updateGoalTasks(){\n \t//update with the total number completed so far\n \t//update the remaining tasks as required\n }", "public function cancelAllTasks() { }", "public function processDueTasks() {\n\n // Process any timed out tasks\n $timedOutTasks = ScheduledTask::filter(\"WHERE timeoutTime <= ? AND status LIKE ?\",\n date('Y-m-d H:i:s'), ScheduledTask::STATUS_RUNNING);\n\n if (sizeof($timedOutTasks)) {\n foreach ($timedOutTasks as $task) {\n $task->setStatus(ScheduledTaskSummary::STATUS_TIMED_OUT);\n $task->save();\n\n $logEntry = new ScheduledTaskLog($task->getId(), $task->getLastStartTime(), $task->getLastEndTime(),\n $task->getStatus(), \"Timed Out\");\n $logEntry->save();\n }\n }\n\n\n // Gather due tasks\n $dueTasks = ScheduledTask::filter(\"WHERE nextStartTime <= ? AND (status IS NULL OR status <> ?)\",\n date('Y-m-d H:i:s'), ScheduledTask::STATUS_RUNNING);\n\n if (sizeof($dueTasks))\n $this->scheduledTaskProcessor->processScheduledTasks($dueTasks);\n\n }", "public function getFinishedRequests () {}", "function createAllTasks(){\n\t\t$this->tasks = we_workflow_documentTask::createAllTasks($this->workflowStepID);\n\t\treturn true;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a new tag table query.
private function newTagQuery() { $tag_model = $this->tagModel(); $tag_instance = new $tag_model; $query = $tag_instance->newQuery(); if (method_exists($this, 'tagContext')) { if (method_exists($tag_model, 'applyQueryContext')) { call_user_func_array( array($tag_model, 'applyQueryContext'), array($query, $this->tagContext()) ); } } return $query; }
[ "public function getTagsTable() {}", "function Conduct_Query_Builder_Query_Tags() {\n\t\treturn Conductor_Query_Builder_Query_Tags::instance();\n\t}", "public function newQuery() : QueryBuilder;", "protected function _createUnionQuery() {\n return UnionQuery::create($this->_connection);\n }", "public function getCreateTableQuery($table);", "abstract public function newQuery();", "public function newQuery(): Query;", "public function scopeWhereTags($query)\n {\n $tags = join(\" \", params_as_array(func_get_args(), 1));\n $query->whereRaw(\"MATCH (tags) AGAINST (? IN BOOLEAN MODE)\" , $tags);\n return $query;\n }", "public function newQuery(): BaseBuilder\n {\n // save table aliases\n $tempAliases = $this->aliasedTables;\n $builder = $this->table(',')->from([], true);\n $this->aliasedTables = $tempAliases;\n\n return $builder;\n }", "public function createTable($query);", "public function table(string $table): Query;", "public function createQuery()\n\t{\n\t\treturn $this->pp->createQuery('modules_event/highlight');\n\t}", "private function createQuery() {\n $this->query = new Query($this->sql, $this->attributesArray);\n }", "function _buildQuery()\n\t{\n\t\t// Get the WHERE, HAVING and ORDER BY clauses for the query\n\t\t$where\t\t= $this->_buildContentWhere();\n\t\t$orderby\t= $this->_buildContentOrderBy();\n\t\t$having\t\t= $this->_buildContentHaving();\n\n\t\t$query = 'SELECT t.*, u.name AS editor, COUNT(rel.tid) AS nrassigned'\n\t\t\t\t\t. ' FROM #__quickfaq_tags AS t'\n\t\t\t\t\t. ' LEFT JOIN #__quickfaq_tags_item_relations AS rel ON rel.tid = t.id'\n\t\t\t\t\t. ' LEFT JOIN #__users AS u ON u.id = t.checked_out'\n\t\t\t\t\t. $where\n\t\t\t\t\t. ' GROUP BY t.id'\n\t\t\t\t\t. $having\n\t\t\t\t\t. $orderby\n\t\t\t\t\t;\n\n\t\treturn $query;\n\t}", "public function newPivotStatement()\n {\n return $this->query->getQuery ()->newQuery ()->from ( $this->table );\n }", "public function newPivotStatement()\n {\n return $this->query->getQuery()->newQuery()->from($this->table);\n }", "public function createTableQuery()\n {\n $query = 'CREATE TABLE `' . $this->tableName . '` (';\n $query .= ($this->info->info->sql->order == 'true') ? '`ord` int(10) unsigned DEFAULT NULL,' : '';\n $query .= ($this->info->info->sql->created == 'true') ? '`created` DATETIME DEFAULT NULL,' : '';\n $query .= ($this->info->info->sql->modified == 'true') ? '`modified` DATETIME DEFAULT NULL,' : '';\n $queryFields = '';\n foreach ($this->getAttributes() as $attribute) {\n $queryFields .= Db_ObjectType::createAttributeSql($attribute);\n }\n $engine = ((string) $this->info->info->sql->engine != '') ? (string) $this->info->info->sql->engine : 'MyISAM';\n $query .= substr($queryFields, 0, -1) . ') ENGINE=' . $engine . ' COLLATE utf8_unicode_ci;';\n return $query;\n }", "public function getTagTable() {\n\t\t$sm = $this->getServiceLocator();\n\t\treturn $sm->get('Portfolio\\Model\\TagTable');\n\t}", "public function createQuery() {\n $queryArr = array();\n\n $this->addSelect($queryArr);\n $this->addFrom($queryArr);\n $this->addWhere($queryArr);\n $this->addGroupBy($queryArr);\n $this->addSortBy($queryArr);\n $this->addHaving($queryArr);\n\n $this->query = implode(' ', $queryArr) . ';';\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fire 'bp_template_include', main filter used for theme compatibility and displaying custom BP theme files. Hooked to 'template_include'.
function bp_template_include( $template = '' ) { return apply_filters( 'bp_template_include', $template ); }
[ "function tve_compat_re_add_template_include_filters() {\n\tif ( ! function_exists( 'is_plugin_active' ) ) {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t}\n\n\tif ( is_plugin_active( 'maintenance/maintenance.php' ) ) {\n\t\tglobal $mtnc;\n\t\tif ( ! empty( $mtnc ) ) {\n\t\t\tadd_action( 'template_include', array( $mtnc, 'mtnc_template_include' ), 999999 );\n\t\t}\n\t}\n}", "function _preview_theme_template_filter() {}", "function _preview_theme_template_filter()\n{\n}", "public function include_template_functions() {\n\t\trequire_once( $this->get_plugin_path() . '/woocommerce-tab-manager-template.php' );\n\t}", "function custom_template( ) {\n\n\t\tif ( $this->is_presentation() ) {\n\t\t\tinclude( plugin_dir_path( __FILE__ ) . 'presentation-template.php' );\n\t\t\texit();\n\t\t} \n\t}", "function bambule_admin_theme_support_page() { \n require_once(get_template_directory() . '/inc/templates/bambule-theme-support.php');\n}", "function it_exchange_membership_buddypress_addon_template_include( $template ) {\n\tif ( function_exists( 'is_buddypress' ) && is_buddypress() ) {\n\n\t\tglobal $it_exchange_membership_buddypress_addon_is_content_restricted, $it_exchange_membership_buddypress_addon_is_content_dripped, $post, $it_exchange_membership_buddypress_addon_post_id;\n\n\t\t$post->ID = $it_exchange_membership_buddypress_addon_post_id; //BuddyPress sets this to 0 sometimes... we want it to be the actual page ID though, which we set in the it_exchange_membership_buddypress_addon_fix_post_id() function.\n\n\t\t$it_exchange_membership_buddypress_addon_is_content_restricted = it_exchange_membership_addon_is_content_restricted();\n\t\t$it_exchange_membership_buddypress_addon_is_content_dripped = it_exchange_membership_addon_is_content_dripped();\n\t}\n\n\treturn $template;\n}", "function include_before_theme() {\n\n\t\t\n\t\t\t// include necessary classes and functions\n\t\t\tinclude_once('core/feed_collection.php');\n\t\t\tinclude_once('core/feed_object.php');\n\t\t\tinclude_once('core/feed.php');\n\t\t\t\n\t\t\t// admin only includes\n\t\t\tif( is_admin() ) { }\n\n\t\t}", "private function theme_support_includes()\n {\n }", "function _include( $template, $format=false, $dir=false )\n{\n // nu_debug( 'Particle Template Include', array( 'dir'=>$dir, 'format'=>$format ) );\n\n $template = apply_filters( 'particle_template_include', $template );\n\n // if not specificed set to the partials directory (relative to the theme top dir level)\n if( false === $dir )\n $dir = 'app/includes/';\n\n $templates = array();\n if( $format )\n $templates[] = trailingslashit( $dir ) . \"$template-$format.inc\";\n\n $templates[] = trailingslashit( $dir ) . \"$template.inc\";\n\n $located = locate_template( $templates, true, false );\n\n if( !$located ) {\n $msg = implode( ', ', $templates );\n echo \"Failed to load the following template(s): $msg\";\n }\n\n return $located;\n}", "public function include_template_functions() {\n\t\trequire_once( $this->get_plugin_path() . '/includes/wc-pdf-product-vouchers-template.php' );\n\t}", "function _filter_fw_ext_integrations_template_include( $template ) {\n\n\t/**\n\t * @var FW_Extension_Integrations $integrations\n\t */\n\t$integrations = fw()->extensions->get( 'integrations' );\n\n\tif ( is_singular( $integrations->get_post_type_name() ) ) {\n\n\t\tif ( preg_match( '/single-' . '.*\\.php/i', basename( $template ) ) === 1 ) {\n\t\t\treturn $template;\n\t\t}\n\n\t\tif ( $integrations->locate_view_path( 'single' ) ) {\n\t\t\treturn $integrations->locate_view_path( 'single' );\n\t\t} else {\n\t\t\tadd_filter( 'the_content', '_filter_fw_ext_integrations_the_content' );\n\t\t}\n\t} else if ( is_tax( $integrations->get_taxonomy_name() ) && $integrations->locate_view_path( 'taxonomy' ) ) {\n\n\t\tif ( preg_match( '/taxonomy-' . '.*\\.php/i', basename( $template ) ) === 1 ) {\n\t\t\treturn $template;\n\t\t}\n\n\t\treturn $integrations->locate_view_path( 'taxonomy' );\n\t} else if ( is_post_type_archive( $integrations->get_post_type_name() ) && $integrations->locate_view_path( 'archive' ) ) {\n\t\tif ( preg_match( '/archive-' . '.*\\.php/i', basename( $template ) ) === 1 ) {\n\t\t\treturn $template;\n\t\t}\n\n\t\treturn $integrations->locate_view_path( 'archive' );\n\t}\n\n\treturn $template;\n}", "function ozy_template_include( $t ){\n global $ozy_data;\n\t$ozy_data->current_theme_template = basename($t);\n return $t;\n}", "public function template_include( $template ) {\t\n\t\t$page_settings = get_option( 'aiovg_page_settings' );\n\n\t\tif ( is_page( (int) $page_settings['player'] ) ) {\n\t\t\t$template = apply_filters( 'aiovg_load_template', AIOVG_PLUGIN_DIR . 'public/templates/player.php' );\n\t\t}\n\t\t\n\t\treturn $template;\t\t\n\t}", "function bb_front_page_content_loop() {\n\ninclude CHILD_THEME_DIR.'/lib/template-parts/home-content-loop.php';\n}", "public function include_template_functions() {\n\t\tinclude_once( 'includes/class-gmw-ps-template-functions-helper.php' );\n\t\tinclude_once( 'includes/gmw-ps-search-form-template-functions.php' );\n\t\tinclude_once( 'includes/gmw-ps-search-results-template-functions.php' );\n\t}", "function plugin_template_override(){\n \n $orig_tpl = WXP::DS(view_var(\"wxp_default_render_path\"));\n $tpl_dir = WXP::DS(get_template_directory());\n $ss_dir = WXP::DS(get_stylesheet_directory());\n $override = view_var(\"wxp_allow_plugin_template_override\");\n \n if(strpos($orig_tpl, $tpl_dir) === false\n && strpos($orig_tpl, $ss_dir) === false\n && $override === true){\n \n $this->View->add(\"wxp_content_template\", $orig_tpl);\n \n //let plugin template be single column, just incase\n //it includes its own sidebar (like Woocommerce)\n //$this->Elements->set_layout(\"one\");\n }\n }", "public function render_templates_in_footer()\n {\n // Load only on our pages that use templates\n if (RP_WCDPD_Settings::is_settings_page() && RP_WCDPD_Settings::settings_page_uses_templates()) {\n\n // Get current tab\n $current_tab = RP_WCDPD_Settings::get_tab();\n\n // Include view\n require_once RP_WCDPD_PLUGIN_PATH . 'includes/views/settings/templates.php';\n }\n }", "function include_theme_partial($filename, array $data = [], bool $return = false)\n{\n $template = get_theme_partial($filename, $data);\n\n if ($template) {\n\n if ($return) {\n return $template;\n }\n\n echo $template;\n }\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Closes an open "OR HAVING (...)" grouping.
public function or_having_close() { // Add pending database call which is executed after query type is determined $this->_db_pending[] = [ 'name' => 'or_having_close', 'args' => [], ]; return $this; }
[ "public function or_having_close(){\n $this->_having[] = array('OR' => ')');\n\n return $this;\n }", "public function or_having_close()\n {\n $this->_having[] = array('OR' => ')');\n\n return $this;\n }", "public function or_having_close()\n\t{\n\t\t$this->_where->close();\n\t\treturn $this;\n\t}", "public function or_having_open()\n\t{\n\t\t$this->having[] = array('ext_operator' => 'OR (');\n\n\t\treturn $this;\n\t}", "public function orHavingOpen()\n {\n $this->having[] = ['OR' => '('];\n \n return $this;\n }", "public function or_having_open(){\n $this->_having[] = array('OR' => '(');\n\n return $this;\n }", "public function orHavingOpen()\n {\n $this->having[] = ['OR' => '('];\n\n return $this;\n }", "public function orHavingGroup($group);", "public function and_having_close()\n {\n $this->_having[] = array('AND' => ')');\n\n return $this;\n }", "public function and_having_close()\n\t{\n\t\t$this->_having[] = ['AND' => ')'];\n\n\t\treturn $this;\n\t}", "public function and_where_close()\n\t{\n\t\treturn $this->whereClose();\n\t}", "public function or_where_close()\n\t{\n $this->get_where()->or_where_close();\n\t\treturn $this;\n\t}", "private function closeOpenGroups()\n {\n if ($this->inShutdown) {\n // we already closed\n return;\n }\n $data = $this->debug->getData();\n $data['groupPriorityStack'][] = 'main';\n while ($data['groupPriorityStack']) {\n $priority = \\array_pop($data['groupPriorityStack']);\n foreach ($data['groupStacks'][$priority] as $i => $info) {\n if (!$info['collect']) {\n continue;\n }\n unset($data['groupStacks'][$priority][$i]);\n $meta = array(\n 'channel' => $info['channel'],\n );\n if ($priority === 'main') {\n $data['log'][] = array('groupEnd', array(), $meta);\n } else {\n $data['logSummary'][$priority][] = array('groupEnd', array(), $meta);\n }\n }\n }\n $this->debug->setData($data);\n }", "public function andHavingClose()\r\n {\r\n $this->builder['having'][] = ['AND' => ')'];\r\n\r\n return $this;\r\n }", "public function group_end()\n {\n if($this->qb_where_group_count > 0) {\n // get data was cached\n $where_group = $this->qb_where_group_started[$this->qb_where_group_count];\n $type = $this->mongo_group_status[$this->qb_where_group_count][1];\n\n // restore counting of grouping\n $this->qb_where_group_count --;\n\n $this->_build_where_condition('qb_where',$where_group, $type);\n }\n\n return $this;\n }", "public function orWhereGroup() : self\n {\n if (!$this->stack[$this->idx]['gotFirstCondition']) {\n $this->stack[$this->idx]['query'] .= '(';\n $this->stack[$this->idx]['gotFirstCondition'] = true;\n } else {\n $this->stack[$this->idx]['query'] .= 'OR (';\n }\n $this->pushFrame();\n $this->stack[$this->idx]['gotWhere'] = true;\n return $this;\n }", "public function orConditionGroup();", "public function orWhereClose()\n\t{\n\t\treturn $this->whereClose();\n\t}", "public function closeGroup()\n {\n $this->groupSeq = -1;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the cache version key.
protected function getCacheVersionKey(): string { return $this->name.'.version'; }
[ "protected function getCacheVersionKey(): string\n {\n return $this->prefix.'.version';\n }", "protected function cacheKey() : string\n {\n return $this->cacheKey ?? $this->cacheKeyHash();\n }", "protected function cache_key() {\n\t\treturn 'tribe_plugin_upgrade_notice-' . hash( 'crc32b', $this->plugin_path . $this->current_version );\n\t}", "protected function cacheKey(): string\n {\n return sha1($this->namespace . $this->getIp());\n }", "private function cacheVersion(): string\n {\n return 'pest_'.version();\n }", "public function cacheKey();", "public function cacheKey() {\n // get cache id\n $id = $this->cacheId();\n\n return $this->cacheScope() . ( $id ? \".$id\" : '' );\n }", "public static function getCacheKey()\n {\n return self::CACHE_KEY. date('yW', time());\n }", "protected function getVersion(): int\n {\n if (array_key_exists($this->name, static::$versions)) {\n return static::$versions[$this->name];\n }\n\n static::$versions[$this->name] = (int) $this->store->get($this->getCacheVersionKey());\n\n return static::$versions[$this->name];\n }", "public function getCacheKey() {\r\n\t\tif ($this->_cacheKey === null) {\r\n\t\t\t$this->_cacheKey = \"ACurl:cachedRequest:\".sha1(serialize($this->getOptions()->toArray()));\r\n\t\t}\r\n\t\treturn $this->_cacheKey;\r\n\t}", "public static function get_cache_key( string $url ): string {\n\n\t\t/**\n\t\t * Transients get saved using _transient_timeout_ prefix. But the database only can have\n\t\t * 191 characters. So we only have 150 characters left for the hash value.\n\t\t */\n\t\treturn substr( sprintf( 'wpb_rs/r_cache/%s', self::hash( $url ) ), 0, 150 );\n\t}", "public function getCacheKey()\n {\n return sprintf( \"%s/%s-%s\",\n get_class( $this ),\n $this->getKey(),\n $this->updated_at->timestamp\n );\n }", "function get_databse_version_key() {\n return get_databse_table_name( false ) . '_db_version';\n}", "public function getVersionKeyName(): string {\n\t\treturn 'ref_' . $this->getKeyName();\n\t}", "public function getTokenCacheKey(): string\n {\n return $this->cache_key_token;\n }", "public function getCacheKey()\n {\n return sprintf(\"%s/%s\",\n get_class($this),\n $this->getKey()\n ) . (isset($this->attributes['updated_at']) ? '-' . $this->updated_at->timestamp : '');\n }", "public static function getCacheIdentifier();", "public function licenseCacheKey();", "protected function _getCacheKey()\n {\n return md5($this->_request_url);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retrieves an array of hostgroup names from a selected XI server
function get_xiserver_servicegroup_list($sid) { global $cfg; $timeout = grab_array_var($cfg,'default_timeout',15); $url = get_nagiosxi_backend_url($sid); $url.='&cmd=getservicegroups&orderby=servicegroup_name%3Aa&brevity=3'; $raw_xml = get_server_data_from_url($url,$timeout); return simplexml_load_string($raw_xml['body']); }
[ "public function creer_definition_hostListeGroups_ws() {\n\t\t$this ->onDebug ( __METHOD__, 1 );\n\t\t$datas = $this ->creer_definition_hostByName_get_ws ();\n\t\t$datas [\"selectGroups\"] = array ( \n\t\t\t\t\"groupid\", \n\t\t\t\t\"name\" );\n\t\t\n\t\t$this ->onDebug ( $datas, 2 );\n\t\treturn $datas;\n\t}", "function getGroupServerIDs($group_id) {\n\t\tglobal $fmdb, $__FM_CONFIG;\n\t\t\n\t\t$query = \"SELECT group_masters, group_slaves FROM `fm_{$__FM_CONFIG['fmDNS']['prefix']}server_groups` WHERE \n\t\t\t`account_id`='{$_SESSION['user']['account_id']}' AND `group_status`='active' AND `group_id`=$group_id\";\n\t\t$fmdb->get_results($query);\n\t\tif ($fmdb->num_rows) {\n\t\t\t$servers = array_merge((array) @explode(';', $fmdb->last_result[0]->group_masters), (array) @explode(';', $fmdb->last_result[0]->group_slaves));\n\t\t\treturn array_unique($servers);\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function GetHostsByHostGroup($arg)\n {\n $hosts = array();\n\n if (is_string($arg) || is_int($arg))\n {\n if ($this->IsValidAuthToken())\n {\n $hostGroupID = (is_int($arg))?($arg):($this->GetHostGroupID($arg));\n\n $request = new ZabbixWrapper();\n $request->Create(\"host.get\", $this->GetAuthToken(), $this->nonce++);\n $request->params = new ZabbixHostGetRequest();\n $request->params->output = array(\"hostid\", \"host\");\n $request->params->groupids = $hostGroupID;\n\n $response = $this->Send($request);\n\n if ($this->IsValidResponse($response))\n {\n foreach ($response[\"result\"] as $item)\n {\n $hosts[] = Host::WithNameAndID($item[\"host\"], $item[\"hostid\"]);\n }\n }\n }\n }\n\n return $hosts;\n }", "public function GetHostGroupNames()\n {\n $names = array();\n\n foreach ($this->GetHostGroups() as $item)\n {\n $names[] = $item->name;\n }\n\n return $names;\n }", "function misdn_groups_ports() {\n $ret = array();\n\n foreach(misdn_groups_list(1) as $group) {\n $ret[] = 'g:'.$group['name'];\n }\n \n foreach(misdn_ports_list_trunks() as $port) {\n $ret[] = $port['port'];\n }\n \n return $ret;\n}", "function getServersGroups($recordset = false, $group_id = false) {\n\t\t\tglobal $conf, $lang;\n\t\t\t$grps = array();\n\n\t\t\tif (isset($conf['srv_groups'])) {\n\t\t\t\tforeach ($conf['srv_groups'] as $i => $group) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t(($group_id === false) and (! isset($group['parents']))) /* root */\n\t\t\t\t\t\tor (\n\t\t\t\t\t\t\t($group_id !== false)\n\t\t\t\t\t\t\tand isset($group['parents'])\n\t\t\t\t\t\t\tand in_array($group_id,explode(',',\n\t\t\t\t\t\t\t\t\tpreg_replace('/\\s/', '', $group['parents'])\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t) /* nested group */\n\t\t\t\t\t)\n\t\t\t\t\t\t$grps[$i] = array(\n\t\t\t\t\t\t\t'id' => $i,\n\t\t\t\t\t\t\t'desc' => $group['desc'],\n\t\t\t\t\t\t\t'icon' => 'Servers',\n\t\t\t\t\t\t\t'action' => url('servers.php',\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'group' => field('id')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'branch' => url('servers.php',\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'action' => 'tree',\n\t\t\t\t\t\t\t\t\t'group' => $i\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($group_id === false)\n\t\t\t\t\t$grps['all'] = array(\n\t\t\t\t\t\t'id' => 'all',\n\t\t\t\t\t\t'desc' => $lang['strallservers'],\n\t\t\t\t\t\t'icon' => 'Servers',\n\t\t\t\t\t\t'action' => url('servers.php',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'group' => field('id')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'branch' => url('servers.php',\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'action' => 'tree',\n\t\t\t\t\t\t\t\t\t'group' => 'all'\n\t\t\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\n\t\t\tif ($recordset) {\n\t\t\t\tinclude_once('./classes/ArrayRecordSet.php');\n\t\t\t\treturn new ArrayRecordSet($grps);\n\t\t\t}\n\n\t\t\treturn $grps;\n\t\t}", "function getAllGroupInfo() {\n\tglobal $log, $adb;\n\t$log->debug('> getAllGroupInfo');\n\t$query='select * from vtiger_groups';\n\t$result = $adb->pquery($query, array());\n\t$num_rows=$adb->num_rows($result);\n\t$group_details=array();\n\tfor ($i=0; $i<$num_rows; $i++) {\n\t\t$grpInfo=array();\n\t\t$grpid=$adb->query_result($result, $i, 'groupid');\n\t\t$grpname=$adb->query_result($result, $i, 'groupname');\n\t\t$description=$adb->query_result($result, $i, 'description');\n\t\t$grpInfo[0]=$grpname;\n\t\t$grpInfo[1]=$description;\n\t\t$group_details[$grpid]=$grpInfo;\n\t}\n\t$log->debug('< getAllGroupInfo');\n\treturn $group_details;\n}", "function get_list() {\n\t\t$query = \"select cg_id, cg_name from \".$this->_db_table;\n\t\t$cloudusergroup_name_array = array();\n\t\t$cloudusergroup_name_array = htvcenter_db_get_result_double ($query);\n\t\treturn $cloudusergroup_name_array;\n\t}", "public static function googleServerList()\n {\n return GoogleServer::pluck('name', 'key')->toArray();\n /*\n [\n \"003745236201931391893:igsnhgfj79x\" => \"Group A\",\n \"003745236201931391893:gstsjpibsrr\" => \"Group B\",\n \"003745236201931391893:fnc4ssmvo8m\" => \"Group C\"\n ];\n */\n }", "public static function getGroups();", "function CLIENT_getNames($groupName=\"\")\n{\n\t$i=0;\n\n\t$res=CLIENT_query(\"\",\"\",\"\",\"\",$groupName);\n\twhile( $data = mysql_fetch_array($res) )\n\t\t$out[$i++]=$data[client];\n\n\treturn($out);\n}", "public function getHostGroups($deep=false) {\n\t\ttry {\n\t\t\tif (HostGroupDAL::$dataHostGroupFactory == null) {\n\t\t\t\t \n\t\t\t\t\tHostGroupDAL::$dataHostGroupFactory = @DAOFactory::getDAO($this->foundationURL, DAOFactory::FOUNDATIONWS_HOSTGROUP);\n\t\t\t}\n\t\t \n\t\t\treturn @HostGroupDAL::$dataHostGroupFactory->getHostGroups($deep);\n\t\t}\n\t\tcatch(SoapFault $exception) {\n\t\t \n\t\t\tthrow new DALException(\"An error occurred while connecting to the foundation webservice.\".$exception->getMessage());\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t \n\t\t\tthrow new DALException(\"An unexpected error occurred.\");\n\t\t}\n\t}", "public function getGroupNames()\n {\n return $this->conn->call( new XmlRpc( 'twiddler.getGroupNames' ) )->getData();\n }", "public function loadGroups() {\n $indexes = $this->storage->loadMultiple();\n /** @var \\Drupal\\search_api\\ServerInterface[] $servers */\n $servers = $this->serverStorage->loadMultiple();\n\n $this->sortByStatusThenAlphabetically($indexes);\n $this->sortByStatusThenAlphabetically($servers);\n\n $server_groups = [];\n foreach ($servers as $server) {\n $server_group = [\n 'server.' . $server->id() => $server,\n ];\n\n foreach ($server->getIndexes() as $index) {\n $server_group['index.' . $index->id()] = $index;\n // Remove this index from $index so it will finally only contain those\n // indexes not belonging to any server.\n unset($indexes[$index->id()]);\n }\n\n $server_groups['server.' . $server->id()] = $server_group;\n }\n\n return [\n 'servers' => $server_groups,\n 'lone_indexes' => $indexes,\n ];\n }", "function _GetFEUgroups()\n {\n $db =& $this->GetDb(); /* @var $db ADOConnection */\n \n $ret = array();\n $q = 'SELECT id,groupname,groupdesc FROM '.cms_db_prefix().'module_feusers_groups';\n $dbresult = $db->Execute( $q );\n if( $dbresult ) {\n while( $row = $dbresult->FetchRow() ) {\n $ret[ $row['id'] ] = $row['groupdesc'];\n }\n }\n return $ret;\n }", "public function findHostGroups(?int $hostId): array;", "public static function getClientGroups() {\r\n return self::sendRequest(array('action' => 'getclientgroups'));\r\n }", "public function get_hosts_set() {\n\t\t$services = ServicePool_Model::all()->reduce_by('groups', $this->get_name(), '>=');\n\t\t$all = HostPool_Model::all();\n\t\t$hosts = HostPool_Model::none();\n\t\tforeach($services->it(array('host.name')) as $obj) {\n\t\t\t$hosts = $hosts->union($all->reduce_by('name', $obj->get_host()->get_name(), '='));\n\t\t}\n\t\treturn $hosts;\n\t}", "public static function getHosts();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read all the task works of the selected person.
public function read_all($person_id = 0) { $this->db->select( 'task_work.id AS id,' . 'task_work.description AS description,' . 'task_work.work_hours AS work_hours,' . 'task_work.work_date AS work_date,' . 'task_work.task_id AS task_id,' . 'task_work.person_id AS person_id,' . 'task.task_name AS task_name' ); $this->db->from('task_work'); $this->db->join('task', 'task_work.task_id = task.id', 'left'); $this->db->join('person', 'task_work.person_id = person.id', 'left'); if ($person_id > 0) { $this->db->where('task_work.person_id', $person_id); } $this->db->order_by('task.task_name'); $query = $this->db->get(); return $query->result(); }
[ "public function getWork();", "public function read_person_tasks_in_progress($id)\n {\n $sql = 'SELECT s.task_name, s.id ' .\n 'FROM sprint_task AS s ' .\n 'INNER JOIN sprint_task_person AS p ON p.sprint_task_id = s.id ' .\n 'WHERE p.person_id = ? ' .\n 'AND s.status_id = 2 ';\n \n $query = $this->db->query($sql, array($id));\n return $query->result_array();\n }", "public function read_person_tasks_in_progress($id)\n {\n // subquery and a parameter in a query\n $sql = 'SELECT s.task_name, s.id ' .\n 'FROM task AS s ' .\n 'INNER JOIN task_person AS p ON p.task_id = s.id ' .\n 'WHERE p.person_id = ? ' .\n 'AND s.status_id = 2 ';\n \n $query = $this->db->query($sql, array($id));\n return $query->result_array();\n }", "public function fetchAllWork()\n\t{\n\t\treturn $this->fetchAll('SELECT * FROM works ORDER BY id DESC');\n\t}", "public function getTasks();", "public static function get_personal_task_list()\n {\n $_user = api_get_user_info();\n\n $tbl_blogs = Database::get_course_table(TABLE_BLOGS);\n $tbl_blogs_tasks_rel_user \t= Database::get_course_table(TABLE_BLOGS_TASKS_REL_USER);\n $tbl_blogs_tasks = Database::get_course_table(TABLE_BLOGS_TASKS);\n\n $course_id = api_get_course_int_id();\n\n if ($_user['user_id']) {\n $sql = \"SELECT task_rel_user.*, task.title, blog.blog_name\n FROM $tbl_blogs_tasks_rel_user task_rel_user\n INNER JOIN $tbl_blogs_tasks task\n ON task_rel_user.task_id = task.task_id\n INNER JOIN $tbl_blogs blog\n ON task_rel_user.blog_id = blog.blog_id\n AND blog.blog_id = \".intval($_GET['blog_id']).\"\n WHERE\n task.c_id = $course_id AND\n blog.c_id = $course_id AND\n task_rel_user.c_id = $course_id AND\n task_rel_user.user_id = \".(int)$_user['user_id'].\"\n ORDER BY target_date ASC\";\n\n $result = Database::query($sql);\n\n if (Database::num_rows($result) > 0) {\n echo '<ul>';\n while ($mytask = Database::fetch_array($result)) {\n echo '<li><a href=\"blog.php?action=execute_task&blog_id=' . $mytask['blog_id'] . '&task_id='.stripslashes($mytask['task_id']) . '\" title=\"[Blog: '.stripslashes($mytask['blog_name']) . '] ' . get_lang('ExecuteThisTask') . '\">'.stripslashes($mytask['title']) . '</a></li>';\n }\n echo '<ul>';\n } else {\n echo get_lang('NoTasks');\n }\n } else {\n echo get_lang('NoTasks');\n }\n }", "protected function listcurrentTasks()\n {\n $stmt = $this->task->read();\n $num = $stmt->rowCount();\n \n if ($num>0) {\n \n $task_arr = [];\n $task_arr[\"records\"] = [];\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $task_record=array(\n \"id\" => $id,\n \"task\" => $task,\n \"due_date\" => $this->showDate($due_date),\n \"is_completed\" => ($is_completed == 1) ? 'Yes' : 'No',\n );\n array_push($task_arr[\"records\"], $task_record);\n }\n \n return $this->_response(array(\"status\" => \"success\", \"data\" => $task_arr[\"records\"], \"message\" => \"TO-DO Listing\", 200));\n }\n \n return $this->_response(array(\"status\" => \"error\",\"message\" => \"No data available\", 500));\n }", "public function index()\n {\n $userId = auth()->user()->id;\n return Task::where('user_id', $userId)->get();\n }", "function read(){\n\n // If id property is present fetch single record\n if($this->id){\n\n // SQL query for a single shift, \n // relationship is unknown so fetch from both relationship tables with UNION\n $query = \"SELECT e.Name, s.StartTime, s.EndTime, st.name as TaskName\n FROM employee e, {$this->tableName} s \n INNER JOIN {$this->relationship[0]->relTableName} ss ON s.Id = ss.Shift_id\n INNER JOIN {$this->relationship[0]->tableName} st ON ss.{$this->relationship[0]->idColumnName} = st.Id\n WHERE e.Id = :employee_Id\n AND s.employee_Id = :employee_Id\n AND s.Id = :shiftId\n \n UNION\n\n SELECT e.Name, s.StartTime, s.EndTime, st.name as TaskName\n FROM employee e, {$this->tableName} s \n INNER JOIN {$this->relationship[1]->relTableName} ss ON s.Id = ss.Shift_Id\n INNER JOIN {$this->relationship[1]->tableName} st ON ss.{$this->relationship[1]->idColumnName} = st.Id\n WHERE e.Id = :employee_Id\n AND s.employee_Id = :employee_Id\n AND s.Id = :shiftId\";\n\n }elseif($this->date){\n\n // SQL query to search shift by date\n // fetch shift from both assignment and subtasks so UNION table is needed\n $query = \"SELECT e.Name, s.Id, s.StartTime, s.EndTime, st.name as TaskName\n FROM employee e, {$this->tableName} s \n INNER JOIN {$this->relationship[0]->relTableName} ss ON s.Id = ss.Shift_Id\n INNER JOIN {$this->relationship[0]->tableName} st ON ss.{$this->relationship[0]->idColumnName} = st.Id\n WHERE e.Id = :employee_Id\n AND s.employee_Id = :employee_Id\n AND YEAR(s.StartTime) = :y\n AND MONTH(s.StartTime) = :m\n \n UNION \n \n SELECT e.Name, s.Id, s.StartTime, s.EndTime, a.name\n FROM employee e, {$this->tableName} s \n INNER JOIN {$this->relationship[1]->relTableName} sa ON s.Id = sa.Shift_Id\n INNER JOIN {$this->relationship[1]->tableName} a ON sa.{$this->relationship[1]->idColumnName} = a.Id\n WHERE e.Id = :employee_Id\n AND s.employee_Id = :employee_Id\n AND YEAR(s.StartTime) = :y \n AND MONTH(s.StartTime) = :m\n ORDER BY StartTime DESC\";\n }\n\n // Prepare query statement\n $stmt = $this->conn->prepare($query);\n\n if($this->id){\n \n // Santize and bind property\n $this->id = parent::sanitize($this->id);\n $stmt->bindParam(\":shiftId\", $this->id);\n }\n \n if($this->date){\n \n // Sanitizes property\n $this->date = parent::sanitize($this->date);\n \n // Format date to be bound to statement\n $dateArr = explode(\"-\", $this->date);\n $year = $dateArr[0];\n $month = $dateArr[1];\n\n // Bind properties to statement\n $stmt->bindParam(\":y\", $year);\n $stmt->bindParam(\":m\", $month);\n }\n\n // Santize and bind property\n $this->employee_Id = parent::sanitize($this->employee_Id);\n $stmt->bindParam(\":employee_Id\", $this->employee_Id);\n\n // Execute query\n $stmt->execute();\n \n // Creates associative array with keys to contain values from fetched from database\n $shiftProp = array_fill_keys(array(\"id\", \"name\", \"startTime\", \"endTime\", \"taskName\"),\"\");\n // Populate array with values from database\n $dataArr = parent::fetchRows($stmt, $shiftProp);\n\n return $dataArr;\n }", "function userDocuments($task_id) {\r\n //project related task details\r\n $userId = $this->Session->read(\"userid\");\r\n //To get the docs submitted by the user corresponding to a task\r\n $taskDocs = $this->Project->getTasksDocsByUser($task_id, $userId);\r\n $taskOtherComments = $this->projComments->find(\"all\", array(\r\n \"conditions\" => \"projComments.comment_type = 'task' and projComments.task_id = \" . $task_id,\r\n \"fields\" => \"projComments.*, User.id, User.firstname, User.lastname\",\r\n \"joins\" => array(\r\n array(\"type\" => \"inner\",\r\n \"table\" => \"users\",\r\n \"alias\" => \"User\",\r\n \"conditions\" => array(\"User.id = projComments.posted_by\")),\r\n ),\r\n ));\r\n\t\t\r\n\t\t\r\n $this->set(\"taskOtherComments\", $taskOtherComments);\r\n $this->set(\"task_id\", $task_id);\r\n $this->set(\"canChnage\", isset($this->request->query['s']) && $this->request->query['s'] == \"c\" ? 0 : 1);\r\n $this->set(\"taskDocs\", $taskDocs);\r\n $this->render(\"userdocuments\", \"ajax\");\r\n }", "public function testTaskWorkSetTaskRead()\n {\n }", "public function getWorkByName($name)\n {\n return $this->worksModel->getByName($name);\n }", "function getTasks() {\n\tglobal $dbCreds;\n\n\t// Connect to database\n\t$dbAccess=new dbControl($dbCreds['host'],$dbCreds['database'],$dbCreds['user'],$dbCreds['password']);\n\t// $dbAccess=new dbControl(\"localhost\",\"tasklist\",\"taskuser\",\"password\");\n\n\t// Check if db connection was successful\n\tif ($dbAccess==null) {\n\t\techo \"<center>Error: Cannot connect to database!<br>\";\n\t\techo \"<a href='index.php' style='color: white;'>Okay</a><br><br></center>\";\n\t\tdie;\n\t}\n\n\t// Check if there has been an error retrieving records from db\n\t$sqlrecords=$dbAccess->readDbTasks($_SESSION['loginUser']);\n/*\tif ($sqlrecords==null) {\n\t\techo \"<center>Error: fetching tasks from database!<br>\";\n\t\techo \"<a href='taskList.php' style='color: white;'>Okay</a><br><br></center>\";\n\t\t$dbAccess->closeDb();\n\t\tdie;\n\t}\n*/\n\t// Check if tasks exist in the database and if so, display them\n\tif (count($sqlrecords)==0) {\n\t\t\techo \"<center>No tasks to display!</center>\";\n\t\t\t$_SESSION['taskRecords']=null;\n\t}\n\telse {\n\t\t$_SESSION['taskRecords']=$sqlrecords;\n\t\tdisplayTasks($sqlrecords);\n\t}\n\n\t// Close DB connection\n\t$dbAccess->closeDb();\n}", "public function getTasklist();", "function getTasks(){\n $str_query = \"Select * from task\";\n return $this->query ($str_query);\n }", "public function getWork($id)\n {\n return $this->worksModel->get($id);\n }", "public static function GetDocumentsForActiveTask($activeTask, $caller) {\n //First thing, let's get the task location id's for this active task\n $taskLocationDAO = new \\Applications\\PMTool\\Models\\Dao\\Task_location();\n $taskLocationDAO->setTask_id($activeTask[\\Library\\Enums\\SessionKeys::TaskObj]->task_id());\n $dal = $caller->managers()->getManagerOf(\"Task\");\n $location_data = $dal->selectMany($taskLocationDAO, \"task_id\");\n\n //Fetch all documents\n //Ideally we need a method in BaseManager which would let us\n //query a db field with \"LIKE operator\" or selectMany should \n //be modified to do the same\n $documentDAO = new \\Applications\\PMTool\\Models\\Dao\\Document();\n $dal = $caller->managers()->getManagerOf(\"Document\");\n $documents = $dal->selectManyByCategoryAndId(\"task_location\");\n\n $docData = array();\n //Return empty array if there are no documents found\n if (count($documents) === 0) {\n return $docData;\n }\n //Otherwise loop on the location data \n foreach ($location_data as $location) {\n foreach ($documents as $doc) {\n if (strpos($doc->document_value(), $location->task_location_id() . '_') === 0) {\n array_push($docData, $doc);\n }\n }\n }\n\n //Return the doc array\n return $docData;\n }", "function hasWritingRightOnTasksOfAWork($isInTheProject, $work)\n{\n //if work is empty or false, the query to get it from the db has probably failed, so the authorization cannot be given.\n if (empty($work) || $work == false) {\n return false;\n }\n $open = $work['open'];\n $visible = $work['visible'];\n if (isAtLeastEqual($work['state'], [WORK_STATE_DONE, WORK_STATE_TODO]) == false) {\n if ($isInTheProject) {\n return true;\n }\n if ($visible == 1) {\n if ($open == 1) {\n return true;\n }\n }\n }\n return false;\n}", "public function getTaskList();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clean values of all variables of the object for storage. also add slashes and quote string whereever needed CleanVars only contains changed and cleaned variables Reference is used for PHP4 compliance
function cleanVars(&$object) { $ts =& MyTextSanitizer::getInstance(); $errors = array(); $vars = $object->getVars(); $object->cleanVars = array(); foreach ($vars as $k => $v) { if(!$v["changed"]) { continue; } $cleanv = $v['value']; switch ($v["data_type"]) { case XOBJ_DTYPE_TXTBOX: if ($v['required'] && $cleanv != '0' && $cleanv == '') { $errors[] = sprintf( _XOBJ_ERR_REQUIRED, $k ); continue; } if (isset($v['maxlength']) && strlen($cleanv) > intval($v['maxlength'])) { $errors[] = sprintf( _XOBJ_ERR_SHORTERTHAN, $k, intval( $v['maxlength'] ) ); continue; } if (!$v['not_gpc']) { $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv)); } else { $cleanv = $ts->censorString($cleanv); } $cleanv = $this->handler->db->quote($cleanv); break; case XOBJ_DTYPE_TXTAREA: if ($v['required'] && $cleanv != '0' && $cleanv == '') { $errors[] = sprintf( _XOBJ_ERR_REQUIRED, $k ); continue; } if (!$v['not_gpc']) { if ( !empty($vars['dohtml']['value']) ) { $cleanv = $ts->textFilter($cleanv); } $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv)); } else { $cleanv = $ts->censorString($cleanv); } $cleanv = $this->handler->db->quote($cleanv); break; case XOBJ_DTYPE_SOURCE: $cleanv = trim($cleanv); if (!$v['not_gpc']) { $cleanv = $ts->stripSlashesGPC($cleanv); } else { $cleanv = $cleanv; } $cleanv = $this->handler->db->quote($cleanv); break; case XOBJ_DTYPE_EMAIL: $cleanv = trim($cleanv); if ($v['required'] && $cleanv == '') { $errors[] = sprintf( _XOBJ_ERR_REQUIRED, $k ); continue; } if ($cleanv != '' && !preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$cleanv)) { $errors[] = "Invalid Email"; continue; } if (!$v['not_gpc']) { $cleanv = $ts->stripSlashesGPC($cleanv); } $cleanv = $this->handler->db->quote($cleanv); break; case XOBJ_DTYPE_URL: $cleanv = trim($cleanv); if ($v['required'] && $cleanv == '') { $errors[] = sprintf( _XOBJ_ERR_REQUIRED, $k ); continue; } if ($cleanv != '' && !preg_match("/^http[s]*:\/\//i", $cleanv)) { $cleanv = 'http://' . $cleanv; } if (!$v['not_gpc']) { $cleanv = $ts->stripSlashesGPC($cleanv); } $cleanv = $this->handler->db->quote($cleanv); break; case XOBJ_DTYPE_OTHER: $cleanv = $this->handler->db->quote($cleanv); break; case XOBJ_DTYPE_INT: $cleanv = intval($cleanv); break; case XOBJ_DTYPE_ARRAY: if ( !$v['not_gpc'] ){ $cleanv = array_map(array(&$ts, "stripSlashesGPC"), $cleanv); } foreach (array_keys($cleanv) as $key) { $cleanv[$key] = str_replace('\\"','"', addslashes($cleanv[$key])); } // TODO: Not encoding safe, should try base64_encode -- phppp $cleanv = "'" . serialize($cleanv) . "'"; break; case XOBJ_DTYPE_STIME: case XOBJ_DTYPE_MTIME: case XOBJ_DTYPE_LTIME: $cleanv = !is_string($cleanv) ? intval($cleanv) : strtotime($cleanv); break; default: $cleanv = $this->handler->db->quote($cleanv); break; } $object->cleanVars[$k] = $cleanv; } if (!empty($errors)) { $object->setErrors($errors); } $object->unsetDirty(); return empty($errors) ? true : false; }
[ "function sanitize()\n {\n if ( $this->allowFramewerkVariables == false )\n {\n foreach ( $this->objects AS $name=>$object )\n {\n $this->fDebug->add('Sanitizing the input from: ' . $name, 8);\n $object->sanitize(true);\n }\n }\n }", "private function cleanVars()\r\n {\r\n foreach ($this->vars as &$var) {\r\n $var = htmlspecialchars($var);\r\n }\r\n }", "protected function _clean(){\r\n if(get_magic_quotes_gpc()){\r\n $this->_data = $this->_stripSlashes($this->_data);\r\n $this->_post = $this->_stripSlashes($this->_post);\r\n $this->_get = $this->_stripSlashes($this->_get);\r\n }\r\n }", "private function sanitize() {}", "function cleanvars($variable) {\n\t\t$cleanvariable = stripslashes($variable);\n\t\t$cleanvariable = trim($cleanvariable);\n\t\treturn $cleanvariable;\n\t}", "public function clean()\n {\n $this->variables = array();\n $this->tplengine->clearAllAssigns();\n }", "function dPTrimAll() {\n\t\t$trim_arr = get_object_vars($this);\n\t\tforeach ($trim_arr as $trim_key => $trim_val) {\n\t\t\tif (!(strcasecmp(gettype($trim_val), 'string'))) {\n\t\t\t\t$this->{$trim_key} = trim($trim_val);\n\t\t\t}\n\t\t}\n\t}", "private function clean_data()\n {\n $this->clean = array();\n foreach($this->fields as $name => &$field)\n $this->clean[$name] = $field->get_value();\n }", "public function clearVars () {\n $vars = get_object_vars($this);\n foreach ($vars as $key => $value) {\n if (substr($key, 0, 1) != '_' && !in_array($key,$this->_persistentVars)) {\n unset($this->$key);\n }\n }\n }", "protected function preprocessVars(){\n\t\t// Call magic methods explicitly as it makes it a bit clearer what is going on,\n\t\t// and avoids problems with __set() not getting called.\n\t\tif($this->__isset('this')){\n\t\t\t$this->__set(self::PREFIX . '_this', $this->__get('this'));\n\t\t\t$this->__unset('this');\n\t\t}\n\t}", "private function clearVariables()\n {\n $this->_options = array();\n $this->_attributes = array();\n $this->_tag = '';\n $this->_text = '';\n $this->_value = '';\n\n }", "public function sanitize()\n {\n $this->postData = filter_var_array($this->postData, FILTER_SANITIZE_STRING);\n $this->getData = filter_var_array($this->getData, FILTER_SANITIZE_STRING);\n }", "function setObjectValuesFree()\n\t{\n\t\t$this -> tableName\t\t=\t\"\";\t\n\t\t$this -> fieldValues\t\t\t=\tarray();\t// normal values\n\t\t$this -> fieldValuesNotQuotes\t=\tarray();\t// values that do not require quotes around them\n\t\t$this -> fieldValuesSpecial\t\t=\tarray();\t// values that require addslashes or striptags\n\t\t$this -> selectFields\t=\t\"\";\n\t\t$this -> query \t\t\t= \t\"\";\n\t\t$this -> condition\t\t=\t\"\";\n\t}", "private function sanitize() {\n\n //\n }", "public static function cleanVar($var)\n {\n if (!get_magic_quotes_gpc()) {\n return $var;\n }\n\n if (is_array($var)) {\n foreach ($var as $k => $v) {\n $var[$k] = self::cleanVar($v);\n }\n } else {\n System::stripslashes($var);\n }\n\n return $var;\n }", "function Clean()\r\n\t{\r\n\t\t$this->_strWhere = '';\r\n\t\t$this->_arrWhere = Array();\r\n\t}", "private function clean(){\n\t\t$this->error = NULL;\n\t\t$this->commands = NULL;\n\t\t$this->arguments = NULL;\n\t\t$this->lines = NULL;\n\t}", "function cleanParam()\n\t{\n\n\t\tif (!empty($this->ref)) $this->ref = trim($this->ref);\n\t\tif (!empty($this->nom)) $this->nom = trim($this->nom);\n\t\tif (!empty($this->soc1)) $this->soc1 = trim($this->soc1);\n\t\tif (!empty($this->soc2)) $this->soc2 = trim($this->soc2);\n\t\tif (!empty($this->tarif)) $this->tarif = trim($this->tarif);\n\t\tif (!empty($this->date)) $this->date = trim($this->date);\n\t\tif (!empty($this->terrain)) $this->terrain = trim($this->terrain);\n\t\tif (!empty($this->categ)) $this->categ = trim($this->categ);\n\n\t}", "protected function _sanitize_globals() {\n // Is $_GET data allowed? If not we'll set the $_GET to an empty array\n if ($this->_allow_get_array === FALSE) {\n $_GET = array();\n } elseif (is_array($_GET)) {\n foreach ($_GET as $key => $val) {\n $_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n }\n }\n\n // Clean $_POST Data\n if (is_array($_POST)) {\n foreach ($_POST as $key => $val) {\n $_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n }\n }\n\n // Clean $_COOKIE Data\n if (is_array($_COOKIE)) {\n // Also get rid of specially treated cookies that might be set by a server\n // or silly application, that are of no use to a CI application anyway\n // but that when present will trip our 'Disallowed Key Characters' alarm\n // http://www.ietf.org/rfc/rfc2109.txt\n // note that the key names below are single quoted strings, and are not PHP variables\n unset(\n $_COOKIE['$Version'], $_COOKIE['$Path'], $_COOKIE['$Domain']\n );\n\n foreach ($_COOKIE as $key => $val) {\n if (($cookie_key = $this->_clean_input_keys($key)) !== FALSE) {\n $_COOKIE[$cookie_key] = $this->_clean_input_data($val);\n } else {\n unset($_COOKIE[$key]);\n }\n }\n }\n\n // Sanitize PHP_SELF\n $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set session key and value Uses setSession method on alvin\phpmvc\Session
public function setSession(string $key, $value) { Application::$app->session->setSession($key, $value); }
[ "function msession_set($session, $name, $value){}", "function msession_set($session, $name, $value) {}", "public function setItem($key, $value) {\n $_SESSION[self::$sessionKey][$key] = $value;\n }", "public function set($key, $value)\n\t{\n\t\t$data = Session::get($this->controllerName);\n\n\t\tif(!is_array($data))\n\t\t\t$data = array();\n\n\t\t$data[$key] = $value;\n\t\tSession::set($this->controllerName, $data);\n\t}", "function setSessionValue($name, $value);", "public function setSessionItem($key, $session)\n {\n return $this->session[$key] = $session;\n }", "public function setSessionKey($value)\n {\n return $this->set('SessionKey', $value);\n }", "function _setsession() {\n\t\t$sn = $this->_input['name'];\n\t\t$sv = $this->_input['value'];\n\t\t$_SESSION[$sn] = $sv;\n\t}", "protected function setSession()\n {\n $_SESSION[$this->session_key] = $this->token;\n }", "public static function set($name, $value) {\n $_SESSION[$name] = $value;\n }", "public function addSessionParameter($key, $value)\n {\n $this->session[$key] = $value;\n }", "public function setSessionVariable($name,$value){\n\t\t$_SESSION[$name] = $value;\n\t}", "public function __setSession(SessionInterface $session);", "public static function put($key, $value = null)\n {\n $_SESSION[$key] = $value;\n }", "private function sessionKey()\n {\n $this->sessionKey = $this->url;\n }", "protected function setSessionData($name, $value) {\n $_SESSION[$name] = $value;\n }", "public static function set($name,$value){\n\treturn $_SESSION[$name]= $value;\n}", "public function setSessionID($session) {\n\t $this->sessionID = $session;\n\t}", "function setSession()\n {\n\t\tsession_start();\n\n $key = session_id().'_'.$_SERVER['REMOTE_ADDR'];\n\n\t\t$this->session = new Session($key);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add necessary data for panel.
public function add_panel_data( $data ) { $data['postMeta'] = $this->page_values; $data['fusionPageOptions'] = $this->page_options; $data['fusionElementsOptions'] = $this->fusion_builder_options; $data['singular'] = is_singular() || ( class_exists( 'WooCommerce' ) && is_shop() ) || ( is_home() && ! is_front_page() ); $data['featured_image_default'] = $this->get_featured_image_object(); return $data; }
[ "public function add_panel(): void {\n\t\tif ( $this->panel ) {\n\t\t\tKirki::add_panel(\n\t\t\t\t$this->panel['id'],\n\t\t\t\t[\n\t\t\t\t\t'priority' => $this->panel['priority'] ?? 10,\n\t\t\t\t\t'title' => esc_html( $this->panel['title'] ),\n\t\t\t\t\t'description' => esc_html( $this->panel['description'] ),\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\t}", "public static function product_data_panels()\n {\n }", "private function register_panel(): void\n {\n if (null !== $this->panel) {\n Kirki::add_panel(\n $this->panel_name,\n [\n 'priority' => $this->panel_priority,\n 'title' => $this->panel['title'],\n 'description' => $this->panel['description'],\n ]\n );\n }\n }", "function _add_panels ()\n {\n parent::_add_panels ();\n\n $panel =& $this->panel_at ('folder');\n $panel->rows = 10;\n $panel->columns = 2;\n }", "public static function product_data_panels() {\n\t\tinclude dirname( __FILE__ ) . '/templates/html-product-data-extensions.php';\n\t}", "function cusproopt_product_data_panels() {\n\t\tglobal $post;\n\t\t$post_id = $post->ID;\n\n\t\t$_cusproopt_position = get_post_meta( $post_id, '_custom_product_option', true);\n\n\t\tinclude 'admin/html-cusproopt-panel.php';\n\t}", "public function prepareData()\n {\n $layoutData = $this->prepareLayoutData();\n $pageData = $this->preparePageData();\n\n $this\n ->addLayout($layoutData)\n ->addPage($pageData['slug'], $pageData['data'])\n ;\n }", "public function addPanels()\n {\n foreach (func_get_args() as $panel) {\n $this->addPanel($panel);\n }\n }", "public function add_data();", "protected function addPayloadData()\n {\n if ($this->payload) {\n $this->view->addData(\n [\n 'status' => $this->payload->getStatus(),\n 'output' => $this->payload->getOutput(),\n 'input' => $this->payload->getInput(),\n 'messages' => $this->payload->getMessages(),\n 'extras' => $this->payload->getExtras()\n ]\n );\n }\n }", "public function add_panel_form() {\n\n fusion_confirm_exit();\n\n $settings = fusion_get_settings();\n\n if (isset($_POST['cancel'])) {\n redirect(clean_request('section=listpanel', ['action', 'panel_id', 'section'], FALSE));\n }\n\n if (isset($_POST['panel_preview']) && $settings['allow_php_exe']) {\n $panel_title = form_sanitizer($_POST['panel_name'], \"\", \"panel_name\");\n if (\\defender::safe()) {\n ob_start();\n echo openmodal(\"cp_preview\", $panel_title);\n if (fusion_get_settings(\"allow_php_exe\")) {\n ob_start();\n eval(\"?>\".stripslashes($_POST['panel_content']).\"<?php \");\n $eval = ob_get_contents();\n ob_end_clean();\n echo $eval;\n } else {\n echo \"<p>\".nl2br(parse_textarea($_POST['panel_content'], FALSE, FALSE)).\"</p>\\n\";\n }\n echo closemodal();\n add_to_footer(ob_get_contents());\n ob_end_clean();\n }\n $this->data = [\n \"panel_id\" => form_sanitizer($_POST['panel_id'], 0, \"panel_id\"),\n \"panel_name\" => form_sanitizer($_POST['panel_name'], \"\", \"panel_name\"),\n \"panel_filename\" => form_sanitizer($_POST['panel_filename'], \"\", \"panel_filename\"),\n \"panel_side\" => form_sanitizer($_POST['panel_side'], \"\", \"panel_side\"),\n \"panel_content\" => form_sanitizer($_POST['panel_content'], \"\", \"panel_content\"),\n \"panel_restriction\" => form_sanitizer($_POST['panel_restriction'], \"\", \"panel_restriction\"),\n \"panel_url_list\" => form_sanitizer($_POST['panel_url_list'], \"\", \"panel_url_list\"),\n \"panel_display\" => form_sanitizer($_POST['panel_display'], \"\", \"panel_display\"),\n \"panel_access\" => form_sanitizer($_POST['panel_access'], iGUEST, \"panel_access\"),\n \"panel_languages\" => !empty($_POST['panel_languages']) ? form_sanitizer($_POST['panel_languages'], \"\", \"panel_languages\") : LANGUAGE\n ];\n }\n\n echo openform('panel_form', 'post', $this->formaction, ['class' => 'spacer-sm']);\n\n echo \"<div class='spacer-xs'>\\n\";\n echo form_button('cancel', self::$locale['cancel'], self::$locale['cancel'], ['class' => 'btn-default m-r-10', 'input_id' => 'btn1']);\n if ($settings['allow_php_exe']) {\n echo form_button('panel_preview', self::$locale['preview'], self::$locale['preview'], ['class' => 'm-l-10 btn-default', 'input_id' => 'btn2']);\n }\n echo form_button('panel_save', self::$locale['461'], self::$locale['460'], ['class' => 'btn-success', 'input_id' => 'btn3']);\n echo \"</div>\\n\";\n\n\n echo \"<div class='row'>\\n\";\n echo \"<div class='col-xs-12 col-sm-8'>\\n\";\n openside('');\n echo form_hidden('panel_id', '', $this->data['panel_id']);\n echo form_text('panel_name', self::$locale['452'], $this->data['panel_name'], [\n 'inline' => TRUE,\n 'required' => TRUE\n ]);\n echo form_select('panel_filename', self::$locale['453'], $this->data['panel_filename'], [\n 'options' => self::get_panelOpts(),\n 'inline' => TRUE\n ]);\n $grid_opts = self::get_panel_grid();\n echo form_select('panel_side', self::$locale['457'], $this->data['panel_side'], [\n 'options' => $grid_opts,\n 'inline' => TRUE\n ]);\n closeside();\n openside('');\n add_to_jquery(\"\n \".(($this->data['panel_restriction'] == 3 || $this->data['panel_restriction'] == 2) ? \"$('#panel_url_list-grp').hide();\" : '').\"\n $('#panel_restriction').bind('change', function(e) {\n if ($(this).val() == '3' || $(this).val() == '2') { $('#panel_url_list-grp').hide(); } else { $('#panel_url_list-grp').show(); }\n });\n \");\n echo form_select('panel_restriction', self::$locale['468'], $this->data['panel_restriction'], [\n 'options' => self::get_includeOpts(),\n 'inline' => TRUE\n ]);\n echo \"<div id='panel_url_list-grp'>\\n\";\n echo form_textarea('panel_url_list', self::$locale['462'], $this->data['panel_url_list'], [\n 'inline' => FALSE,\n //'required' => TRUE\n ]);\n echo \"<div class='text-smaller'>\".self::$locale['463'].\" <br />\n /home.php <br />\n /infusions/news* <br />\n /infusions/news/news.php <br />\n /infusions/forum* <br />\n /infusions/forum/index.php <br />\n </div>\\n\";\n echo \"</div>\\n\";\n echo form_hidden('panel_display', '', $this->data['panel_display']);\n closeside();\n add_to_jquery(\"\n \".((!empty($this->data['panel_filename']) && $this->data['panel_filename'] !== \"none\") ? \"$('#pgrp').hide();\" : \"$('#pgrp').show();\").\"\n $('#panel_filename').bind('change', function(e) {\n var panel_val = $(this).val();\n\n if ($(this).val() !='none') { $('#pgrp').hide(); } else { $('#pgrp').show(); }\n });\n \");\n\n echo \"<div id='pgrp'>\\n\";\n echo form_textarea('panel_content', self::$locale['455'], $this->data['panel_content'], [\n 'html' => fusion_get_settings(\"allow_php_exe\") ? FALSE : TRUE,\n 'form_name' => 'panel_form',\n 'autosize' => TRUE,\n 'preview' => fusion_get_settings(\"allow_php_exe\") ? FALSE : TRUE,\n ]);\n echo \"</div>\\n\";\n\n echo \"</div>\\n<div class='col-xs-12 col-sm-4'>\\n\";\n openside('');\n echo form_select('panel_access', self::$locale['458'], $this->data['panel_access'], [\"options\" => self::get_accessOpts()]);\n closeside();\n openside('');\n echo \"<label class='label-control m-b-10'>\".self::$locale['466'].\"</label>\\n\";\n\n $languages = !empty($this->data['panel_languages']) && stristr($this->data['panel_languages'], \".\") ? explode('.',\n $this->data['panel_languages']) : $this->data['panel_languages'];\n if (!empty($languages) && is_array($languages)) {\n $languages = array_flip($languages);\n }\n\n foreach (fusion_get_enabled_languages() as $language_key => $language_name) {\n\n if (!empty($languages) && is_array($languages)) {\n $value = isset($languages[$language_key]) ? $language_key : \"\";\n } else {\n $value = $languages == $language_key ? $languages : \"\";\n }\n\n echo form_checkbox('panel_languages[]', $language_name, $value, [\n 'class' => 'm-b-0',\n 'value' => $language_key,\n \"reverse_label\" => TRUE,\n 'input_id' => 'panel_lang-'.$language_key\n ]);\n }\n closeside();\n echo \"</div>\\n\";\n echo \"</div>\\n\";\n echo form_button('cancel', self::$locale['cancel'], self::$locale['cancel'], ['class' => 'btn-default m-r-10']);\n if ($settings['allow_php_exe']) {\n echo form_button('panel_preview', self::$locale['preview'], self::$locale['preview'], ['class' => 'm-l-10 btn-default']);\n }\n echo form_button('panel_save', self::$locale['461'], self::$locale['460'], ['class' => 'btn-success']);\n echo closeform();\n\n }", "protected function setLayoutComponents()\n {\n $this->data['header'] =\n $this->openCart->load->controller('common/header');\n $this->data['column_left'] =\n $this->openCart->load->controller('common/column_left');\n $this->data['footer'] = $this->openCart->load->controller('common/footer');\n }", "public function product_write_panel()\n {\n\n global $post;\n\n // Pull the field data out of the database\n $available_fields = array();\n $available_fields[] = maybe_unserialize(get_post_meta($post->ID, 'wc_productdata_options', true));\n\n if ($available_fields) {\n\n // Display fields panel\n foreach ($available_fields as $available_field) {\n\n $fields = $this->wc_fields;\n\n if ($fields == null) {\n return;\n }\n\n\n foreach ($fields as $key => $tab) {\n\n echo '<div id=\"' . $key . '\" class=\"panel woocommerce_options_panel wc_cpdf_tab atf-fields\">'.\n '<div class=\"options_group\">';\n\n foreach ($tab['items'] as $field_id=>$field) {\n if (!isset($fields['id'])) $field['id'] = $field_id;\n if (!isset($fields['label'])) $field['label'] = $field['title'];\n $this->wc_product_data_field($field);\n }\n\n echo '</div>';\n echo '</div>';\n\n }\n\n\n }\n\n }\n\n\n }", "protected function setData()\n {\n $this->data = [\n 'category_name' => $this->category_name,\n 'page_name' => $this->page_name,\n 'has_scrollspy' => 0,\n 'scrollspy_offset' => '',\n 'breadcrumb' => $this->setBreadcrumb()\n ];\n }", "protected function mergeMetaData(){\n\t\t$this->originalFields = $this->getFields($this->originalData[$this->module][$this->viewDefs][$this->panelName]);\n\t\t$this->originalPanelIds = $this->getPanelIds($this->originalData[$this->module][$this->viewDefs][$this->panelName]);\n\t\t$this->customFields = $this->getFields($this->customData[$this->module][$this->viewDefs][$this->panelName]);\n\t\t$this->customPanelIds = $this->getPanelIds($this->customData[$this->module][$this->viewDefs][$this->panelName]);\t\t\n\t\t$this->newFields = $this->getFields($this->newData[$this->module][$this->viewDefs][$this->panelName]);\n\t\t$this->newPanelIds = $this->getPanelIds($this->newData[$this->module][$this->viewDefs][$this->panelName]);\n\t\t$this->mergeFields();\n\t\t$this->mergeTemplateMeta();\n\t\t$this->setPanels();\n\t}", "public function buildListDataContainers()\n {\n $this->addDataContainer(\n EntityListDataContainer::make('name')\n ->setLabel('Name')\n ->setSortable()\n ->setHtml()\n );\n }", "public function add_panel()\n\t{\n\t\tglobal $post; ?>\n\n\t\t<div id=\"commission\" class=\"panel woocommerce_options_panel\">\n\t\t\t<fieldset>\n\n\t\t\t\t<p class='form-field commission_rate_field'>\n\t\t\t\t\t<label for='pv_commission_rate'><?php _e( 'Commission', 'topgroupshops' ); ?> (%)</label>\n\t\t\t\t\t<input type='number' id='pv_commission_rate'\n\t\t\t\t\t\t name='pv_commission_rate'\n\t\t\t\t\t\t class='short'\n\t\t\t\t\t\t max=\"100\"\n\t\t\t\t\t\t min=\"0\"\n\t\t\t\t\t\t step='any'\n\t\t\t\t\t\t placeholder='<?php _e( 'Leave blank for default', 'topgroupshops' ); ?>'\n\t\t\t\t\t\t value=\"<?php echo get_post_meta( $post->ID, 'pv_commission_rate', true ); ?>\"/>\n\t\t\t\t</p>\n\n\t\t\t</fieldset>\n\t\t</div> <?php\n\n\t}", "public function buildListDataContainers(): void\n {\n $this->addDataContainer(\n EntityListDataContainer::make('ville_id')\n ->setLabel('Ville')\n ->setSortable()\n )->addDataContainer(\n EntityListDataContainer::make('nom')\n ->setLabel('Nom')\n ->setSortable()\n );\n }", "protected function create_section_data() {\n\t\t$this->font_family();\n\t\t$this->customize_font_family();\n\t\t$this->list_style_type();\n\t\t$this->nested_list();\n\t\t$this->enable_collapse_expand();\n\t\t$this->show_sub_icon();\n\t\t$this->accordion();\n\t\t$this->colexp_init_state();\n\t\t$this->strong_1st();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the registry before each Scenario to free up memory and prevent access to stale data.
public function clearRegistry() { $this->registry = []; if (method_exists($this, 'onStoreInitialized')) { $this->onStoreInitialized(); } }
[ "public static function clearRegistry() {\n\t\tstatic::$_instances = [];\n\t\tstatic::$_tablesMap = [];\n\t}", "public function flushRegistry()\n {\n $cacheItemPool = cache()->getItemPool('default');\n\n if (cache()->exists('registry')) {\n $cacheItemPool = cache()->getItemPool('registry');\n }\n\n if ($cacheItemPool instanceof CacheItemPoolInterface) {\n $cacheItemPool->deleteItem('o2languages');\n }\n }", "public static function clear(): void\n {\n static::initializeRegistry();\n static::$registry->remove('fluid_page_cache', 'enabledTables');\n }", "public function clearCache()\n {\n $this->_instances = array();\n }", "final public static function clearAll()\n {\n self::$_instances = [];\n }", "public function clear()\n {\n \tparent::clear();\n $this->strategies = array();\n }", "public static function clearAll() {\n $instance = self::getInstance();\n $instance::$store = array();\n }", "public function clear(): void {\n\t\t$this->instances = [ ];\n\t\t$this->parameters = [ ];\n\t}", "public static function clear(): void\n {\n self::$externals = [];\n\n foreach (self::$loaded as $name) {\n self::unload($name);\n }\n }", "public function removeAllRegions(): void\n {\n $this->regions = new ObjectStorage();\n }", "public static function removeAll() {\n\t\tself::$steps = [];\n\t}", "protected function clear()\n {\n session()->remove('steps');\n }", "public function clearElectricityallocations()\n {\n $this->collElectricityallocations = null; // important to set this to NULL since that means it is uninitialized\n }", "function clearFeatures() {\n $this->features = array();\n }", "public function clear(): void\r\n {\r\n $this->services = [];\r\n $this->sharedInstances = [];\r\n }", "public static function clearInstancePool()\n {\n self::$instances = array();\n }", "final public function clear() {\n $this->generateMap(array());\n }", "public function resetAllScenarios()\n {\n $this->doPost('__admin/scenarios/reset');\n }", "public static function purgeInstances() {\n\t\tself::$instances = array();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize the minScript application component.
public function init() { parent::init(); // Initialize the cache application component instance for minScript if (($minScriptCache = Yii::app() -> getComponent($this -> minScriptCacheId)) !== null) { $this -> _minScriptCache = $minScriptCache; } else { Yii::app() -> setComponents(array('minScriptCache' => array('class' => 'system.caching.CFileCache', 'cachePath' => Yii::app() -> runtimePath . '/minScript/cache/', 'cacheFileSuffix' => '')), false); $this -> _minScriptCache = Yii::app() -> getComponent('minScriptCache'); } // Check for existence of the minScript controller inside CWebApplication::$controllerMap if (!isset(Yii::app() -> controllerMap[$this -> minScriptControllerId])) { throw new CException('The minScript controller with ID "' . $this -> minScriptControllerId . '" needs to be defined in CWebApplication::$controllerMap.'); } }
[ "public function __initialize() {\n\t\t\t// initialize module side script\n\t\t}", "public function init()\n {\n parent::init();\n\n $this->initBuffering();\n $this->initOptions();\n $this->initComponentProps();\n $this->initEvents();\n $this->registerJs();\n }", "public function initScripts()\n {\n }", "public function initialize()\n\t{\n\t\t$this->start();\n\t\t$this->setEnvironment();\n\t}", "public function init()\n {\n $this->route = mini_base_application::app()->getUrlManager();\n $this->request = mini_base_application::app()->getRequest();\n $this->response = mini_base_application::app()->getResponse();\n $this->dispatch = mini_base_application::app()->getDispatch();\n $this->config = mini_base_application::app()->getConfig();\n $this->logger = mini_base_application::app()->getLogger();\n $this->event = mini_base_application::app()->getEvent();\n $this->view = mini::createComponent(\"mini_web_view\");\n $this->actionCache = new mini_cache_action();\n $this->openRender();\n \n }", "public function init()\n {\n // you may place code here to customize the module or the application\n }", "public function __smartestApplicationInit(){\n\t\t\n\t}", "protected function init()\n\t{\n\t\tparent::init();\n\t\tif(empty($_SERVER['argv']))\n\t\t\tdie('This script must be run from the command line.');\n\t\t$this->_runner=$this->createCommandRunner();\n\t\t$this->_runner->commands=$this->commandMap;\n\t\t$this->_runner->addCommands($this->getCommandPath());\n\t}", "public function initialize()\n {\n Factory::getDocument()->initialize();\n\n if ($this->isCLI()) {\n if ($this->getCLIOption('user') && $this->getCLIOption('password')) {\n if (!Factory::getUser()->authenticate($this->getCLIOption('user'), $this->getCLIOption('password'), true)) {\n Factory::getLogger()->emergency('Wrong username or password');\n }\n }\n }\n\n $this->Component = $this->getComponentManager()->getComponent();\n\n if (!$this->XHRequest) {\n $this->Modules = $this->getModuleManager()->getModules();\n }\n }", "function __construct()\n {\n $this->name = \"scripts\";\n $this->title = \"<#LANG_MODULE_SCRIPTS#>\";\n $this->module_category = \"<#LANG_SECTION_OBJECTS#>\";\n $this->checkInstalled();\n }", "public function initPhapp() {\n $this->phapp = Phapp::getInstance();\n $this->phapp->initShellEnvironment();\n }", "public static function init()\n\t{\n\t\tAddEventHandler(\"main\", \"OnFileDelete\", array(__CLASS__, \"OnFileDelete\"));\n\n\t\t$eventManager = \\Bitrix\\Main\\EventManager::getInstance();\n\t\t$eventManager->addEventHandler(\"socialservices\", \"OnAfterRegisterUserByNetwork\", array(__CLASS__, \"OnStartUserReplication\"), false, 100);\n\n\t\t$event = new \\Bitrix\\Main\\Event(\"replica\", \"OnInit\");\n\t\t$event->send();\n\t}", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Paginator');\n $this->loadComponent('Resize');\n $this->loadComponent('Utility');\n $this->loadComponent('Cookie', ['expiry' => '30 day']);\n }", "public static function init()\n {\n define('TOOLKIT_BASE', dirname(__FILE__));\n\n self::registerAutoloader();\n self::parseOptions();\n self::loadCommands();\n self::parseArguments();\n }", "public function init() { \n\t\t$this->wire('modules')->loadModuleFileAssets($this); \n\t}", "protected function createInitScript()\n\t{\n\t}", "function init() {\n\t\tforeach($this->components as $name => $object) {\n\t\t\tif(!isset($this->init[$name]) || !$this->init[$name]) {\n\t\t\t\t$this->checkComponentEnvironment($name);\n\t\t\t\t$object->init();\n\t\t\t\t$this->init[$name] = true;\n\t\t\t}\n\t\t}\n\t\t$this->init['zoop'] = true;\n\t\tspl_autoload_register(array($this,'autoLoad'));\n\t}", "public function initialize() {\n @set_time_limit(0);\n @ini_set('memory_limit','1024M');\n $quipPath = $this->modx->getOption('quip.core_path',null,$this->modx->getOption('core_path').'components/quip/');\n $this->modx->addPackage('quip',$quipPath.'model/');\n }", "public function __construct(){\n // load the app, module and component name to object params\n $this->app = 'Loyalty';\n $this->module = 'Reward';\n $theme = session()->get('theme');\n $this->componentName = 'themes.'.$theme.'.layouts.app';\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the file name for each enabled module.
protected function getModuleFileNames() { $filenames = []; foreach ($this->moduleList as $module => $weight) { if ($data = $this->moduleData($module)) { $filenames[$module] = $data->getPathname(); } } return $filenames; }
[ "protected static function getModulesFilePath()\n {\n return LC_DIR_ROOT . static::MODULES_FILE_NAME;\n }", "public function getLoadedModuleNames();", "public function getModuleFiles() \n\t{\n\t\treturn $this->moduleFiles;\n\t}", "public function readModulesDirectory()\n\t{\n\t\t$modulesName = glob( INCLUDE_PATH . '/Module/*', GLOB_ONLYDIR);\n\t\t$modulesName = $modulesName === false ? array() : array_map('basename', $modulesName);\n\t\treturn $modulesName;\n\t}", "public function module_name() {\n \t\treturn $this->module_name;\n \t}", "function get_file_names()\n {\n return array_keys($this->_config_data);\n }", "public function getName() {\n\t\t\treturn $this->MODULE_NAME;\t\n\t\t}", "protected function get_module_name() {\n return substr($this->componentname, 4);\n }", "public function getModuleFileName($moduleName)\n\t{\n\t\treturn $moduleName.'.js';\n\t}", "public function getNameModule()\n {\n return $this->nameModule;\n }", "protected function getModuleTestFile() : string\n {\n return $this->getTestDirectory() . DIRECTORY_SEPARATOR . static::FILE_MODULE_TEST_FILE;\n }", "static function getOfficialModuleNames(){\n $available_modules = self::getOfficialModules();\n $names = array();\n\n if (is_foreachable($available_modules)) {\n foreach ($available_modules as $available_module) {\n $names[] = $available_module->getName();\n } // foreach\n } // if\n\n return $names;\n }", "protected function _getConfigFilesPerModule()\n {\n $data = [];\n $componentRegistrar = new \\Magento\\Framework\\Component\\ComponentRegistrar();\n $modulesPaths = $componentRegistrar->getPaths(\\Magento\\Framework\\Component\\ComponentRegistrar::MODULE);\n\n foreach ($modulesPaths as $moduleName => $path) {\n if (file_exists($configFile = $path . '/etc/config.xml')) {\n $data[$configFile] = $moduleName;\n }\n }\n return $data;\n }", "static function getModuleName() {\n $module_name = ui_module::GetModuleName();\n return $module_name;\n }", "public function getModuleName() {\n\t\treturn $this->getModule()->get('name');\n\t}", "public function getActiveModuleInfo()\n {\n $aModulePaths = $this->getModulePaths();\n\n // Extract module paths from extended classes\n if (!is_array($aModulePaths) || count($aModulePaths) < 1) {\n $aModulePaths = $this->extractModulePaths();\n }\n\n $aDisabledModules = $this->getDisabledModules();\n if (is_array($aDisabledModules) && count($aDisabledModules) > 0 && count($aModulePaths) > 0) {\n $aModulePaths = array_diff_key($aModulePaths, array_flip($aDisabledModules));\n }\n\n return $aModulePaths;\n }", "public function getModuleFileNameOverlall($trans_keys)\n {\n $file_names = [];\n\n foreach ($trans_keys as $key) {\n if (str_contains($key, '.')) {\n $file_name = explode('.', $key)[0];\n array_push($file_names, $file_name);\n }\n }\n $file_names = array_unique($file_names);\n\n return $file_names;\n }", "function _get_file_info($module_name){\r\n $files = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\\.info$/', 'modules', 'name', 0);\r\n $files = $files[$module_name];\r\n\r\n return file_get_contents($files->uri);\r\n}", "public function getUsedModuleName()\n {\n return $this->_usedModuleName;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new Newsletter model. If creation is successful, the browser will be redirected to the 'update' page.
public function actionCreate() { $model = new Newsletter(); if ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->session->setFlash('success', __('Your changes have been saved successfully.')); return $this->redirect(['update', 'id' => $model->id]); } else { return $this->render('create', [ 'model' => $model, ]); } }
[ "public function createNewsletterAction()\n {\n $data = $this->Request()->getParams();\n if (empty($data)) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $this->translateMessage('error_msg/no_data_passed', 'No data passed'),\n ]);\n\n return;\n }\n\n $data['groups'] = $this->serializeGroup($data['groups']);\n $data['date'] = new \\DateTime();\n\n // Flatten the newsletter->containers->text field: Each container as only one text-field\n foreach ($data['containers'] as $key => $value) {\n $data['containers'][$key]['text'] = $data['containers'][$key]['text'][0];\n }\n\n $model = new \\Shopware\\Models\\Newsletter\\Newsletter();\n $model->fromArray($data);\n\n Shopware()->Models()->persist($model);\n Shopware()->Models()->flush();\n\n $data = [\n 'id' => $model->getId(),\n ];\n\n $this->View()->assign(['success' => true, 'data' => $data]);\n }", "public function actionCreate()\n {\n $model = new YiiNews();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\r\n {\r\n $model = new News();\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n\r\n return $this->redirect(['index']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionCreate()\n {\n $model = new News();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new News();\n $author = Yii::$app->user->identity->username;\n\n if ($model->load(Yii::$app->request->post())){\n $model->setAuthor($author);\n if($model->save()){\n return $this->redirect('index');\n }\n }\n else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Smtp();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->smtp_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\r\n {\r\n $model = new Notify();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n }\r\n\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }", "public function actionCreate()\n {\n $model = new Subscribing();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Notification();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->notification_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function saveNewsletterAction()\n {\n if ($this->Request()->isPost()) {\n $status = $this->Request()->getPost('newsletter') ? true : false;\n $this->admin->sUpdateNewsletter($status, $this->admin->sGetUserMailById(), true);\n $successMessage = $status ? 'newsletter' : 'deletenewsletter';\n if (Shopware()->Config()->optinnewsletter && $status) {\n $successMessage = 'optinnewsletter';\n }\n $this->View()->assign('sSuccessAction', $successMessage);\n $this->container->get('session')->offsetSet('sNewsletter', $status);\n }\n $this->forward('index');\n }", "public function actionCreate()\n {\n $model = new Mailing();\n\n $model->paused = 1;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id, 'step' => '2']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'step' => 1,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Email();\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n //return $this->redirect(['view', 'id' => $model->id]);\n return $this->goHome();\n } else\n {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Feedbacks();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Feedback();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new MailTpl();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new UserNotification();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->message_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "function add() {\n\t\t\n\t\t// title for view file\n\t\t$title_for_layout = 'Add Newsletter';\n\t\t\n\t\t/*\n\t\t * Get the newsletter template as list\n\t\t */\n\t\t$templateList = $this->NewsletterTemplate->find ( 'list' );\n\t\t\n\t\t/*\n\t\t * Get all the predefined tags\n\t\t */\n\t\t$tagList = array_combine ( $this->Newsletter->tags, $this->Newsletter->tags );\n\t\t\n\t\t// newsletter insert conents\n\t\t$detailsList = $this->Newsletter->insertContents;\n\t\t\n//\t\t$this->JQValidator->addValidation ( 'AddNewsletterForm', $this->Newsletter->validate, 'AddNewsletterForm' );\n\t\t$this->JQValidator->addValidation('Newsletter', $this->Newsletter->validate, 'AddNewsletterForm');\n\t\t\n\t\t$user_id = $this->Auth->user ( 'id' );\n\t\t\n\t\t/*\n\t\t * If the request data is not empty then save the data\n\t\t */\n\t\tif (! empty ( $this->data )) {\n\t\t\t\n\t\t\t/*\n\t\t\t * Save the newsletter\n\t\t\t */\t\t\t\n\t\t\tif ($this->addNewsletter()) {\n\t\t\t\t$this->Session->setFlash ( __ ( 'The newsletter has been saved', true ), 'success' );\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'action' => 'index' \n\t\t\t\t) );\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash ( __ ( 'The newsletter could not be saved. Please, try again.', true ), 'error' );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->set ( compact ( 'title_for_layout', 'templateList', 'tagList', 'detailsList' ) );\n\t}", "public function actionCreate()\n\t{\n\t\t$model = new Updates('create');\n\n\t\tif (Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\tif (isset($_POST['Updates']))\n\t\t\t{\n\t\t\t\t$model->attributes = $_POST['Updates'];\n\t\t\t\t$model->date_created = new CDbExpression('NOW()');\n\n\t\t\t\t$version = $_POST['Updates_major'] . '.' . $_POST['Updates_minor'] . '.';\n\t\t\t\t$version .= $_POST['Updates_patch'] . '.' . $_POST['Updates_build'];\n\t\t\t\t$model->version = $version;\n\n\t\t\t\tif ($model->save())\n\t\t\t\t{\n\t\t\t\t\tYii::app()->user->setFlash('ok', 'Update published');\n\t\t\t\t\t$this->redirect(array('manage/index'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->pageTitle = 'Create Update';\n\t\t$this->render('create', array(\n\t\t\t'model' => $model\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Mail();\n $oldModel = $model->attributes;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $model->mailImage = UploadedFile::getInstance($model, 'mailImage');\n $model->upload();\n $newModel = $model->attributes;\n (new History())->setRow(Yii::$app->controller, $oldModel, $newModel, 'Создана новая рассылка '.$model['subject']);\n\n return $this->redirect(['update', 'id' => $model->id]);\n //return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
browser_window() Monta uma janela estilo browser, inserindo o conteudo recebido como parametro em seu interior.
function browser_window($content = '') { $html = ' <link type="text/css" rel="stylesheet" href="' . URL_CSS_WEBSITE . '/chrome.window.css" /> <div class="ChromeContainer"> <div class="Chrome"> <div class="ChromeBar"> <div class="Back"><a href="#"></a></div> <div class="Next"><a href="#"></a></div> <div class="Refresh"><a href="#"></a></div> </div> <div class="ChromeContent">' . $content . '</div> </div> </div>'; // Retorno da função é o HTML da janela return $html; }
[ "function wb_create_window($parent, $wclass, $caption = null, $xpos = null, $ypos = null, $width = null, $height = null, $style = null, $param = null) {}", "public function window() {\n return new WebDriverWindow($this->executor);\n }", "function newt_open_window($left, $top, $width, $height, $title = NULL)\n{\n}", "function ryzom_render_window($title, $content, $homeLink=false) {\n\treturn ryzom_render_window_begin($title, $homeLink) . $content . ryzom_render_window_end();\n}", "function addWindow( )\r\n\t{\r\n\t\t$aArgs = func_get_args();\r\n\r\n\t\tif ( count( $aArgs ) == 2 && is_array( $aArgs[1] ) )\r\n\t\t{\r\n\t\t\t$aConfig = $aArgs[1];\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t// legacymode \r\n\t\t\t$aConfig = array(\r\n\t\t\t\t\t\t\t\t\t'color'\t\t\t=>\t$aArgs[1],\r\n\t\t\t\t\t\t\t\t\t'opacity'\t\t=>\t$aArgs[2],\r\n\t\t\t\t\t\t\t\t\t'className'\t\t=>\t$aArgs[3],\r\n\t\t\t\t\t\t\t\t\t'frame'\t\t\t=>\t$aArgs[4],\r\n\t\t\t\t\t\t\t\t\t'iPageOverFlow'\t=>\t$aArgs[5],\r\n\t\t\t\t\t\t\t\t\t'bOverlay'\t\t=>\t$aArgs[6] ? $aArgs[6] : true, \r\n\t\t\t\t\t\t\t\t\t'bOverlayClick' =>\t$aArgs[7] ? $aArgs[7] : false\r\n\t\t\t\t\t\t\t);\r\n\t\t}\r\n\r\n\t\t$content = ltrim( $aArgs[0] );\r\n\t\t\t\r\n\t\t$aConfig['cmd'] = 'mw:aw';\r\n\r\n\t\t$this->addCommand( $aConfig, $content );\r\n\t}", "public function testOpenBrowser()\n\t{\n\t\t$this->url('/');//The test page has only phpinfo(); as HTML content\n\t\t$content = $this->byTag('body')->text();\n\t\t// $this->assertEquals('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\t\t$this->assertContains('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\n\t\t//Simulating and ajax call\n\t\t//Will loop on the callback for 2 seconds before continuing scripts below\n\t\t// $this->timeouts()->implicitWait(300); //milliseconds\n\t\t$this->waitUntil(function(){\n\t\t\ttry{\n\t\t\t\t// $webdriver->byId('rootElement');//select by id\n\t\t\t\t$this->byCssSelector('h1.p');//select by css\n\n\t\t\t\treturn true;\n\t\t\t}catch (Exception $ex){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}, 2000);//2 seconds\n\t\t//This is run after the waitUntil finished in 2 seconds\n\t\t$content = $this->byCssSelector('h1.p')->text();\n\t\t$this->assertEquals('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\n\t}", "public function browser()\n\t{\n\t\tif ($this->session->userdata('user_type') != \"Admin\")\n\t\t{\n\t\t\tshow_404();\n\t\t}\n\n\t\t/** Hook point */\n\t\t$this->hooks->call_hook('builder_elements_browser_pre');\n\n\t\t$this->data['page'] = \"elements_browser\";\n\t\t//$this->data['title'] = $this->lang->line('builder_elements_components_pagetitle');\n\n\t\t/** Hook point */\n\t\t$this->hooks->call_hook('builder_elements_browser_post');\n\n\t\t$this->load->view('builder_elements/browser', $this->data);\n\t}", "protected function openInNewWindow() {}", "private function setBrowser() {\n $this->checkBrowser();\n $readAgent = new Read;\n $readAgent->exeRead('ws_siteviews_agent', 'WHERE agent_name=:name', \"name=$this->Browser\");\n if (!$readAgent->getResult()): //se não existir regitro, inserir dados na tabela\n $dados = ['agent_name' => $this->Browser, 'agent_views' => 1];\n $cadastro = new Create;\n $cadastro->exeCreate('ws_siteviews_agent', $dados);\n else: //se existir, atualizar tabela\n $dados = ['agent_views' => $readAgent->getResult()[0]['agent_views'] + 1];\n $update = new Update;\n $update->exeUpdate('ws_siteviews_agent', $dados, 'WHERE agent_name=:name', \"name=$this->Browser\");\n endif;\n }", "public function setBrowser($browser) { return $this->_browser_name = $browser; }", "public function createBrowser()\n {\n return new SimpleBrowser();\n }", "function makeWindow($content, $fbtitle='')\n {\n //Invoke the fb start() function. See the fb api documentation.\n $this->objResponse->script(\"fb.start({ href:\\\"#\\\",\n rev:\\\"width:max height:max scrolling:yes showPrint:true\\\",\n html:\\\"$content\\\",\n title:\\\"$fbtitle\\\" })\");\n }", "protected static function launchBrowser()\n\t{\n\t\tif (MHTTPD::$config['Other']['browser_autolaunch']) {\n\t\t\t$url = MHTTPD::$config['SSL']['enabled'] ? 'https://' : 'http://';\n\t\t\t$url .= MHTTPD::$config['Server']['address'].':'.MHTTPD::$config['Server']['port'].'/';\n\t\t\t$cmd = 'cmd.exe /C start /B /WAIT PING 127.0.0.1 -n 3 -w 1000 >NUL '\n\t\t\t\t.'& start /B rundll32.exe url.dll,FileProtocolHandler '.$url;\n\t\t\t$wshShell = new COM('WScript.Shell');\n\t\t\t$wshShell->Run($cmd, 0, false);\n\t\t}\n\t}", "function SetWindow(wxWindow &$w){}", "function SetWindow(wxWindow &$window){}", "public function iMaximizeTheBrowserWindow()\n {\n $this->getSession()->maximizeWindow();\n }", "function element_screenshot($browser, array $size=[], $overrideUA = '')\n{\n // headless?\n $isHeadless = getenv('ENABLED_CHROME_HEADLESS') === 'true' \n || getenv('ENABLED_FIREFOX_HEADLESS') === 'true';\n\n // selenium\n $host = getenv('SELENIUM_SERVER_URL');\n\n switch ($browser) {\n case WebDriverBrowserType::CHROME :\n $cap = new DesiredCapabilities($browser);\n\n if ($overrideUA !== '') {\n $cap->setUserAgent($overrideUA);\n }\n\n $driver = RemoteWebDriver::create($host, $cap->get());\n\n break;\n case WebDriverBrowserType::FIREFOX :\n $cap = new DesiredCapabilities($browser);\n\n if ($overrideUA !== '') {\n $cap->setUserAgent($overrideUA);\n }\n\n $driver = RemoteWebDriver::create($host, $cap->get());\n\n break;\n case WebDriverBrowserType::IE :\n $cap = new DesiredCapabilities($browser);\n $driver = RemoteWebDriver::create($host, $cap->get());\n break;\n }\n\n // When setting the screen size to MAX.\n // $driver->manage()->window()->maximize();\n\n // When the screen size is specified.\n $dimension = null;\n if (isset($size['w']) && isset($size['h'])) {\n $dimension = new WebDriverDimension($size['w'], $size['h']);\n $driver->manage()->window()->setSize($dimension);\n }\n\n // When there is a specified size in headless mode.\n if ($dimension !== null && $isHeadless) {\n $cap->setWindowSizeInHeadless($dimension);\n }\n\n $url = 'https://www.google.com/webhp?gl=us&hl=en&gws_rd=cr';\n\n // Transit to designated URL (Google).\n $driver->get($url);\n\n // Search for elements.\n $findElement = $driver->findElement(WebDriverBy::name('q'));\n // Enter keywords in search box.\n $findElement->sendKeys('Hello');\n // Search execution.\n $findElement->submit();\n\n // Wait until the contents are visualized(Targeting '#botstuff').\n $driver->wait(10, 100)->until(\n WebDriverExpectedCondition::visibilityOfElementLocated(WebDriverBy::id('botstuff'))\n );\n\n // Capture settings.\n $suffix = $isHeadless ? '_headless' : '_not-headless';\n $fileName = $overrideUA === '' ? __METHOD__ . \"_{$browser}\" . $suffix \n : __METHOD__ . \"_sp_{$browser}\" . $suffix;\n $ds = DIRECTORY_SEPARATOR;\n $captureDirectoryPath = realpath(__DIR__ . $ds . 'capture') . $ds;\n\n // Create a Screenshot.\n $screenshot = new Screenshot();\n\n // Change specified element with 'pc' and 'sp'.\n $selector = $overrideUA === '' ? '.xpdopen' : '#sfcnt';\n $selector2 = $overrideUA === '' ? '.brs_col' : '.uUPGi';\n\n // Define element selector.\n $spec = new Spec($selector, Spec::GREATER_THAN_OR_EQUAL, 1);\n $spec2 = new Spec($selector2, Spec::GREATER_THAN, 1);\n\n // Push into SpecPool.\n $specPool = (new SpecPool())\n ->addSpec($spec)\n ->addSpec($spec2);\n\n // Element capture (extension will be .png).\n $screenshot->takeElement($driver, $captureDirectoryPath, $fileName, $specPool);\n\n // HttpStatus of url\n $status = UrlStatus::get($driver->getCurrentURL());\n if ($status->is200() === false) {\n throw new Exception('fail');\n }\n\n // Close window.\n $driver->close();\n}", "function setBrowser($browser)\n {\n $this->_browser = $browser;\n }", "public function ResizeLaunchWindow()\n {\n \n $width = ($this->ae_detect_ie()) ? $this->Window_Width_IE : $this->Window_Width_Other;\n $height = ($this->ae_detect_ie()) ? $this->Window_Height_IE : $this->Window_Height_Other;\n $script = \"window.resizeTo($width, $height)\";\n $this->EchoScript($script);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the date signature1.
public function getDateSignature1(): ?DateTime { return $this->dateSignature1; }
[ "public function getSignatureDate()\n {\n $value = $this->get(self::SIGNATUREDATE);\n return $value === null ? (string)$value : $value;\n }", "public function getSignatureDate() {\n return $this->signatureDate;\n }", "public function getSignature();", "public function getDate1()\n {\n return $this->date1;\n }", "private function get_signature()\n {\n }", "public function getSignatureDate(): ?DateTime {\n return $this->signatureDate;\n }", "public function getDateSignature4() {\n return $this->dateSignature4;\n }", "public function getMandateSignatureDate()\n {\n return (string)$this->mandateSignatureDate;\n }", "public function getMandateSignatureDate() {\n return $this->mandateSignatureDate;\n }", "private function getSignature()\n {\n return hash(\"sha256\", $this->public_key . $this->secret_key . time());\n }", "public function getSignature(){\n\t\t$string = $this->getHeader() . '.' . $this->getPayload();\n\t\t$hash = $this->getHash($string);\n\t\treturn $hash;\n\t}", "public function getDateSignature5(): ?DateTime {\n return $this->dateSignature5;\n }", "public function getOehddiscdate1()\n {\n return $this->oehddiscdate1;\n }", "function getSha1() ;", "function make_signature()\r\n {\r\n $timestamp = $this->make_timestamp();\r\n $sig = $this->service . $this->operation . $timestamp; // right order\r\n $hmac = mhash(MHASH_SHA1, $sig, $this->secret_access_key);\r\n $encoded_hmac = base64_encode($hmac);\r\n\r\n return urlencode($encoded_hmac);\r\n }", "protected function createSignature()\n {\n $data = '';\n foreach($this->_signatureParams as $param) {\n $data .= $this->get($param);\n }\n return hash_hmac(\"sha1\", $data, $this->getSecret());\n }", "abstract protected function BuildSignature();", "protected function generateSignature()\n {\n $sign = $this->getlink().$this->getAmount().$this->getOrderId().$this->getCurrency();\n\n return hash_hmac(\n 'sha1',\n $sign,\n $this->getAuthToken()\n );\n }", "public function signature();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the repeater field limit for a specific role
function wppb_rpf_get_limit_for_role( $repeater_field, $roles ) { $limit = 0; if ( !empty( $repeater_field['rpf-role-limit'] ) ) { $option = json_decode($repeater_field['rpf-role-limit'], true); } if ( !empty( $option['rules'] ) ){ foreach ( $roles as $role) { foreach ($option['rules'] as $rule) { if ( $role == $rule['role'] ) { if (empty ($rule['value']) || $rule['value'] == '0') { // if we find a specific rule that guarantees unlimited fields for a role then there's no point in further checking return 0; } else if ( $limit < intval( $rule['value'] ) ) { $limit = $rule['value']; } } } } } // $limit is 0 if no specific rules were found above. if ( !empty ( $repeater_field['rpf-limit'] ) && $limit == 0 ) { $limit = intval ( $repeater_field['rpf-limit'] ); } return $limit; }
[ "public function getLimit()\r\n {\r\n return $this->fields['Limit']['value'];\r\n }", "public function getLimit(): TrancheLimit;", "public function getLimit()\n {\n return $this->get('Limit');\n }", "function get_vrm_access_limit() {\n\t\t$res = $this->db->query( \"SELECT value FROM access_limit WHERE name='vrm'\" )->row_array();\n\t\treturn ( int ) @$res[ 'value' ];\n\t}", "public function getLimitvalue()\n {\n return $this->limitvalue;\n }", "function getLimitItems() {\n\t\treturn $this->getData('limitItems');\n\t}", "public function getLimitFields(): array;", "public static function get_role_based_limits() {\n\t\treturn bp_profile_visit_restrictions()->get_settings();\n\t}", "public function getItemLimit() {\r\n return !empty($this->limit) ? $this->limit : 20;\r\n }", "public function getProductLimit();", "private function getAdvancedReservationLimit() {\n $config = $this->config(self::CONFIG_NAME);\n $advanced_reservation_limit = $config->get('advanced_reservation_limit');\n return isset($advanced_reservation_limit) ? $advanced_reservation_limit : 0;\n }", "protected function getLimit()\n\t{\n\t\t$limit = $this->input->get->getInteger('limit');\n\n\t\t// Check if limit is passed in input\n\t\tif (isset($limit))\n\t\t{\n\t\t\t// Check if limit is positive\n\t\t\tif ($limit > 0)\n\t\t\t{\n\t\t\t\t$limit = min($this->maxResults, $limit);\n\t\t\t\treturn $limit;\n\t\t\t}\n\n\t\t\t$this->app->errors->addError(\"303\");\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->limit;\n\t\t}\n\t}", "public function getLimit()\n {\n return $this->items_per_page;\n }", "public function createPaginationLimitField()\r\n {\r\n $value = $this->getCurrentPaginationLimitValue();\r\n Cookie::set('paginationLimitCookie', $value);\r\n\r\n $id = $this->grid->getGridName();\r\n\r\n $paginationLimit = new \\View\\Select('paginationLimit-' . $id, static::listPaginationLimitOptions(), $value, 'paginationLimit fr no-print-screen');\r\n $paginationLimit->setTitle('Limite de registros por página');\r\n $link = $this->getGrid()->getLink('listar');\r\n $paginationLimit->change(\"p('\" . $link . \"');\");\r\n\r\n return $paginationLimit;\r\n }", "public function getModelLimit();", "public function getMiterLimit(){}", "private function getExportLimit(): int\n {\n $user = wp_get_current_user();\n $roles = is_null($user) ? [] : $user->roles;\n $roles[] = '(anonymous)';\n $limit = 0;\n foreach ($roles as $role) {\n if (isset($this->settings->limit[$role])) {\n $limit = max($limit, $this->settings->limit[$role]->limit->getPhpValue());\n }\n }\n\n return $limit;\n }", "public function getRemainingLimit();", "function bbp_get_moderator_role()\n{\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the public 'app.admin.anexo1.contrato.arrendamiento.espacios' service.
protected function getApp_Admin_Anexo1_Contrato_Arrendamiento_EspaciosService() { $instance = new \AppBundle\Admin\anexo1_contrato_arrendamiento_espaciosAdmin('app.admin.anexo1.contrato.arrendamiento.espacios', 'AppBundle\\Entity\\anexo1_contrato_arrendamiento_espacios', 'SonataAdminBundle:CRUD'); $instance->setManagerType('orm'); $instance->setModelManager(${($_ = isset($this->services['sonata.admin.manager.orm']) ? $this->services['sonata.admin.manager.orm'] : $this->get('sonata.admin.manager.orm')) && false ?: '_'}); $instance->setFormContractor(${($_ = isset($this->services['sonata.admin.builder.orm_form']) ? $this->services['sonata.admin.builder.orm_form'] : $this->get('sonata.admin.builder.orm_form')) && false ?: '_'}); $instance->setShowBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_show']) ? $this->services['sonata.admin.builder.orm_show'] : $this->get('sonata.admin.builder.orm_show')) && false ?: '_'}); $instance->setListBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_list']) ? $this->services['sonata.admin.builder.orm_list'] : $this->get('sonata.admin.builder.orm_list')) && false ?: '_'}); $instance->setDatagridBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_datagrid']) ? $this->services['sonata.admin.builder.orm_datagrid'] : $this->get('sonata.admin.builder.orm_datagrid')) && false ?: '_'}); $instance->setTranslator(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, false); $instance->setConfigurationPool(${($_ = isset($this->services['sonata.admin.pool']) ? $this->services['sonata.admin.pool'] : $this->get('sonata.admin.pool')) && false ?: '_'}); $instance->setRouteGenerator(${($_ = isset($this->services['sonata.admin.route.default_generator']) ? $this->services['sonata.admin.route.default_generator'] : $this->get('sonata.admin.route.default_generator')) && false ?: '_'}); $instance->setValidator(${($_ = isset($this->services['validator']) ? $this->services['validator'] : $this->get('validator')) && false ?: '_'}); $instance->setSecurityHandler(${($_ = isset($this->services['sonata.admin.security.handler']) ? $this->services['sonata.admin.security.handler'] : $this->get('sonata.admin.security.handler')) && false ?: '_'}); $instance->setMenuFactory(${($_ = isset($this->services['knp_menu.factory']) ? $this->services['knp_menu.factory'] : $this->get('knp_menu.factory')) && false ?: '_'}); $instance->setRouteBuilder(${($_ = isset($this->services['sonata.admin.route.path_info']) ? $this->services['sonata.admin.route.path_info'] : $this->get('sonata.admin.route.path_info')) && false ?: '_'}); $instance->setLabelTranslatorStrategy(${($_ = isset($this->services['sonata.admin.label.strategy.native']) ? $this->services['sonata.admin.label.strategy.native'] : $this->get('sonata.admin.label.strategy.native')) && false ?: '_'}); $instance->setPagerType('default'); $instance->setLabel('Anexo 1 Contrato Arrendamiento de Espacios'); $instance->showMosaicButton(true); $instance->setTemplateRegistry(${($_ = isset($this->services['app.admin.anexo1.contrato.arrendamiento.espacios.template_registry']) ? $this->services['app.admin.anexo1.contrato.arrendamiento.espacios.template_registry'] : $this->get('app.admin.anexo1.contrato.arrendamiento.espacios.template_registry')) && false ?: '_'}); $instance->setSecurityInformation(array('EDIT' => array(0 => 'EDIT'), 'LIST' => array(0 => 'LIST'), 'CREATE' => array(0 => 'CREATE'), 'VIEW' => array(0 => 'VIEW'), 'DELETE' => array(0 => 'DELETE'), 'EXPORT' => array(0 => 'EXPORT'), 'ALL' => array(0 => 'ALL'))); $instance->initialize(); $instance->addExtension(${($_ = isset($this->services['sonata.admin.event.extension']) ? $this->services['sonata.admin.event.extension'] : $this->get('sonata.admin.event.extension')) && false ?: '_'}); $instance->addExtension(${($_ = isset($this->services['sonata.admin.lock.extension']) ? $this->services['sonata.admin.lock.extension'] : $this->get('sonata.admin.lock.extension')) && false ?: '_'}); $instance->setFormTheme(array(0 => '@SonataDoctrineORMAdmin/Form/form_admin_fields.html.twig')); $instance->setFilterTheme(array(0 => '@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig')); return $instance; }
[ "protected function getApp_Admin_Contrato_Arrendamiento_EspaciosService()\n {\n $instance = new \\AppBundle\\Admin\\contrato_arrendamiento_espaciosAdmin('app.admin.contrato.arrendamiento.espacios', 'AppBundle\\\\Entity\\\\contrato_arrendamiento_espacios', 'SonataAdminBundle:CRUD');\n\n $instance->setManagerType('orm');\n $instance->setModelManager(${($_ = isset($this->services['sonata.admin.manager.orm']) ? $this->services['sonata.admin.manager.orm'] : $this->get('sonata.admin.manager.orm')) && false ?: '_'});\n $instance->setFormContractor(${($_ = isset($this->services['sonata.admin.builder.orm_form']) ? $this->services['sonata.admin.builder.orm_form'] : $this->get('sonata.admin.builder.orm_form')) && false ?: '_'});\n $instance->setShowBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_show']) ? $this->services['sonata.admin.builder.orm_show'] : $this->get('sonata.admin.builder.orm_show')) && false ?: '_'});\n $instance->setListBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_list']) ? $this->services['sonata.admin.builder.orm_list'] : $this->get('sonata.admin.builder.orm_list')) && false ?: '_'});\n $instance->setDatagridBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_datagrid']) ? $this->services['sonata.admin.builder.orm_datagrid'] : $this->get('sonata.admin.builder.orm_datagrid')) && false ?: '_'});\n $instance->setTranslator(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, false);\n $instance->setConfigurationPool(${($_ = isset($this->services['sonata.admin.pool']) ? $this->services['sonata.admin.pool'] : $this->get('sonata.admin.pool')) && false ?: '_'});\n $instance->setRouteGenerator(${($_ = isset($this->services['sonata.admin.route.default_generator']) ? $this->services['sonata.admin.route.default_generator'] : $this->get('sonata.admin.route.default_generator')) && false ?: '_'});\n $instance->setValidator(${($_ = isset($this->services['validator']) ? $this->services['validator'] : $this->get('validator')) && false ?: '_'});\n $instance->setSecurityHandler(${($_ = isset($this->services['sonata.admin.security.handler']) ? $this->services['sonata.admin.security.handler'] : $this->get('sonata.admin.security.handler')) && false ?: '_'});\n $instance->setMenuFactory(${($_ = isset($this->services['knp_menu.factory']) ? $this->services['knp_menu.factory'] : $this->get('knp_menu.factory')) && false ?: '_'});\n $instance->setRouteBuilder(${($_ = isset($this->services['sonata.admin.route.path_info']) ? $this->services['sonata.admin.route.path_info'] : $this->get('sonata.admin.route.path_info')) && false ?: '_'});\n $instance->setLabelTranslatorStrategy(${($_ = isset($this->services['sonata.admin.label.strategy.native']) ? $this->services['sonata.admin.label.strategy.native'] : $this->get('sonata.admin.label.strategy.native')) && false ?: '_'});\n $instance->setPagerType('default');\n $instance->setLabel('Contratos Arrendamiento Espacios');\n $instance->showMosaicButton(true);\n $instance->setTemplateRegistry(${($_ = isset($this->services['app.admin.contrato.arrendamiento.espacios.template_registry']) ? $this->services['app.admin.contrato.arrendamiento.espacios.template_registry'] : $this->get('app.admin.contrato.arrendamiento.espacios.template_registry')) && false ?: '_'});\n $instance->setSecurityInformation(array('EDIT' => array(0 => 'EDIT'), 'LIST' => array(0 => 'LIST'), 'CREATE' => array(0 => 'CREATE'), 'VIEW' => array(0 => 'VIEW'), 'DELETE' => array(0 => 'DELETE'), 'EXPORT' => array(0 => 'EXPORT'), 'ALL' => array(0 => 'ALL')));\n $instance->initialize();\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.event.extension']) ? $this->services['sonata.admin.event.extension'] : $this->get('sonata.admin.event.extension')) && false ?: '_'});\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.lock.extension']) ? $this->services['sonata.admin.lock.extension'] : $this->get('sonata.admin.lock.extension')) && false ?: '_'});\n $instance->setFormTheme(array(0 => '@SonataDoctrineORMAdmin/Form/form_admin_fields.html.twig'));\n $instance->setFilterTheme(array(0 => '@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig'));\n\n return $instance;\n }", "function consultarEspaciosInscritos() {\n $variables=array('codEstudiante'=> $this->datosEstudiante['codEstudiante'],\n 'periodo'=> $this->periodo, \n 'ano'=> $this->ano \n );\n $cadena_sql = $this->sql->cadena_sql(\"espacios_inscritos\", $variables);\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n if(is_array($resultado))\n {\n foreach ($resultado as $valor)\n {\n $resultadoCodigo[]=$valor['CODIGO'];\n }\n }else\n {\n $resultadoCodigo='';\n }\n return $resultadoCodigo;\n }", "public function getEscolas()\n {\n return $this->hasMany(Escola::className(), ['id_instituição' => 'id']);\n }", "function buscarHorarioEstudiante($espaciosInscritos) {\n $horarioEstudiante=$this->procedimientos->buscarHorario($espaciosInscritos);\n return $horarioEstudiante;\n }", "public function calcular_intereses()\n {\n $app = Aplicacion::find(Input::get('id'));\n $modelo = Modelo::find(Input::get('id_modelo'));\n\n $registros = CxcServicio::where('core_empresa_id',Auth::user()->empresa_id)\n ->orderBy('descripcion')\n ->get();\n $servicios[''] = '';\n foreach ($registros as $fila) {\n $servicios[$fila->id] = $fila->descripcion; \n }\n\n $miga_pan = [\n ['url'=>'cxc?id='.Input::get('id'),'etiqueta'=> $app->descripcion],\n ['url'=>'web?id='.Input::get('id').'&id_modelo='.Input::get('id_modelo'),'etiqueta' => $modelo->descripcion ],\n ['url'=>'NO','etiqueta' => 'Calcular intereses' ]\n ];\n\n return view('cxc.intereses_mora.calcular_intereses_mora', compact( 'servicios', 'miga_pan'));\n }", "public function get_estados()\n {\n // loads the associated object\n if (empty($this->estados))\n $this->estados = new estados($this->estados_servico);\n \n // returns the associated object\n return $this->estados;\n }", "protected function getApp_Admin_Anexocps_Levantamiento_Redes_TecnicasService()\n {\n $instance = new \\AppBundle\\Admin\\anexocps_levantamiento_redes_tecnicasAdmin('app.admin.anexocps.levantamiento.redes.tecnicas', 'AppBundle\\\\Entity\\\\anexocps_levantamiento_redes_tecnicas', 'SonataAdminBundle:CRUD');\n\n $instance->setManagerType('orm');\n $instance->setModelManager(${($_ = isset($this->services['sonata.admin.manager.orm']) ? $this->services['sonata.admin.manager.orm'] : $this->get('sonata.admin.manager.orm')) && false ?: '_'});\n $instance->setFormContractor(${($_ = isset($this->services['sonata.admin.builder.orm_form']) ? $this->services['sonata.admin.builder.orm_form'] : $this->get('sonata.admin.builder.orm_form')) && false ?: '_'});\n $instance->setShowBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_show']) ? $this->services['sonata.admin.builder.orm_show'] : $this->get('sonata.admin.builder.orm_show')) && false ?: '_'});\n $instance->setListBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_list']) ? $this->services['sonata.admin.builder.orm_list'] : $this->get('sonata.admin.builder.orm_list')) && false ?: '_'});\n $instance->setDatagridBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_datagrid']) ? $this->services['sonata.admin.builder.orm_datagrid'] : $this->get('sonata.admin.builder.orm_datagrid')) && false ?: '_'});\n $instance->setTranslator(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, false);\n $instance->setConfigurationPool(${($_ = isset($this->services['sonata.admin.pool']) ? $this->services['sonata.admin.pool'] : $this->get('sonata.admin.pool')) && false ?: '_'});\n $instance->setRouteGenerator(${($_ = isset($this->services['sonata.admin.route.default_generator']) ? $this->services['sonata.admin.route.default_generator'] : $this->get('sonata.admin.route.default_generator')) && false ?: '_'});\n $instance->setValidator(${($_ = isset($this->services['validator']) ? $this->services['validator'] : $this->get('validator')) && false ?: '_'});\n $instance->setSecurityHandler(${($_ = isset($this->services['sonata.admin.security.handler']) ? $this->services['sonata.admin.security.handler'] : $this->get('sonata.admin.security.handler')) && false ?: '_'});\n $instance->setMenuFactory(${($_ = isset($this->services['knp_menu.factory']) ? $this->services['knp_menu.factory'] : $this->get('knp_menu.factory')) && false ?: '_'});\n $instance->setRouteBuilder(${($_ = isset($this->services['sonata.admin.route.path_info']) ? $this->services['sonata.admin.route.path_info'] : $this->get('sonata.admin.route.path_info')) && false ?: '_'});\n $instance->setLabelTranslatorStrategy(${($_ = isset($this->services['sonata.admin.label.strategy.native']) ? $this->services['sonata.admin.label.strategy.native'] : $this->get('sonata.admin.label.strategy.native')) && false ?: '_'});\n $instance->setPagerType('default');\n $instance->setLabel('Levantamiento Redes Tecnicas');\n $instance->showMosaicButton(true);\n $instance->setTemplateRegistry(${($_ = isset($this->services['app.admin.anexocps.levantamiento.redes.tecnicas.template_registry']) ? $this->services['app.admin.anexocps.levantamiento.redes.tecnicas.template_registry'] : $this->get('app.admin.anexocps.levantamiento.redes.tecnicas.template_registry')) && false ?: '_'});\n $instance->setSecurityInformation(array('EDIT' => array(0 => 'EDIT'), 'LIST' => array(0 => 'LIST'), 'CREATE' => array(0 => 'CREATE'), 'VIEW' => array(0 => 'VIEW'), 'DELETE' => array(0 => 'DELETE'), 'EXPORT' => array(0 => 'EXPORT'), 'ALL' => array(0 => 'ALL')));\n $instance->initialize();\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.event.extension']) ? $this->services['sonata.admin.event.extension'] : $this->get('sonata.admin.event.extension')) && false ?: '_'});\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.lock.extension']) ? $this->services['sonata.admin.lock.extension'] : $this->get('sonata.admin.lock.extension')) && false ?: '_'});\n $instance->setFormTheme(array(0 => '@SonataDoctrineORMAdmin/Form/form_admin_fields.html.twig'));\n $instance->setFilterTheme(array(0 => '@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig'));\n\n return $instance;\n }", "public function getFkFiscalizacaoRetencaoServicos()\n {\n return $this->fkFiscalizacaoRetencaoServicos;\n }", "protected function getApp_Admin_Anexo4_Contrato_Recarga_Por_PosService()\n {\n $instance = new \\AppBundle\\Admin\\anexo4_contrato_recarga_por_posAdmin('app.admin.anexo4.contrato.recarga.por.pos', 'AppBundle\\\\Entity\\\\anexo4_contrato_recarga_por_pos', 'SonataAdminBundle:CRUD');\n\n $instance->setManagerType('orm');\n $instance->setModelManager(${($_ = isset($this->services['sonata.admin.manager.orm']) ? $this->services['sonata.admin.manager.orm'] : $this->get('sonata.admin.manager.orm')) && false ?: '_'});\n $instance->setFormContractor(${($_ = isset($this->services['sonata.admin.builder.orm_form']) ? $this->services['sonata.admin.builder.orm_form'] : $this->get('sonata.admin.builder.orm_form')) && false ?: '_'});\n $instance->setShowBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_show']) ? $this->services['sonata.admin.builder.orm_show'] : $this->get('sonata.admin.builder.orm_show')) && false ?: '_'});\n $instance->setListBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_list']) ? $this->services['sonata.admin.builder.orm_list'] : $this->get('sonata.admin.builder.orm_list')) && false ?: '_'});\n $instance->setDatagridBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_datagrid']) ? $this->services['sonata.admin.builder.orm_datagrid'] : $this->get('sonata.admin.builder.orm_datagrid')) && false ?: '_'});\n $instance->setTranslator(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, false);\n $instance->setConfigurationPool(${($_ = isset($this->services['sonata.admin.pool']) ? $this->services['sonata.admin.pool'] : $this->get('sonata.admin.pool')) && false ?: '_'});\n $instance->setRouteGenerator(${($_ = isset($this->services['sonata.admin.route.default_generator']) ? $this->services['sonata.admin.route.default_generator'] : $this->get('sonata.admin.route.default_generator')) && false ?: '_'});\n $instance->setValidator(${($_ = isset($this->services['validator']) ? $this->services['validator'] : $this->get('validator')) && false ?: '_'});\n $instance->setSecurityHandler(${($_ = isset($this->services['sonata.admin.security.handler']) ? $this->services['sonata.admin.security.handler'] : $this->get('sonata.admin.security.handler')) && false ?: '_'});\n $instance->setMenuFactory(${($_ = isset($this->services['knp_menu.factory']) ? $this->services['knp_menu.factory'] : $this->get('knp_menu.factory')) && false ?: '_'});\n $instance->setRouteBuilder(${($_ = isset($this->services['sonata.admin.route.path_info']) ? $this->services['sonata.admin.route.path_info'] : $this->get('sonata.admin.route.path_info')) && false ?: '_'});\n $instance->setLabelTranslatorStrategy(${($_ = isset($this->services['sonata.admin.label.strategy.native']) ? $this->services['sonata.admin.label.strategy.native'] : $this->get('sonata.admin.label.strategy.native')) && false ?: '_'});\n $instance->setPagerType('default');\n $instance->setLabel('Acta de Entrega');\n $instance->showMosaicButton(true);\n $instance->setTemplateRegistry(${($_ = isset($this->services['app.admin.anexo4.contrato.recarga.por.pos.template_registry']) ? $this->services['app.admin.anexo4.contrato.recarga.por.pos.template_registry'] : $this->get('app.admin.anexo4.contrato.recarga.por.pos.template_registry')) && false ?: '_'});\n $instance->setSecurityInformation(array('EDIT' => array(0 => 'EDIT'), 'LIST' => array(0 => 'LIST'), 'CREATE' => array(0 => 'CREATE'), 'VIEW' => array(0 => 'VIEW'), 'DELETE' => array(0 => 'DELETE'), 'EXPORT' => array(0 => 'EXPORT'), 'ALL' => array(0 => 'ALL')));\n $instance->initialize();\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.event.extension']) ? $this->services['sonata.admin.event.extension'] : $this->get('sonata.admin.event.extension')) && false ?: '_'});\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.lock.extension']) ? $this->services['sonata.admin.lock.extension'] : $this->get('sonata.admin.lock.extension')) && false ?: '_'});\n $instance->setFormTheme(array(0 => '@SonataDoctrineORMAdmin/Form/form_admin_fields.html.twig'));\n $instance->setFilterTheme(array(0 => '@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig'));\n\n return $instance;\n }", "function buscarEstudiantesInscritos() {\r\n \r\n $variablesEstudiantesInscritos = array( 'codProyecto' => $this->codProyecto,\r\n 'codEspacio'=> $this->codEspacio,\r\n 'grupo'=> $this->grupo,\r\n 'ano' => $this->ano,\r\n 'periodo' => $this->periodo);\r\n $cadena_sql = $this->sql->cadena_sql(\"buscarEstudiantesInscritos\", $variablesEstudiantesInscritos);\r\n $arreglo_estudiantesInscritos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n return $arreglo_estudiantesInscritos;\r\n }", "function generarCeldaEspaciosEncabezados($espaciosEncabezados){\r\n //verifica si el espacio es anual o semestral\r\n $semanas=$this->generarRotuloSemanas($espaciosEncabezados['SEMANAS_ESPACIO']);\r\n //verifica si el espacio cumple con relacion creditos-horas\r\n $color=$this->generarColorTexto($espaciosEncabezados);\r\n //verifica el estado del espacio\r\n $datosCeldaAprobado=array('nombreEnlace'=>'crearEnlaceEspacio',\r\n 'paginaModificar'=>'registroModificarEACoordinador',\r\n 'opcionModificar'=>'solicitar',\r\n 'paginaBorrar'=>'registroBorrarEACoordinador',\r\n 'opcionBorrar'=>'confirmarBorrarEA',\r\n 'datosEspacio'=>$espaciosEncabezados,\r\n 'datosPlan'=>$this->datosPlan);\r\n $celdaAprobado=$this->generarCeldaEstadoEspacio($datosCeldaAprobado);\r\n $datosComentarios=array('COD_ESPACIO'=>$espaciosEncabezados['COD_ESPACIO'],\r\n 'PLAN_ESPACIO'=>$espaciosEncabezados['PLAN_ESPACIO']);\r\n $paginaComentario='registroAgregarComentarioEspacioCoordinador';\r\n $opcionComentario='verComentarios';\r\n $comentario=array('numero'=>$this->consultarComentariosNoLeidos($datosComentarios),\r\n 'enlace'=>$this->crearEnlaceEspacio($paginaComentario,$opcionComentario,$espaciosEncabezados));\r\n $comentario=$this->generarCeldaComentario($comentario);\r\n $this->mostrarCeldaEspaciosEncabezados($espaciosEncabezados,$semanas,$celdaAprobado['enlaceEspacio'],$celdaAprobado['aprobado'],$comentario);\r\n }", "public function docentesPreescolar(){\n try {\n if($this->verificarSession()){\n $this->vista->set('titulo', 'estudiantes Preescolar');\n $salon = new Salon();\n $preescolar = $salon->leerSalonesPreescolar();\n $this->vista->set('preescolar', $preescolar);\n return $this->vista->imprimir();\n }\n } catch (Exception $exc) {\n echo 'Error de aplicacion: ' . $exc->getMessage();\n }\n }", "protected function getApp_Admin_Anexo1_Contrato_Arrendamiento_RedesService()\n {\n $instance = new \\AppBundle\\Admin\\anexo1_contrato_arrendamiento_redesAdmin('app.admin.anexo1.contrato.arrendamiento.redes', 'AppBundle\\\\Entity\\\\anexo1_contrato_arrendamiento_redes', 'SonataAdminBundle:CRUD');\n\n $instance->setManagerType('orm');\n $instance->setModelManager(${($_ = isset($this->services['sonata.admin.manager.orm']) ? $this->services['sonata.admin.manager.orm'] : $this->get('sonata.admin.manager.orm')) && false ?: '_'});\n $instance->setFormContractor(${($_ = isset($this->services['sonata.admin.builder.orm_form']) ? $this->services['sonata.admin.builder.orm_form'] : $this->get('sonata.admin.builder.orm_form')) && false ?: '_'});\n $instance->setShowBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_show']) ? $this->services['sonata.admin.builder.orm_show'] : $this->get('sonata.admin.builder.orm_show')) && false ?: '_'});\n $instance->setListBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_list']) ? $this->services['sonata.admin.builder.orm_list'] : $this->get('sonata.admin.builder.orm_list')) && false ?: '_'});\n $instance->setDatagridBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_datagrid']) ? $this->services['sonata.admin.builder.orm_datagrid'] : $this->get('sonata.admin.builder.orm_datagrid')) && false ?: '_'});\n $instance->setTranslator(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, false);\n $instance->setConfigurationPool(${($_ = isset($this->services['sonata.admin.pool']) ? $this->services['sonata.admin.pool'] : $this->get('sonata.admin.pool')) && false ?: '_'});\n $instance->setRouteGenerator(${($_ = isset($this->services['sonata.admin.route.default_generator']) ? $this->services['sonata.admin.route.default_generator'] : $this->get('sonata.admin.route.default_generator')) && false ?: '_'});\n $instance->setValidator(${($_ = isset($this->services['validator']) ? $this->services['validator'] : $this->get('validator')) && false ?: '_'});\n $instance->setSecurityHandler(${($_ = isset($this->services['sonata.admin.security.handler']) ? $this->services['sonata.admin.security.handler'] : $this->get('sonata.admin.security.handler')) && false ?: '_'});\n $instance->setMenuFactory(${($_ = isset($this->services['knp_menu.factory']) ? $this->services['knp_menu.factory'] : $this->get('knp_menu.factory')) && false ?: '_'});\n $instance->setRouteBuilder(${($_ = isset($this->services['sonata.admin.route.path_info']) ? $this->services['sonata.admin.route.path_info'] : $this->get('sonata.admin.route.path_info')) && false ?: '_'});\n $instance->setLabelTranslatorStrategy(${($_ = isset($this->services['sonata.admin.label.strategy.native']) ? $this->services['sonata.admin.label.strategy.native'] : $this->get('sonata.admin.label.strategy.native')) && false ?: '_'});\n $instance->setPagerType('default');\n $instance->setLabel('Tarifas para el arrendamiento de Redes');\n $instance->showMosaicButton(true);\n $instance->setTemplateRegistry(${($_ = isset($this->services['app.admin.anexo1.contrato.arrendamiento.redes.template_registry']) ? $this->services['app.admin.anexo1.contrato.arrendamiento.redes.template_registry'] : $this->get('app.admin.anexo1.contrato.arrendamiento.redes.template_registry')) && false ?: '_'});\n $instance->setSecurityInformation(array('EDIT' => array(0 => 'EDIT'), 'LIST' => array(0 => 'LIST'), 'CREATE' => array(0 => 'CREATE'), 'VIEW' => array(0 => 'VIEW'), 'DELETE' => array(0 => 'DELETE'), 'EXPORT' => array(0 => 'EXPORT'), 'ALL' => array(0 => 'ALL')));\n $instance->initialize();\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.event.extension']) ? $this->services['sonata.admin.event.extension'] : $this->get('sonata.admin.event.extension')) && false ?: '_'});\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.lock.extension']) ? $this->services['sonata.admin.lock.extension'] : $this->get('sonata.admin.lock.extension')) && false ?: '_'});\n $instance->setFormTheme(array(0 => '@SonataDoctrineORMAdmin/Form/form_admin_fields.html.twig'));\n $instance->setFilterTheme(array(0 => '@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig'));\n\n return $instance;\n }", "protected function getApp_Admin_Anexo2_Contrato_Arrendamiento_RedesService()\n {\n $instance = new \\AppBundle\\Admin\\anexo2_contrato_arrendamiento_redesAdmin('app.admin.anexo2.contrato.arrendamiento.redes', 'AppBundle\\\\Entity\\\\anexo2_contrato_arrendamiento_redes', 'SonataAdminBundle:CRUD');\n\n $instance->setManagerType('orm');\n $instance->setModelManager(${($_ = isset($this->services['sonata.admin.manager.orm']) ? $this->services['sonata.admin.manager.orm'] : $this->get('sonata.admin.manager.orm')) && false ?: '_'});\n $instance->setFormContractor(${($_ = isset($this->services['sonata.admin.builder.orm_form']) ? $this->services['sonata.admin.builder.orm_form'] : $this->get('sonata.admin.builder.orm_form')) && false ?: '_'});\n $instance->setShowBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_show']) ? $this->services['sonata.admin.builder.orm_show'] : $this->get('sonata.admin.builder.orm_show')) && false ?: '_'});\n $instance->setListBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_list']) ? $this->services['sonata.admin.builder.orm_list'] : $this->get('sonata.admin.builder.orm_list')) && false ?: '_'});\n $instance->setDatagridBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_datagrid']) ? $this->services['sonata.admin.builder.orm_datagrid'] : $this->get('sonata.admin.builder.orm_datagrid')) && false ?: '_'});\n $instance->setTranslator(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, false);\n $instance->setConfigurationPool(${($_ = isset($this->services['sonata.admin.pool']) ? $this->services['sonata.admin.pool'] : $this->get('sonata.admin.pool')) && false ?: '_'});\n $instance->setRouteGenerator(${($_ = isset($this->services['sonata.admin.route.default_generator']) ? $this->services['sonata.admin.route.default_generator'] : $this->get('sonata.admin.route.default_generator')) && false ?: '_'});\n $instance->setValidator(${($_ = isset($this->services['validator']) ? $this->services['validator'] : $this->get('validator')) && false ?: '_'});\n $instance->setSecurityHandler(${($_ = isset($this->services['sonata.admin.security.handler']) ? $this->services['sonata.admin.security.handler'] : $this->get('sonata.admin.security.handler')) && false ?: '_'});\n $instance->setMenuFactory(${($_ = isset($this->services['knp_menu.factory']) ? $this->services['knp_menu.factory'] : $this->get('knp_menu.factory')) && false ?: '_'});\n $instance->setRouteBuilder(${($_ = isset($this->services['sonata.admin.route.path_info']) ? $this->services['sonata.admin.route.path_info'] : $this->get('sonata.admin.route.path_info')) && false ?: '_'});\n $instance->setLabelTranslatorStrategy(${($_ = isset($this->services['sonata.admin.label.strategy.native']) ? $this->services['sonata.admin.label.strategy.native'] : $this->get('sonata.admin.label.strategy.native')) && false ?: '_'});\n $instance->setPagerType('default');\n $instance->setLabel('Relación de tramos de Redes');\n $instance->showMosaicButton(true);\n $instance->setTemplateRegistry(${($_ = isset($this->services['app.admin.anexo2.contrato.arrendamiento.redes.template_registry']) ? $this->services['app.admin.anexo2.contrato.arrendamiento.redes.template_registry'] : $this->get('app.admin.anexo2.contrato.arrendamiento.redes.template_registry')) && false ?: '_'});\n $instance->setSecurityInformation(array('EDIT' => array(0 => 'EDIT'), 'LIST' => array(0 => 'LIST'), 'CREATE' => array(0 => 'CREATE'), 'VIEW' => array(0 => 'VIEW'), 'DELETE' => array(0 => 'DELETE'), 'EXPORT' => array(0 => 'EXPORT'), 'ALL' => array(0 => 'ALL')));\n $instance->initialize();\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.event.extension']) ? $this->services['sonata.admin.event.extension'] : $this->get('sonata.admin.event.extension')) && false ?: '_'});\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.lock.extension']) ? $this->services['sonata.admin.lock.extension'] : $this->get('sonata.admin.lock.extension')) && false ?: '_'});\n $instance->setFormTheme(array(0 => '@SonataDoctrineORMAdmin/Form/form_admin_fields.html.twig'));\n $instance->setFilterTheme(array(0 => '@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig'));\n\n return $instance;\n }", "function verificarEspaciosPeriodo($retorno,$parametros,$espaciosInscritos) {\n $espacios=$this->validacion->validarEspaciosInscritos($parametros['maxespacios'],$espaciosInscritos);\n \n if($espacios!='ok')\n {\n $retorno['mensaje']=\"No se puede inscribir el espacio. Supera \".$parametros['maxespacios'].\" espacios de inscripción.\";\n $this->enlaceNoAdicion($retorno);\n }\n }", "public function mostrarVendedoresEmpresas() { \n try {\n \n $vendedoresEmpresas = VendedorEmpresa::all();\n return $vendedoresEmpresas;\n } catch(Exception $e) {\n \n return Utils::enviarRespuesta('Exception', $e->getMessage(), 500);\n }\n }", "public function Get_Esta()\n {\n\t\t\t$empr_id = empresa();\n\t\t\t$url = AJST.'/services/asp/ALMDataService/establecimientos/empresa/'.$empr_id;\n $array = $this->rest->callAPI(\"GET\",$url);\n $resp = json_decode($array['data']);\n return $resp->establecimientos->establecimiento;\n\t}", "function datosFormEspacio(){\r\n\r\n $espacio = $_POST['espacio'];\r\n if(isset($_POST['idEspacio'])){\r\n $idEspacio= $_POST['idEspacio'];\r\n }else{\r\n $idEspacio = null;\r\n }\r\n $esp = new espacio($idEspacio,$espacio);\r\n return $esp;\r\n\r\n }", "protected function getApp_Admin_Anexo4_Contrato_Compra_VentaService()\n {\n $instance = new \\AppBundle\\Admin\\anexo4_contrato_compra_ventaAdmin('app.admin.anexo4.contrato.compra.venta', 'AppBundle\\\\Entity\\\\anexo4_contrato_compra_venta', 'SonataAdminBundle:CRUD');\n\n $instance->setManagerType('orm');\n $instance->setModelManager(${($_ = isset($this->services['sonata.admin.manager.orm']) ? $this->services['sonata.admin.manager.orm'] : $this->get('sonata.admin.manager.orm')) && false ?: '_'});\n $instance->setFormContractor(${($_ = isset($this->services['sonata.admin.builder.orm_form']) ? $this->services['sonata.admin.builder.orm_form'] : $this->get('sonata.admin.builder.orm_form')) && false ?: '_'});\n $instance->setShowBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_show']) ? $this->services['sonata.admin.builder.orm_show'] : $this->get('sonata.admin.builder.orm_show')) && false ?: '_'});\n $instance->setListBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_list']) ? $this->services['sonata.admin.builder.orm_list'] : $this->get('sonata.admin.builder.orm_list')) && false ?: '_'});\n $instance->setDatagridBuilder(${($_ = isset($this->services['sonata.admin.builder.orm_datagrid']) ? $this->services['sonata.admin.builder.orm_datagrid'] : $this->get('sonata.admin.builder.orm_datagrid')) && false ?: '_'});\n $instance->setTranslator(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, false);\n $instance->setConfigurationPool(${($_ = isset($this->services['sonata.admin.pool']) ? $this->services['sonata.admin.pool'] : $this->get('sonata.admin.pool')) && false ?: '_'});\n $instance->setRouteGenerator(${($_ = isset($this->services['sonata.admin.route.default_generator']) ? $this->services['sonata.admin.route.default_generator'] : $this->get('sonata.admin.route.default_generator')) && false ?: '_'});\n $instance->setValidator(${($_ = isset($this->services['validator']) ? $this->services['validator'] : $this->get('validator')) && false ?: '_'});\n $instance->setSecurityHandler(${($_ = isset($this->services['sonata.admin.security.handler']) ? $this->services['sonata.admin.security.handler'] : $this->get('sonata.admin.security.handler')) && false ?: '_'});\n $instance->setMenuFactory(${($_ = isset($this->services['knp_menu.factory']) ? $this->services['knp_menu.factory'] : $this->get('knp_menu.factory')) && false ?: '_'});\n $instance->setRouteBuilder(${($_ = isset($this->services['sonata.admin.route.path_info']) ? $this->services['sonata.admin.route.path_info'] : $this->get('sonata.admin.route.path_info')) && false ?: '_'});\n $instance->setLabelTranslatorStrategy(${($_ = isset($this->services['sonata.admin.label.strategy.native']) ? $this->services['sonata.admin.label.strategy.native'] : $this->get('sonata.admin.label.strategy.native')) && false ?: '_'});\n $instance->setPagerType('default');\n $instance->setLabel('Puntos de Comercialización por ETECSA');\n $instance->showMosaicButton(true);\n $instance->setTemplateRegistry(${($_ = isset($this->services['app.admin.anexo4.contrato.compra.venta.template_registry']) ? $this->services['app.admin.anexo4.contrato.compra.venta.template_registry'] : $this->get('app.admin.anexo4.contrato.compra.venta.template_registry')) && false ?: '_'});\n $instance->setSecurityInformation(array('EDIT' => array(0 => 'EDIT'), 'LIST' => array(0 => 'LIST'), 'CREATE' => array(0 => 'CREATE'), 'VIEW' => array(0 => 'VIEW'), 'DELETE' => array(0 => 'DELETE'), 'EXPORT' => array(0 => 'EXPORT'), 'ALL' => array(0 => 'ALL')));\n $instance->initialize();\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.event.extension']) ? $this->services['sonata.admin.event.extension'] : $this->get('sonata.admin.event.extension')) && false ?: '_'});\n $instance->addExtension(${($_ = isset($this->services['sonata.admin.lock.extension']) ? $this->services['sonata.admin.lock.extension'] : $this->get('sonata.admin.lock.extension')) && false ?: '_'});\n $instance->setFormTheme(array(0 => '@SonataDoctrineORMAdmin/Form/form_admin_fields.html.twig'));\n $instance->setFilterTheme(array(0 => '@SonataDoctrineORMAdmin/Form/filter_admin_fields.html.twig'));\n\n return $instance;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
se o controle estiver ligado e o volume for superior a 0, mudar o volume pra 0
public function ligarMudo() { if ($this->getLigado() && $this->getVolume() > 0) { $this->setVolume(0); } }
[ "public function maisVolume(){\n if ($this->getLigado()) {\n $this->setVolume($this->getVolume() + 5);\n }\n }", "public function ligarMudo()\n {\n if($this->getLigado() && $this->getVolume()> 0 ) {\n $this->getVolume(0);\n }\n }", "abstract public function calculateVolume(): int;", "public function totalVolume();", "public function volume();", "function volumeCone($rayon, $hauteur){\n\n $volume = $rayon * $rayon * 3.14 * $hauteur * (1/3); // calcul du volume\n\n return $volume;//indique la valeur a renvoyer !!\n}", "public function volume()\n {\n return ($this->comprimento() * $this->largura() * $this->altura()) / 6000;\n }", "function volumeBalok($panjang, $lebar, $tinggi)\n {\n return $panjang * $lebar * $tinggi;\n }", "function VolumeCone ($rayon, $hauteur)\n{\n $volume = $rayon * $rayon * 3.14 * $hauteur * (1/3); // calcul du volume\n return $volume; // indique la valeur à renvoyer, ici le volume\n }", "public function volume(float $volume): static;", "function volumeKubus($sisi)\n {\n return $sisi * $sisi * $sisi;\n }", "public function bajarVariableVolumen( ) {\n $vol = $this->getVolumen();\n if ($vol > 0) {\n \t$vol = $vol - 8;\n }\n else {\n \t$vol = 0;\n }\n $this->setVolumen(vol);\n }", "public function volume()\n\t{\n\t\treturn ( 4/3 * ($this->area()* $this->radius ));\n\t}", "public function increaseVolume()\n {\n $this->volume += 1;\n }", "public function volar() {\r\n \r\n echo \"Estoy volando mirame lo alto que estoy: \" . $this->altura ;\r\n }", "function sn_setvolume($volume) {\n\t\tif ($volume < 0.0) {\n\t\t\t$volume = 0.0;\n\t\t}\n\t\tif ($volume > 100.0) {\n\t\t\t$volume = 100.0;\n\t\t}\n\t\treturn $this->ngsend(NGWINAMP_REQ_SETVOLUME, 0, 0, ($volume / 100.0));\n\t}", "public function diminuiVolume()\n\t\t{\n\n\t\t\t--$this->volume;\n\t\t\techo \"<p>Diminuindo o volume para: {$this->volume} </p>\";\n\t\t}", "public function availableVolume()\n {\n return $this->trunkHeight * $this->trunkDepth * $this->trunkWidht;\n }", "public function calcTankVolume()\n {\n return $this -> rib * $this -> rib * $this -> height;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show the the homepage
public function showHomePage() { # call the API if($accessKey = getAccessKey()) { $headers = ['accessKey' => $accessKey]; } else { $headers = []; } $response = App::make("ApiClient")->get("home", [], $headers); # if we got some data back successfully then do something with it if($response['success']) { # short cut the data response $data = $response['success']['data']; # if we don't have the nav stored in the session then store it if (! Session::has('nav') ) { Session::put('nav', $data['channels']); } # set the browser page title $data['pageTitle'] = "Bristol news, what's on, food and drink, lifestyle"; # set the pages meta description value $data['metaDescription'] = "Bristol news, comprehensive what's on listings, reviews and special offers online, on mobile, in print - check out our FREE app and monthly magazine"; # make the view return View::make('home.index', $data); } else { // do something here!!! } }
[ "public function index(){\n\t\t$this->show_home();\n\t}", "private function showHome()\n {\n $content = require $this->viewDirectory . \"/home/home.html.php\";\n\n $this->render($content);\n }", "public function getShowHomePage()\n {\n echo $this->blade->render(\"home\");\n }", "public function showHome() {\n $this->dData = $this->loadCourses();\n return $this->display(\"home\");\n }", "public function home()\n\t{\n\t\t$this->sidebar_template = 'news';\n\t\t$this->news = R::dispense('news', 5);\n\t\t$this->render();\n\t}", "public function actionHome() {\n\t\t// display the home page\n\t\t$this->dataUrl = $this->createUrl('site/home/');\n\t\t$this->pageId = 'site-home';\n\t\t$this->render('home', array());\n\t}", "function homepageAction()\n\t {\n\t \t$this->view->loginStatus = $this->isLoggedIn();\n\t \t\n\t \t$this->_helper->layout()->setLayout('layout_homepage');\n\t \t\n\t \t$fitnessPages = new FitnessWebsitePages();\n \t $fitnessPagesMulti= new FitnessWebsitePagesMultilang();\n \t \n \t \n \t $defaultLang = $this->getDefaultLanguage();\n \t $pageId = $fitnessPages->getPageByName('Homepage');\n \t \n \t \n \t \n \t $pageContent = $fitnessPagesMulti->getPage($pageId['page_id'],$defaultLang);\n \t \n \t $this->view->pageTitle = $pageContent['page_title'];\n \t $pageContent1 = str_replace(\"<strong>\",\"<b>\",$pageContent['page_content']);\n $this->view->pageContent = str_replace(\"</strong>\",\"</b>\",$pageContent1);\n\t\t\t$pageContent2 = str_replace(\"<strong>\",\"<b>\",$pageContent['page_content_sub']);\n $this->view->pageContent2 = str_replace(\"</strong>\",\"</b>\",$pageContent2);\n \t $this->view->defaultLang = $defaultLang;\n\t }", "function home() {\n $lessons = $this->object->displayLessons();\n $testimonials = $this->object->displayTestimonials();\n \n require 'app/views/FRONT/home.php';\n }", "function home() {\n\n\t\t$this->mcontents['page_title'] \t\t= 'Control Panel';\n\t\t$this->mcontents['page_heading'] \t= 'Home';\n\n\t\tisAdminSection();\n\n\t\tloadAdminTemplate('home', $this->mcontents);\n\t}", "public function home()\n\t\t{\n\t\t\treturn render('home.php');\n\t\t}", "public function home()\n\t{\n\t\t$published = News::getPublished();\n\t\t\n\t\t$news = $published[0];\n\n // load 8 more news articles for display in recent news section\n\t\t$recent = array_slice($published, 1, 8);\n\n\t\t// the rest\n\t\t$older = array_slice($published, 8);\n\n\t\t$this->makeView('news/view',compact('recent','news','older'));\n\t}", "public function actionHome(){\n\t\t\n\t\t$this->getContent('home');\n\t\t\n\t}", "public function showAdminHomepageAction()\n {\n $homepageManager = new HomepageManager();\n $homepage = $homepageManager->getAllHomepage();\n return $this->twig->render('admin/adminhomepage.html.twig', array(\n 'homepage' => $homepage\n ));\n }", "private function home() {\n // busca as categorias do bd\n $categorias = $this->model->visualizarCategorias();\n // seta as categorias para a view\n $this->view->setCategorias($categorias);\n // passa o arquivo home\n $file = $this->templates . 'home.php';\n \n // retorna o conteudo da tela home para o usuario\n $this->telaUser = $this->view->retornaTela($file);\n }", "public static function home()\n {\n if(!getTheme()->fileExists('templates/front.php'))\n getRoute()->redirect(Url::photosView(null, false));\n\n $apisToCall = getConfig()->get('front-apis');\n $params = array();\n foreach($apisToCall as $name => $api)\n {\n $apiParts = explode(' ', $api);\n $apiMethod = strtoupper($apiParts[0]);\n $apiMethod = $apiMethod == 'GET' ? EpiRoute::httpGet : EpiRoute::httpPost;\n $apiUrlParts = parse_url($apiParts[1]);\n $apiParams = array();\n if(isset($apiUrlParts['query']))\n parse_str($apiUrlParts['query'], $apiParams);\n\n $response = getApi()->invoke($apiUrlParts['path'], $apiMethod, array(\"_{$apiMethod}\" => $apiParams));\n $params[$name] = $response['result'];\n\n }\n $body = getTheme()->get('front.php', $params);\n getTheme()->display('template.php', array('body' => $body, 'page' => 'front'));\n }", "public function home() \n {\n\n\t$user = $this->session->userdata(\"username\");\n if ($user != false) {\n if (modules::run('permissions/isPermitted', $this->session->userdata(\"username\"), \"canViewMember\") == \"permitted\") {\n redirect('/selfservice');\n } else if (modules::run('permissions/isPermitted', $this->session->userdata(\"username\"), \"canViewAdmin\") == \"permitted\") {\n redirect('/admin');\n }\n }\n\t\t\n $data['page_title'] = 'Armony';\n $data['module'] = 'pages';\n $data['view_file'] = 'main_page';\n\n echo Modules::run('templates/main_site', $data);\n }", "public function index() {\n\t\t$this->landing();\n\t}", "private static function defaultPage() {\n require_once __DIR__ . '/../controllers/homeController.php';\n $controller = new homeController();\n $controller->index();\n }", "function homeAction()\n\t {\n\t \t$this->view->loginStatus = $this->isLoggedIn();\n\t \t\n\t \t$this->_helper->layout()->setLayout('layout_home');\n\t \t\n\t \t$fitnessPages = new FitnessWebsitePages();\n \t $fitnessPagesMulti= new FitnessWebsitePagesMultilang();\n \t \n \t \n \t $defaultLang = $this->getDefaultLanguage();\n \t $pageId = $fitnessPages->getPageByName('Homepage');\n \t $aboutId = $fitnessPages->getPageByName('workhow');\n\t\t\t$faqId = $fitnessPages->getPageByName('guarantee');\n \t \n \t \n \t $pageContent = $fitnessPagesMulti->getPage($pageId['page_id'],$defaultLang);\n \t $aboutContent = $fitnessPagesMulti->getPage($aboutId['page_id'],$defaultLang);\n\t\t\t$faqContent = $fitnessPagesMulti->getPage($faqId['page_id'],$defaultLang);\n \t \n \t $this->view->pageContent = substr(strip_tags($pageContent['page_content']),0,195);\n\t\t\t$this->view->pageTitle = $pageContent['page_title'];\n \t $this->view->aboutContent = substr(strip_tags($aboutContent['page_section1']),0,245);\n\t\t\t$this->view->aboutTitle = $aboutContent['page_title'];\n\t\t\t$this->view->faqContent = substr(strip_tags($faqContent['page_content_sub']),0,218);\n\t\t\t$this->view->faqTitle = $faqContent['page_title'];\n\t\t\t\n\t\t\t$this->view->defaultLang = $defaultLang;\n\t\t\t\n\t \t\n\t \t//if($this->view->loginStatus == 1)\n\t \t//$this->view->memberStatus = $this->checkUserMembership();\n\t \t\n\t \t\n\t }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return left attack rating
public function getLeftAttackRating() { if(!isset($this->leftAtt) || $this->leftAtt === null) { $this->leftAtt = $this->getXml()->getElementsByTagName('RatingLeftAtt')->item(0)->nodeValue; } return $this->leftAtt; }
[ "public function getLeftAttack()\n {\n return $this->getXml()->getElementsByTagName('RatingLeftAtt')->item(0)->nodeValue;\n }", "public function getRatingSectorsLeftAttack()\n\t{\n\t\tif(!isset($this->ratingsectors['LeftAttack']))\n\t\t{\n\t\t\t$this->ratingsectors['LeftAttack'] = $this->getRatingSectors('LeftAttack');\n\t\t}\n\t\treturn $this->ratingsectors['LeftAttack'];\n\t}", "public function getLeftDefenseRating()\n {\n return $this->getXml()->getElementsByTagName('RatingLeftDef')->item(0)->nodeValue;\n }", "public function getLeftDefense()\n {\n return $this->getXml()->getElementsByTagName('RatingLeftDef')->item(0)->nodeValue;\n }", "public function getRightAttackRating()\n {\n return $this->getXml()->getElementsByTagName('RatingRightAtt')->item(0)->nodeValue;\n }", "public function getRightAttackRating()\r\n\t{\r\n\t\tif(!isset($this->rightAtt) || $this->rightAtt === null)\r\n\t\t{\r\n\t\t\t$this->rightAtt = $this->getXml()->getElementsByTagName('RatingRightAtt')->item(0)->nodeValue;\r\n\t\t}\r\n\t\treturn $this->rightAtt;\r\n\t}", "public function getLeftDefense()\n\t{\n\t\tif(!isset($this->leftdef) || $this->leftdef === null)\n\t\t{\n\t\t\t$this->leftdef = $this->getXml()->getElementsByTagName('RatingLeftDef')->item(0)->nodeValue;\n\t\t}\n\t\treturn $this->leftdef;\n\t}", "public function getDamage() \n\t{\n\t\treturn $this->attacker->getStats('strength') - $this->defender->getStats('defence');\n\t}", "public function getDamageRating() {\n return $this->damageRating;\n }", "protected function getwizloss_enemy ()\n\t{\n\t\t$wizloss = mt_rand(ceil($this->self->e_trpwiz * 0.01), ceil($this->self->e_trpwiz * 0.05 + 1));\n\t\tif ($wizloss > $this->self->e_trpwiz)\n\t\t\t$wizloss = $this->self->e_trpwiz;\n\t\treturn $wizloss;\n\t}", "function gainability (&$fighter)\n{\n\t$strInfo = '';\n\n\tif ($fighter -> gainmiss > 0) {\n\t\t$i=1;\n\t\t$j=0;\n\t\t$gunik=0;\n\t\twhile ($i+$j <= $fighter -> gainmiss) {\n\t\t\t$gunik+= 0.01;\n\t\t\tif ($j < $i) $j = $i + $j;\n\t\t\telse $i = $i + $j;\n\t\t\t}\n\t\t$fighter -> gainmiss = $gunik;\n\t\t$strInfo .= '<b>'.$gunik.'</b> '.ABILITY.' '.DODGE.'<br />';\n\t\t}\n\tif ($fighter -> gainattack > 0) {\n\t\t$strInfo .= '<b>'.$fighter -> gainattack.'</b> '.ABILITY.' '.A_FIGHT.'<br />';\n\t\t}\n\tif ($fighter -> gainshoot > 0) {\n\t\t$strInfo .= '<b>'.$fighter -> gainshoot.'</b> '.ABILITY.' '.SHOOTING.'<br />';\n\t\t}\n\tif ($fighter -> gainmagic > 0) {\n\t\t$strInfo .= '<b>'.$fighter -> gainmagic.'</b> '.ABILITY.' '.C_SPELL.'<br />';\n\t\t}\n\treturn $strInfo;\n}", "public function getAttackDamage(): int {\n\t\treturn $this->attackDamage;\n\t}", "public function defense(){\n return $this->defense;\n }", "public function getRatingSectorsLeftDefense()\n {\n return $this->getRatingSectors('LeftDefense');\n }", "public function calculatePowerLevel(): int\n {\n return $this->strength + $this->weaponPower;\n }", "public function attackPoints()\n {\n return $this->attackPoints;\n }", "public function get_penalty()\n {\n return $this->penalty;\n }", "public function rating(){\n $ratings = RESTAURANTS::getVotesForRestaurant($this->id);\n if($ratings['total'] == 0){\n return 'No ratings yet';\n }\n return $ratings['total'] . ' ratings, '.$this->ratingScore() . '% positive';\n }", "public function getOveralRating()\n {\n return $this->overalRating;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get purchased subscriptions that have access to the current posts.
protected function get_purchased_subscriptions() { $access = LaterPay_Helper_Post::get_access_state(); $purchased_subscriptions = array(); // get time passes with access foreach ( $access as $access_key => $access_value ) { // if access was granted if ( $access_value === true ) { $access_key_exploded = explode( '_', $access_key ); // if this is time pass key - store time pass id if ( $access_key_exploded[0] === LaterPay_Helper_Subscription::TOKEN ) { $purchased_subscriptions[] = $access_key_exploded[1]; } } } return $purchased_subscriptions; }
[ "public function getSubscriptions()\n {\n return $this->subscriptions;\n }", "public function activeSubscriptionsList()\n {\n return $this->subscriptions()\n ->where('expires_on', '>', Carbon::now())->notCancelled()->get();\n }", "public function getSubscriptions()\n {\n return $this->state->getSubscriptions();\n }", "public function subscriptions()\n {\n return Subscription::byCustomer($this->id);\n }", "function getUserSubscriptions()\n {\n return Subscription::where('user_id', $this->id)->get();\n }", "function getActiveSubscriptions() {\n\n return $this->getSubscriptions('Active');\n\n }", "public function getSubscriptions()\n {\n // Get user\n $user = JFactory::getUser();\n\n $sql = 'SELECT a.*, p.name AS pname, DATEDIFF(a.expired, NOW()) AS days_left' .\n ' FROM #__jms_plan_subscrs AS a' .\n ' INNER JOIN #__jms_plans AS p ON (a.plan_id = p.id)' .\n ' WHERE a.user_id = ' . (int) $user->get('id');\n\n $this->_db->setQuery($sql);\n\n $this->_subscriptions = $this->_db->loadObjectList();\n\n return $this->_subscriptions;\n }", "public function getActiveSubscriptionsToRenew()\n {\n return $this->subscription->where('is_expired', true)\n ->where('is_active', true)\n ->where('will_renew', true)\n ->get();\n }", "public function subscriptions()\n {\n $this->hasMany(\n 'id',\n 'Canvas\\Models\\Subscription',\n 'user_id',\n [\n 'alias' => 'subscriptions',\n 'params' => [\n 'conditions' => 'apps_id = ?0 and companies_id = ?1',\n 'bind' => [$this->di->getApp()->getId(), $this->default_company],\n 'order' => 'id DESC'\n ]\n ]\n );\n\n return $this->getRelated('subscriptions');\n }", "function has_active_subscription( $user_id=null ) {\n // if the user_id is not set in function argument we get the current user ID\n if( null == $user_id )\n $user_id = get_current_user_id();\n\n // Get all active subscrptions for a user ID\n $active_subscriptions = get_posts( array(\n 'numberposts' => -1,\n 'meta_key' => '_customer_user',\n 'meta_value' => $user_id,\n 'post_type' => 'shop_subscription', // Subscription post type\n 'post_status' => 'wc-active', // Active subscription\n ) );\n // if user has an active subscription\n if( ! empty( $active_subscriptions ) ) return true;\n else return false;\n}", "public function get_active_subscriptions() {\r\n return $this->get_all_subscriptions( true );\r\n }", "public function subscriptions() {\n $QueryID = $this->db->get_query_id();\n $UserSubscriptions = $this->cache->get_value(\"subscriptions_user_\" . $this->userId);\n if ($UserSubscriptions === false) {\n $this->db->prepared_query('\n SELECT TopicID\n FROM users_subscriptions\n WHERE UserID = ?\n ', $this->userId\n );\n $UserSubscriptions = $this->db->collect(0);\n $this->cache->cache_value(\"subscriptions_user_\" . $this->userId, $UserSubscriptions, 0);\n }\n $this->db->set_query_id($QueryID);\n return $UserSubscriptions;\n }", "public function currentSubscription()\n {\n return $this->subscriptions()\n ->where('starts_on', '<', Carbon::now())\n ->where('expires_on', '>', Carbon::now());\n }", "function getPendingSubscriptions() {\n\n return $this->getSubscriptions('Pending');\n\n }", "public function usersWithActiveSubscription()\n {\n return User::whereHas('userSubscription', function ($q) {\n $q->where('next_order_date', '>=', Carbon::now());\n })->orderByDesc('id')\n ->paginate();\n }", "public function subscriptions()\n {\n return $this->hasMany(Subscription::class, $this->getForeignKey())->orderBy('created_at', 'desc');\n }", "public function getSubscriptionsWithActivePlan(): Collection\n {\n return $this->subscriptions()->whereHas('plan', function ($query) {\n $query->whereActive();\n })->get();\n }", "function listSubscriptions() {\n\n\t\treturn $this->httpGet($this->_baseUrl.'subscriptions');\n\n\t}", "public function getSubscriptions()\n\t{\n\t\t$query = \"SELECT nl.* as sub FROM \" . \n\t\t\t\tNEWSLETTER_TABLE . \" nl \n\t\t\t\tJOIN \" . NEWSLETTER_PERMISSION_TABLE . \" p ON p.newsletter_id = nl.id\n\t\t\t\tJOIN \" . SUBSCRIPTION_TABLE . \" st ON st.newsletter_id = nl.id \n\t\t\t\tJOIN \" . SUBSCRIBER_TABLE . \" s ON s.id = st.subscriber_id\n\t\t\t\tWHERE \n\t\t\t\t\ts.id = {$this->id}\";\n\t\t$subscriptions = SqlQuery::getInstance()->simpleQuery($query);\n\t\t\n\t\treturn $subscriptions;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable Dashicons in Frontend
function wpdocs_dequeue_dashicon() { if (current_user_can('update_core')) { return; } wp_deregister_style('dashicons'); }
[ "function wpdocs_dequeue_dashicon() {\n if (current_user_can( 'update_core' )) {\n return;\n }\n wp_deregister_style('dashicons');\n}", "function wpdocs_dequeue_dashicon() {\n if (current_user_can( 'update_core' )) {\n return;\n }\n wp_deregister_style('dashicons');\n }", "function wpdocs_dequeue_dashicon() {\n\t if (current_user_can( 'update_core' )) {\n\t return;\n\t }\n\t wp_deregister_style('dashicons');\n\t}", "function dashicons_admin_only() {\n if(!is_user_logged_in()) {\n global $wp_styles;\n wp_dequeue_style('dashicons');\n $wp_styles->registered['dashicons']->src = '';\n }\n}", "function wpdocs_dequeue_dashicon() {\n\tif (current_user_can( 'update_core' )) {\n\t\treturn;\n\t}\n\twp_deregister_style('dashicons');\n}", "public function deregister_dashicons() {\n\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\twp_deregister_style( 'dashicons' );\n\t\t}\n\t}", "function zaxu_disable_site_icon() {\n global $wp_customize;\n $wp_customize->remove_control('site_icon');\n }", "function theme_disable_svg_icons( $disable = true ) {\r\n if ( $disable === true ) {\r\n remove_action( 'wp_footer', 'twentyseventeen_include_svg_icons', 9999 );\r\n }\r\n}", "private function get_dashicons() {\n\t\treturn array( 'dashicons-menu', 'dashicons-admin-site', 'dashicons-dashboard', 'dashicons-admin-post', 'dashicons-admin-media', 'dashicons-admin-links', 'dashicons-admin-page', 'dashicons-admin-comments', 'dashicons-admin-appearance', 'dashicons-admin-plugins', 'dashicons-admin-users', 'dashicons-admin-tools', 'dashicons-admin-settings', 'dashicons-admin-network', 'dashicons-admin-home', 'dashicons-admin-generic', 'dashicons-admin-collapse', 'dashicons-welcome-write-blog', 'dashicons-welcome-add-page', 'dashicons-welcome-view-site', 'dashicons-welcome-widgets-menus', 'dashicons-welcome-comments', 'dashicons-welcome-learn-more', 'dashicons-format-aside', 'dashicons-format-image', 'dashicons-format-gallery', 'dashicons-format-video', 'dashicons-format-status', 'dashicons-format-quote', 'dashicons-format-chat', 'dashicons-format-audio', 'dashicons-camera', 'dashicons-images-alt', 'dashicons-images-alt2', 'dashicons-video-alt', 'dashicons-video-alt2', 'dashicons-video-alt3', 'dashicons-image-crop', 'dashicons-image-rotate-left', 'dashicons-image-rotate-right', 'dashicons-image-flip-vertical', 'dashicons-image-flip-horizontal', 'dashicons-undo', 'dashicons-redo', 'dashicons-editor-bold', 'dashicons-editor-italic', 'dashicons-editor-ul', 'dashicons-editor-ol', 'dashicons-editor-quote', 'dashicons-editor-alignleft', 'dashicons-editor-aligncenter', 'dashicons-editor-alignright', 'dashicons-editor-insertmore', 'dashicons-editor-spellcheck', 'dashicons-editor-distractionfree', 'dashicons-editor-kitchensink', 'dashicons-editor-underline', 'dashicons-editor-justify', 'dashicons-editor-textcolor', 'dashicons-editor-paste-word', 'dashicons-editor-paste-text', 'dashicons-editor-removeformatting', 'dashicons-editor-video', 'dashicons-editor-customchar', 'dashicons-editor-outdent', 'dashicons-editor-indent', 'dashicons-editor-help', 'dashicons-editor-strikethrough', 'dashicons-editor-unlink', 'dashicons-editor-rtl', 'dashicons-align-left', 'dashicons-align-right', 'dashicons-align-center', 'dashicons-align-none', 'dashicons-lock', 'dashicons-calendar', 'dashicons-visibility', 'dashicons-post-status', 'dashicons-edit', 'dashicons-trash', 'dashicons-arrow-up', 'dashicons-arrow-down', 'dashicons-arrow-right', 'dashicons-arrow-left', 'dashicons-arrow-up-alt', 'dashicons-arrow-down-alt', 'dashicons-arrow-right-alt', 'dashicons-arrow-left-alt', 'dashicons-arrow-up-alt2', 'dashicons-arrow-down-alt2', 'dashicons-arrow-right-alt2', 'dashicons-arrow-left-alt2', 'dashicons-sort', 'dashicons-leftright', 'dashicons-list-view', 'dashicons-exerpt-view', 'dashicons-share', 'dashicons-share-alt', 'dashicons-share-alt2', 'dashicons-twitter', 'dashicons-rss', 'dashicons-email', 'dashicons-email-alt', 'dashicons-facebook', 'dashicons-facebook-alt', 'dashicons-googleplus', 'dashicons-networking', 'dashicons-hammer', 'dashicons-art', 'dashicons-migrate', 'dashicons-performance', 'dashicons-wordpress', 'dashicons-wordpress-alt', 'dashicons-pressthis', 'dashicons-update', 'dashicons-screenoptions', 'dashicons-info', 'dashicons-cart', 'dashicons-feedback', 'dashicons-cloud', 'dashicons-translation', 'dashicons-tag', 'dashicons-category', 'dashicons-yes', 'dashicons-no', 'dashicons-no-alt', 'dashicons-plus', 'dashicons-minus', 'dashicons-dismiss', 'dashicons-marker', 'dashicons-star-filled', 'dashicons-star-half', 'dashicons-star-empty', 'dashicons-flag', 'dashicons-location', 'dashicons-location-alt', 'dashicons-vault', 'dashicons-shield', 'dashicons-shield-alt', 'dashicons-sos', 'dashicons-search', 'dashicons-slides', 'dashicons-analytics', 'dashicons-chart-pie', 'dashicons-chart-bar', 'dashicons-chart-line', 'dashicons-chart-area', 'dashicons-groups', 'dashicons-businessman', 'dashicons-id', 'dashicons-id-alt', 'dashicons-products', 'dashicons-awards', 'dashicons-forms', 'dashicons-testimonial', 'dashicons-portfolio', 'dashicons-book', 'dashicons-book-alt', 'dashicons-download', 'dashicons-upload', 'dashicons-backup', 'dashicons-clock', 'dashicons-lightbulb', 'dashicons-desktop', 'dashicons-tablet', 'dashicons-smartphone', 'dashicons-smiley' );\n\t}", "function bs_dequeue_dashicons() {\n if ( ! is_user_logged_in() ) {\n wp_deregister_style( 'dashicons' );\n }\n}", "function remove_default_elementor_icons() {\n foreach( [ 'solid', 'regular', 'brands' ] as $style ) {\n wp_deregister_style( 'elementor-icons-fa-' . $style );\n }\n}", "function load_dashicons_front_end() {\n\twp_enqueue_style( 'dashicons' );\n}", "public function get_all_font_dashicons() {\n\t\t$list = array(\n\t\t\t'dashicons-menu',\n\t\t\t'dashicons-admin-site',\n\t\t\t'dashicons-dashboard',\n\t\t\t'dashicons-admin-post',\n\t\t\t'dashicons-admin-media',\n\t\t\t'dashicons-admin-links',\n\t\t\t'dashicons-admin-page',\n\t\t\t'dashicons-admin-comments',\n\t\t\t'dashicons-admin-appearance',\n\t\t\t'dashicons-admin-plugins',\n\t\t\t'dashicons-admin-users',\n\t\t\t'dashicons-admin-tools',\n\t\t\t'dashicons-admin-settings',\n\t\t\t'dashicons-admin-network',\n\t\t\t'dashicons-admin-home',\n\t\t\t'dashicons-admin-generic',\n\t\t\t'dashicons-admin-collapse',\n\t\t\t'dashicons-filter',\n\t\t\t'dashicons-admin-customizer',\n\t\t\t'dashicons-admin-multisite',\n\t\t\t'dashicons-welcome-write-blog',\n\t\t\t'dashicons-welcome-add-page',\n\t\t\t'dashicons-welcome-view-site',\n\t\t\t'dashicons-welcome-widgets-menus',\n\t\t\t'dashicons-welcome-comments',\n\t\t\t'dashicons-welcome-learn-more',\n\t\t\t'dashicons-format-aside',\n\t\t\t'dashicons-format-image',\n\t\t\t'dashicons-format-gallery',\n\t\t\t'dashicons-format-video',\n\t\t\t'dashicons-format-status',\n\t\t\t'dashicons-format-quote',\n\t\t\t'dashicons-format-chat',\n\t\t\t'dashicons-format-audio',\n\t\t\t'dashicons-camera',\n\t\t\t'dashicons-images-alt',\n\t\t\t'dashicons-images-alt2',\n\t\t\t'dashicons-video-alt',\n\t\t\t'dashicons-video-alt2',\n\t\t\t'dashicons-video-alt3',\n\t\t\t'dashicons-media-archive',\n\t\t\t'dashicons-media-audio',\n\t\t\t'dashicons-media-code',\n\t\t\t'dashicons-media-default',\n\t\t\t'dashicons-media-document',\n\t\t\t'dashicons-media-interactive',\n\t\t\t'dashicons-media-spreadsheet',\n\t\t\t'dashicons-media-text',\n\t\t\t'dashicons-media-video',\n\t\t\t'dashicons-playlist-audio',\n\t\t\t'dashicons-playlist-video',\n\t\t\t'dashicons-controls-play',\n\t\t\t'dashicons-controls-pause',\n\t\t\t'dashicons-controls-forward',\n\t\t\t'dashicons-controls-skipforward',\n\t\t\t'dashicons-controls-back',\n\t\t\t'dashicons-controls-skipback',\n\t\t\t'dashicons-controls-repeat',\n\t\t\t'dashicons-controls-volumeon',\n\t\t\t'dashicons-controls-volumeoff',\n\t\t\t'dashicons-image-crop',\n\t\t\t'dashicons-image-rotate',\n\t\t\t'dashicons-image-rotate-left',\n\t\t\t'dashicons-image-rotate-right',\n\t\t\t'dashicons-image-flip-vertical',\n\t\t\t'dashicons-image-flip-horizontal',\n\t\t\t'dashicons-image-filter',\n\t\t\t'dashicons-undo',\n\t\t\t'dashicons-redo',\n\t\t\t'dashicons-editor-bold',\n\t\t\t'dashicons-editor-italic',\n\t\t\t'dashicons-editor-ul',\n\t\t\t'dashicons-editor-ol',\n\t\t\t'dashicons-editor-quote',\n\t\t\t'dashicons-editor-alignleft',\n\t\t\t'dashicons-editor-aligncenter',\n\t\t\t'dashicons-editor-alignright',\n\t\t\t'dashicons-editor-insertmore',\n\t\t\t'dashicons-editor-spellcheck',\n\t\t\t'dashicons-editor-expand',\n\t\t\t'dashicons-editor-contract',\n\t\t\t'dashicons-editor-kitchensink',\n\t\t\t'dashicons-editor-underline',\n\t\t\t'dashicons-editor-justify',\n\t\t\t'dashicons-editor-textcolor',\n\t\t\t'dashicons-editor-paste-word',\n\t\t\t'dashicons-editor-paste-text',\n\t\t\t'dashicons-editor-removeformatting',\n\t\t\t'dashicons-editor-video',\n\t\t\t'dashicons-editor-customchar',\n\t\t\t'dashicons-editor-outdent',\n\t\t\t'dashicons-editor-indent',\n\t\t\t'dashicons-editor-help',\n\t\t\t'dashicons-editor-strikethrough',\n\t\t\t'dashicons-editor-unlink',\n\t\t\t'dashicons-editor-rtl',\n\t\t\t'dashicons-editor-break',\n\t\t\t'dashicons-editor-code',\n\t\t\t'dashicons-editor-paragraph',\n\t\t\t'dashicons-editor-table',\n\t\t\t'dashicons-align-left',\n\t\t\t'dashicons-align-right',\n\t\t\t'dashicons-align-center',\n\t\t\t'dashicons-align-none',\n\t\t\t'dashicons-lock',\n\t\t\t'dashicons-unlock',\n\t\t\t'dashicons-calendar',\n\t\t\t'dashicons-calendar-alt',\n\t\t\t'dashicons-visibility',\n\t\t\t'dashicons-hidden',\n\t\t\t'dashicons-post-status',\n\t\t\t'dashicons-edit',\n\t\t\t'dashicons-trash',\n\t\t\t'dashicons-sticky',\n\t\t\t'dashicons-external',\n\t\t\t'dashicons-arrow-up',\n\t\t\t'dashicons-arrow-down',\n\t\t\t'dashicons-arrow-right',\n\t\t\t'dashicons-arrow-left',\n\t\t\t'dashicons-arrow-up-alt',\n\t\t\t'dashicons-arrow-down-alt',\n\t\t\t'dashicons-arrow-right-alt',\n\t\t\t'dashicons-arrow-left-alt',\n\t\t\t'dashicons-arrow-up-alt2',\n\t\t\t'dashicons-arrow-down-alt2',\n\t\t\t'dashicons-arrow-right-alt2',\n\t\t\t'dashicons-arrow-left-alt2',\n\t\t\t'dashicons-sort',\n\t\t\t'dashicons-leftright',\n\t\t\t'dashicons-randomize',\n\t\t\t'dashicons-list-view',\n\t\t\t'dashicons-exerpt-view',\n\t\t\t'dashicons-grid-view',\n\t\t\t'dashicons-share',\n\t\t\t'dashicons-share-alt',\n\t\t\t'dashicons-share-alt2',\n\t\t\t'dashicons-twitter',\n\t\t\t'dashicons-rss',\n\t\t\t'dashicons-email',\n\t\t\t'dashicons-email-alt',\n\t\t\t'dashicons-facebook',\n\t\t\t'dashicons-facebook-alt',\n\t\t\t'dashicons-googleplus',\n\t\t\t'dashicons-networking',\n\t\t\t'dashicons-hammer',\n\t\t\t'dashicons-art',\n\t\t\t'dashicons-migrate',\n\t\t\t'dashicons-performance',\n\t\t\t'dashicons-universal-access',\n\t\t\t'dashicons-universal-access-alt',\n\t\t\t'dashicons-tickets',\n\t\t\t'dashicons-nametag',\n\t\t\t'dashicons-clipboard',\n\t\t\t'dashicons-heart',\n\t\t\t'dashicons-megaphone',\n\t\t\t'dashicons-schedule',\n\t\t\t'dashicons-wordpress',\n\t\t\t'dashicons-wordpress-alt',\n\t\t\t'dashicons-pressthis',\n\t\t\t'dashicons-update',\n\t\t\t'dashicons-screenoptions',\n\t\t\t'dashicons-info',\n\t\t\t'dashicons-cart',\n\t\t\t'dashicons-feedback',\n\t\t\t'dashicons-cloud',\n\t\t\t'dashicons-translation',\n\t\t\t'dashicons-tag',\n\t\t\t'dashicons-category',\n\t\t\t'dashicons-archive',\n\t\t\t'dashicons-tagcloud',\n\t\t\t'dashicons-text',\n\t\t\t'dashicons-yes',\n\t\t\t'dashicons-no',\n\t\t\t'dashicons-no-alt',\n\t\t\t'dashicons-plus',\n\t\t\t'dashicons-plus-alt',\n\t\t\t'dashicons-minus',\n\t\t\t'dashicons-dismiss',\n\t\t\t'dashicons-marker',\n\t\t\t'dashicons-star-filled',\n\t\t\t'dashicons-star-half',\n\t\t\t'dashicons-star-empty',\n\t\t\t'dashicons-flag',\n\t\t\t'dashicons-warning',\n\t\t\t'dashicons-location',\n\t\t\t'dashicons-location-alt',\n\t\t\t'dashicons-vault',\n\t\t\t'dashicons-shield',\n\t\t\t'dashicons-shield-alt',\n\t\t\t'dashicons-sos',\n\t\t\t'dashicons-search',\n\t\t\t'dashicons-slides',\n\t\t\t'dashicons-analytics',\n\t\t\t'dashicons-chart-pie',\n\t\t\t'dashicons-chart-bar',\n\t\t\t'dashicons-chart-line',\n\t\t\t'dashicons-chart-area',\n\t\t\t'dashicons-groups',\n\t\t\t'dashicons-businessman',\n\t\t\t'dashicons-id',\n\t\t\t'dashicons-id-alt',\n\t\t\t'dashicons-products',\n\t\t\t'dashicons-awards',\n\t\t\t'dashicons-forms',\n\t\t\t'dashicons-testimonial',\n\t\t\t'dashicons-portfolio',\n\t\t\t'dashicons-book',\n\t\t\t'dashicons-book-alt',\n\t\t\t'dashicons-download',\n\t\t\t'dashicons-upload',\n\t\t\t'dashicons-backup',\n\t\t\t'dashicons-clock',\n\t\t\t'dashicons-lightbulb',\n\t\t\t'dashicons-microphone',\n\t\t\t'dashicons-desktop',\n\t\t\t'dashicons-tablet',\n\t\t\t'dashicons-smartphone',\n\t\t\t'dashicons-phone',\n\t\t\t'dashicons-index-card',\n\t\t\t'dashicons-carrot',\n\t\t\t'dashicons-building',\n\t\t\t'dashicons-store',\n\t\t\t'dashicons-album',\n\t\t\t'dashicons-palmtree',\n\t\t\t'dashicons-tickets-alt',\n\t\t\t'dashicons-money',\n\t\t\t'dashicons-smiley',\n\t\t\t'dashicons-thumbs-up',\n\t\t\t'dashicons-thumbs-down',\n\t\t\t'dashicons-layout',\n\t\t);\n\n\t\treturn apply_filters( 'thim_mega_menu_list_font_dashicons', $list );\n\t}", "protected function registerBackendIcons() {}", "function get_dashicon_code() { return $this->_dashicon_code; }", "public function app_settings_icon() {\r\n\t\treturn '';\r\n\t}", "public function disable_emojis() : void {\n\n \\remove_action( 'wp_head' , 'print_emoji_detection_script' , 7 );\n \\remove_action( 'wp_print_styles' , 'print_emoji_styles' );\n \\remove_action( 'admin_print_scripts' , 'print_emoji_detection_script' );\n \\remove_action( 'admin_print_styles' , 'print_emoji_styles' );\n\n }", "public function all_icons() {\n\n $icons = array(\n 'dash-f333' => 'dashicons-menu',\n 'dash-f319' => 'dashicons-admin-site',\n 'dash-f226' => 'dashicons-dashboard',\n 'dash-f109' => 'dashicons-admin-post',\n 'dash-f104' => 'dashicons-admin-media',\n 'dash-f103' => 'dashicons-admin-links',\n 'dash-f105' => 'dashicons-admin-page',\n 'dash-f101' => 'dashicons-admin-comments',\n 'dash-f100' => 'dashicons-admin-appearance',\n 'dash-f106' => 'dashicons-admin-plugins',\n 'dash-f110' => 'dashicons-admin-users',\n 'dash-f107' => 'dashicons-admin-tools',\n 'dash-f108' => 'dashicons-admin-settings',\n 'dash-f112' => 'dashicons-admin-network',\n 'dash-f102' => 'dashicons-admin-home',\n 'dash-f111' => 'dashicons-admin-generic',\n 'dash-f148' => 'dashicons-admin-collapse',\n 'dash-f536' => 'dashicons-filter',\n 'dash-f540' => 'dashicons-admin-customizer',\n 'dash-f541' => 'dashicons-admin-multisite',\n 'dash-f119' => 'dashicons-welcome-write-blog',\n 'dash-f133' => 'dashicons-welcome-add-page',\n 'dash-f115' => 'dashicons-welcome-view-site',\n 'dash-f116' => 'dashicons-welcome-widgets-menus',\n 'dash-f117' => 'dashicons-welcome-comments',\n 'dash-f118' => 'dashicons-welcome-learn-more',\n 'dash-f123' => 'dashicons-format-aside',\n 'dash-f128' => 'dashicons-format-image',\n 'dash-f161' => 'dashicons-format-gallery',\n 'dash-f126' => 'dashicons-format-video',\n 'dash-f130' => 'dashicons-format-status',\n 'dash-f122' => 'dashicons-format-quote',\n 'dash-f125' => 'dashicons-format-chat',\n 'dash-f127' => 'dashicons-format-audio',\n 'dash-f306' => 'dashicons-camera',\n 'dash-f232' => 'dashicons-images-alt',\n 'dash-f233' => 'dashicons-images-alt2',\n 'dash-f234' => 'dashicons-video-alt',\n 'dash-f235' => 'dashicons-video-alt2',\n 'dash-f236' => 'dashicons-video-alt3',\n 'dash-f501' => 'dashicons-media-archive',\n 'dash-f500' => 'dashicons-media-audio',\n 'dash-f499' => 'dashicons-media-code',\n 'dash-f498' => 'dashicons-media-default',\n 'dash-f497' => 'dashicons-media-document',\n 'dash-f496' => 'dashicons-media-interactive',\n 'dash-f495' => 'dashicons-media-spreadsheet',\n 'dash-f491' => 'dashicons-media-text',\n 'dash-f490' => 'dashicons-media-video',\n 'dash-f492' => 'dashicons-playlist-audio',\n 'dash-f493' => 'dashicons-playlist-video',\n 'dash-f522' => 'dashicons-controls-play',\n 'dash-f523' => 'dashicons-controls-pause',\n 'dash-f519' => 'dashicons-controls-forward',\n 'dash-f517' => 'dashicons-controls-skipforward',\n 'dash-f518' => 'dashicons-controls-back',\n 'dash-f516' => 'dashicons-controls-skipback',\n 'dash-f515' => 'dashicons-controls-repeat',\n 'dash-f521' => 'dashicons-controls-volumeon',\n 'dash-f520' => 'dashicons-controls-volumeoff',\n 'dash-f165' => 'dashicons-image-crop',\n 'dash-f531' => 'dashicons-image-rotate',\n 'dash-f166' => 'dashicons-image-rotate-left',\n 'dash-f167' => 'dashicons-image-rotate-right',\n 'dash-f168' => 'dashicons-image-flip-vertical',\n 'dash-f169' => 'dashicons-image-flip-horizontal',\n 'dash-f533' => 'dashicons-image-filter',\n 'dash-f171' => 'dashicons-undo',\n 'dash-f172' => 'dashicons-redo',\n 'dash-f200' => 'dashicons-editor-bold',\n 'dash-f201' => 'dashicons-editor-italic',\n 'dash-f203' => 'dashicons-editor-ul',\n 'dash-f204' => 'dashicons-editor-ol',\n 'dash-f205' => 'dashicons-editor-quote',\n 'dash-f206' => 'dashicons-editor-alignleft',\n 'dash-f207' => 'dashicons-editor-aligncenter',\n 'dash-f208' => 'dashicons-editor-alignright',\n 'dash-f209' => 'dashicons-editor-insertmore',\n 'dash-f210' => 'dashicons-editor-spellcheck',\n 'dash-f211' => 'dashicons-editor-expand',\n 'dash-f506' => 'dashicons-editor-contract',\n 'dash-f212' => 'dashicons-editor-kitchensink',\n 'dash-f213' => 'dashicons-editor-underline',\n 'dash-f214' => 'dashicons-editor-justify',\n 'dash-f215' => 'dashicons-editor-textcolor',\n 'dash-f216' => 'dashicons-editor-paste-word',\n 'dash-f217' => 'dashicons-editor-paste-text',\n 'dash-f218' => 'dashicons-editor-removeformatting',\n 'dash-f219' => 'dashicons-editor-video',\n 'dash-f220' => 'dashicons-editor-customchar',\n 'dash-f221' => 'dashicons-editor-outdent',\n 'dash-f222' => 'dashicons-editor-indent',\n 'dash-f223' => 'dashicons-editor-help',\n 'dash-f224' => 'dashicons-editor-strikethrough',\n 'dash-f225' => 'dashicons-editor-unlink',\n 'dash-f320' => 'dashicons-editor-rtl',\n 'dash-f474' => 'dashicons-editor-break',\n 'dash-f475' => 'dashicons-editor-code',\n 'dash-f476' => 'dashicons-editor-paragraph',\n 'dash-f535' => 'dashicons-editor-table',\n 'dash-f135' => 'dashicons-align-left',\n 'dash-f136' => 'dashicons-align-right',\n 'dash-f134' => 'dashicons-align-center',\n 'dash-f138' => 'dashicons-align-none',\n 'dash-f160' => 'dashicons-lock',\n 'dash-f528' => 'dashicons-unlock',\n 'dash-f145' => 'dashicons-calendar',\n 'dash-f508' => 'dashicons-calendar-alt',\n 'dash-f177' => 'dashicons-visibility',\n 'dash-f530' => 'dashicons-hidden',\n 'dash-f173' => 'dashicons-post-status',\n 'dash-f464' => 'dashicons-edit',\n 'dash-f182' => 'dashicons-trash',\n 'dash-f537' => 'dashicons-sticky',\n 'dash-f504' => 'dashicons-external',\n 'dash-f142' => 'dashicons-arrow-up',\n 'dash-f140' => 'dashicons-arrow-down',\n 'dash-f139' => 'dashicons-arrow-right',\n 'dash-f141' => 'dashicons-arrow-left',\n 'dash-f342' => 'dashicons-arrow-up-alt',\n 'dash-f346' => 'dashicons-arrow-down-alt',\n 'dash-f344' => 'dashicons-arrow-right-alt',\n 'dash-f340' => 'dashicons-arrow-left-alt',\n 'dash-f343' => 'dashicons-arrow-up-alt2',\n 'dash-f347' => 'dashicons-arrow-down-alt2',\n 'dash-f345' => 'dashicons-arrow-right-alt2',\n 'dash-f341' => 'dashicons-arrow-left-alt2',\n 'dash-f156' => 'dashicons-sort',\n 'dash-f229' => 'dashicons-leftright',\n 'dash-f503' => 'dashicons-randomize',\n 'dash-f163' => 'dashicons-list-view',\n 'dash-f164' => 'dashicons-exerpt-view',\n 'dash-f509' => 'dashicons-grid-view',\n 'dash-f237' => 'dashicons-share',\n 'dash-f240' => 'dashicons-share-alt',\n 'dash-f242' => 'dashicons-share-alt2',\n 'dash-f301' => 'dashicons-twitter',\n 'dash-f303' => 'dashicons-rss',\n 'dash-f465' => 'dashicons-email',\n 'dash-f466' => 'dashicons-email-alt',\n 'dash-f304' => 'dashicons-facebook',\n 'dash-f305' => 'dashicons-facebook-alt',\n 'dash-f462' => 'dashicons-googleplus',\n 'dash-f325' => 'dashicons-networking',\n 'dash-f308' => 'dashicons-hammer',\n 'dash-f309' => 'dashicons-art',\n 'dash-f310' => 'dashicons-migrate',\n 'dash-f311' => 'dashicons-performance',\n 'dash-f483' => 'dashicons-universal-access',\n 'dash-f507' => 'dashicons-universal-access-alt',\n 'dash-f486' => 'dashicons-tickets',\n 'dash-f484' => 'dashicons-nametag',\n 'dash-f481' => 'dashicons-clipboard',\n 'dash-f487' => 'dashicons-heart',\n 'dash-f488' => 'dashicons-megaphone',\n 'dash-f489' => 'dashicons-schedule',\n 'dash-f120' => 'dashicons-wordpress',\n 'dash-f324' => 'dashicons-wordpress-alt',\n 'dash-f157' => 'dashicons-pressthis',\n 'dash-f463' => 'dashicons-update',\n 'dash-f180' => 'dashicons-screenoptions',\n 'dash-f348' => 'dashicons-info',\n 'dash-f174' => 'dashicons-cart',\n 'dash-f175' => 'dashicons-feedback',\n 'dash-f176' => 'dashicons-cloud',\n 'dash-f326' => 'dashicons-translation',\n 'dash-f323' => 'dashicons-tag',\n 'dash-f318' => 'dashicons-category',\n 'dash-f480' => 'dashicons-archive',\n 'dash-f479' => 'dashicons-tagcloud',\n 'dash-f478' => 'dashicons-text',\n 'dash-f147' => 'dashicons-yes',\n 'dash-f158' => 'dashicons-no',\n 'dash-f335' => 'dashicons-no-alt',\n 'dash-f132' => 'dashicons-plus',\n 'dash-f502' => 'dashicons-plus-alt',\n 'dash-f460' => 'dashicons-minus',\n 'dash-f153' => 'dashicons-dismiss',\n 'dash-f159' => 'dashicons-marker',\n 'dash-f155' => 'dashicons-star-filled',\n 'dash-f459' => 'dashicons-star-half',\n 'dash-f154' => 'dashicons-star-empty',\n 'dash-f227' => 'dashicons-flag',\n 'dash-f534' => 'dashicons-warning',\n 'dash-f230' => 'dashicons-location',\n 'dash-f231' => 'dashicons-location-alt',\n 'dash-f178' => 'dashicons-vault',\n 'dash-f332' => 'dashicons-shield',\n 'dash-f334' => 'dashicons-shield-alt',\n 'dash-f468' => 'dashicons-sos',\n 'dash-f179' => 'dashicons-search',\n 'dash-f181' => 'dashicons-slides',\n 'dash-f183' => 'dashicons-analytics',\n 'dash-f184' => 'dashicons-chart-pie',\n 'dash-f185' => 'dashicons-chart-bar',\n 'dash-f238' => 'dashicons-chart-line',\n 'dash-f239' => 'dashicons-chart-area',\n 'dash-f307' => 'dashicons-groups',\n 'dash-f338' => 'dashicons-businessman',\n 'dash-f336' => 'dashicons-id',\n 'dash-f337' => 'dashicons-id-alt',\n 'dash-f312' => 'dashicons-products',\n 'dash-f313' => 'dashicons-awards',\n 'dash-f314' => 'dashicons-forms',\n 'dash-f473' => 'dashicons-testimonial',\n 'dash-f322' => 'dashicons-portfolio',\n 'dash-f330' => 'dashicons-book',\n 'dash-f331' => 'dashicons-book-alt',\n 'dash-f316' => 'dashicons-download',\n 'dash-f317' => 'dashicons-upload',\n 'dash-f321' => 'dashicons-backup',\n 'dash-f469' => 'dashicons-clock',\n 'dash-f339' => 'dashicons-lightbulb',\n 'dash-f482' => 'dashicons-microphone',\n 'dash-f472' => 'dashicons-desktop',\n 'dash-f471' => 'dashicons-tablet',\n 'dash-f470' => 'dashicons-smartphone',\n 'dash-f525' => 'dashicons-phone',\n 'dash-f510' => 'dashicons-index-card',\n 'dash-f511' => 'dashicons-carrot',\n 'dash-f512' => 'dashicons-building',\n 'dash-f513' => 'dashicons-store',\n 'dash-f514' => 'dashicons-album',\n 'dash-f527' => 'dashicons-palmtree',\n 'dash-f524' => 'dashicons-tickets-alt',\n 'dash-f526' => 'dashicons-money',\n 'dash-f328' => 'dashicons-smiley',\n 'dash-f529' => 'dashicons-thumbs-up',\n 'dash-f542' => 'dashicons-thumbs-down',\n 'dash-f538' => 'dashicons-layout'\n );\n\n $icons = apply_filters( \"megamenu_dashicons\", $icons );\n\n ksort( $icons );\n\n return $icons;\n }", "function change_admin_icon($args){\r\n$args['menu_icon'] = 'dashicons-format-aside';\r\nreturn $args;\r\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle the ChilexpressCounty "created" event.
public function created(ChilexpressCounty $chilexpressCounty) { // }
[ "public function created(City $city)\n {\n //\n }", "public function county();", "public function new_affiliates_tile() {\n\t\t$this->register_tile( 'new_affiliates', array(\n\t\t\t'label' => __( 'New Affiliates', 'affiliate-wp' ),\n\t\t\t'type' => 'number',\n\t\t\t'data' => affiliate_wp()->affiliates->count( array(\n\t\t\t\t'date' => $this->date_query\n\t\t\t) ),\n\t\t\t'comparison_data' => $this->get_date_comparison_label(),\n\t\t\t'context' => 'secondary',\n\t\t) );\n\t}", "public function created(Subscribe $subscribe)\n {\n //\n }", "public function handleTravelCreated(TravelCreatedEvent $event) {\n $travel = $event->travel;\n $admin = $travel->user;\n if( null != $admin ) {\n $admin->notify(new TravelStatusNotification($travel, 'created'));\n }\n }", "function created_term( $term_id, $tt_id, $taxonomy ) {\n\t\t$this->process_term( $term_id, $taxonomy );\n\t}", "protected function registerCategoryEvents()\n {\n /**\n * Fires after a new term is created for a specific taxonomy.\n */\n add_action('create_category', function($term_id, $tt_id) {\n do_action('alm_insert_category', $term_id, $tt_id);\n }, 10, 2);\n }", "public function create()\n {\n return view('backend.counties.create');\n }", "function postIncidentCreateHook(array &$hookData) {\r\n // fetch incident by ID\r\n $incidentID = $hookData['data']->ID;\r\n if (!$incident = RNCPHP\\Incident::fetch(intval($incidentID))) {\r\n $this->log->error(\"Unable to get Incident#{$incidentID}\", __METHOD__, array(null, $this->contact));\r\n } else {\r\n $this->log->debug(\"Incident#{$incidentID} has been created in CP\", __METHOD__, array($incident, $this->contact));\r\n }\r\n\r\n // add additinal field to the newly created incident\r\n $this->addAdditionalFieldsToIncident($incident);\r\n\r\n // talk with EBS server\r\n if (!$srID = $incident->CustomFields->Accelerator->ebs_sr_id) {\r\n $this->createSRToLinkWithIncident($incident);\r\n } else {\r\n $this->createNoteAndUpdateSR($srID, $incident);\r\n }\r\n }", "protected function createQuoteTravelCounsellors(){\n $quote = new TravelCounsellorsQuote($this->quote);\n\n if($quote->MakeQuote()){\n $this->quoteResults[] = $quote->parsedData;\n }\n }", "public function created($thread)\n {\n $thread->category->increment('thread_count');\n }", "public function created(CityTransfer $cityTransfer)\n {\n\n }", "public static function course_created(\\core\\event\\course_created $event) {\n year_tables::handle_new_course($event->get_data()['objectid']);\n }", "public function cityByCounty($county)\n {\n $this->viewBuilder()->setLayout(false);\n $this->add_model(array('Cities', 'Counties'));\n $cities = array();\n if ($county != 0) {\n $cities = $this->Cities->find('list')->where(['county_id' => $county])->toArray();\n }\n $this->set(compact('cities'));\n }", "public function handleVoucherCreation(VoucherCreatedEvent $event)\n {\n }", "public function created(Cargo $cargo)\n {\n //\n }", "public function countyByState($state)\n {\n $this->viewBuilder()->setLayout(false);\n $this->add_model(array('States', 'Counties'));\n $counties = array();\n if ($state != 0) {\n $counties = $this->Counties->find('list')->where(['state_id' => $state])->toArray();\n }\n $this->set(compact('counties'));\n }", "protected function _creationComplete()\n {\n parent::_creationComplete();\n }", "function on_create_handler()\n{\n\tglobal $g_obj_course_manager;\n\t\n\t// create a new course\n\t$str_course_name = PageHandler::get_post_value( 'CourseName' );\n\t$str_course_description = PageHandler::get_post_value( 'CourseDescription' );\n\t\n\t// verify the input\n\tif ( !isset( $str_course_name ) || !isset( $str_course_description ) )\n\t{\n\t\tMessageHandler::add_message( MSG_FAIL, 'Please enter the necessary information' );\n\t\treturn;\n\t}\n\t \n\t// process the input\n\tif ( $g_obj_course_manager->add_course( $str_course_name, $str_course_description ) )\n\t{\n\t\tMessageHandler::add_message( MSG_SUCCESS, 'Successfully created Course \"' . $str_course_name . '\"' );\n\t}\n\t\n\telse\n\t{\n\t\tMessageHandler::add_message( MSG_FAIL, 'Failed to create Course \"' . $str_course_name . '\"' );\n\t}\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get var name for sorting direction
public function getDirectionVarName() { if ($this->_handler) { if (Mage::helper('factfinder/search')->useSortings()) { foreach ($this->getRequest()->getParams() as $key => $value) { if (preg_match('/'.self::SORT_PARAM_PATTERN.'/', $key)) { return $key; } } } return 'sort' . $this->getCurrentOrder(); } return parent::getDirectionVarName(); }
[ "public function _get_sort_field() {\r\n return $this->__sort_field_name;\r\n }", "function getSort() {\n $sort = 'name';\n if (isset($this->data['sort'])) {\n switch ($this->data['sort']) {\n case 0:\n case 1:\n $sort = 'title';\n break;\n case 2 :\n case 3 :\n $sort = 'date';\n break;\n case 4 :\n case 5 :\n $sort = 'sort';\n break;\n }\n }\n return $sort;\n }", "public function getOrderVarName()\n {\n return $this->_orderVarName;\n }", "private function getSortColumn()\n {\n $sortColumn = $this->in('Sorted by Title or Published?', ['T', 'P'], 'P');\n return strtolower($sortColumn);\n }", "public function getSortKey() {\n\t\treturn $contentObj->{$this->sortKey};\n\t}", "private function getSortField()\n {\n $sortField = request()->get('sort_by', $this->sortField);\n\n foreach ($this->sortable as $field) {\n if ($field == $sortField) {\n return $field;\n } elseif (Str::contains('.', $field)) {\n if (Str::endsWith($field, \".{$sortField}\")) {\n return $field;\n }\n }\n }\n\n return $this->sortField;\n }", "protected function sortDirection() {\n foreach($this->_columns as $column) {\n $column = (object)$column;\n if(!empty($column->sortDirection)) {\n return $column->sortDirection;\n }\n }\n return 'asc';\n }", "public function getSortParamName()\n {\n return (null !== $this->_sortParamName) ? $this->_sortParamName : static::DEFAULT_PARAM_SORT_NAME;\n }", "public function getSortValue() {}", "public function getSortOrderColumn()\n {\n return defined($this->model.'::SORT_ORDER') ? $this->model::SORT_ORDER : 'sort_order';\n }", "public function getSortColumn(){\n\t\treturn isset($this->_sortAlias) ? $this->_sortAlias : $this->getDataIndex();\n\t}", "public function orderFieldName();", "protected function _getSortOrder() \n {\n $order = $this->_getToolbar()->getCurrentOrder();\n $direction = $this->_getToolbar()->getCurrentDirection();\n\n switch ($order) {\n case \"price\":\n return ($direction == \"desc\") ? \"htl\" : \"lth\";\n case \"name\":\n return ($direction == \"desc\") ? \"namedesc\" : \"nameasc\";\n default:\n // Default to sorting by relevance\n return \"rel\";\n }\n }", "public function getSortIdent()\n {\n if ($this->d3GetSet()->isActive()) {\n return 'd3extsearch';\n } else {\n return parent::getSortIdent();\n }\n }", "public function getSortDirection(): string\n {\n return $this->sort_direction;\n }", "public function getSortOrderColumn()\n {\n return defined($this->model . '::SORT_ORDER') ? $this->model::SORT_ORDER : 'sort_order';\n }", "protected function getLocalizedSortDirection() {\n\t\t$stringId = ($this->sortDirectionParameter == 'ASC' ? 'sort.ascending' : 'sort.descending');\n\t\treturn $GLOBALS['LANG']->getLL($stringId);\n\t}", "function getSortField() {\n \treturn $this->sSortField;\n }", "public function getSortKey()\n {\n return $this->get('sort');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Input parameters: Array $lgModels, Array $getLGModelsKeys Output parameters: String showLGDropDownMenu
function showHTCDropDownMenu($htcModels, $htcModelsID, $getHTCModelsKeys) { $beginMdSelArea = <<<EOF <div class="md-sel-area" EOF; $endMdSelArea = <<<EOF </div> EOF; global $brandName; $_7AC = $getHTCModelsKeys[0]; $DEF = $getHTCModelsKeys[1]; $GH = $getHTCModelsKeys[2]; $ILM = $getHTCModelsKeys[3]; $PR = $getHTCModelsKeys[4]; $S = $getHTCModelsKeys[5]; $_ST = $getHTCModelsKeys[6]; $Touch = $getHTCModelsKeys[7]; $_TW = $getHTCModelsKeys[8]; $brandBanner = <<<EOF <input type="hidden" name="brand-name" value="$brandName" /> EOF; // General models content box $startModelsBox = <<<EOF <div class="models-content-box"> EOF; $endModelsBox = <<<EOF </div> EOF; // ---- 7AC ---- $div7ACHeader = <<<EOF <div style="width: 300px; left: 235px;" class="header-box"> <div style="" class="header-content"><h3><a title="$_7AC" href="#"><span>$_7AC</span></a></h3></div> </div> EOF; $start7ACModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-7ac-model" name="select-7ac-model"> EOF; $end7ACModelSelect = <<<EOF </select> </div> EOF; // ---- DEF ---- $divDEFHeader = <<<EOF <div style="width: 300px; left: 235px; top: 45px;" class="header-box"> <div style="" class="header-content"><h3><a title="$DEF" href="#"><span>$DEF</span></a></h3></div> </div> EOF; $startDEFModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-def-model" name="select-def-model"> EOF; $endDEFModelSelect = <<<EOF </select> </div> EOF; // ---- GH ---- $divGHHeader = <<<EOF <div style="width: 400px; left: 180px; top: 80px;" class="header-box"> <div style="" class="header-content"><h3><a title="$GH" href="#"><span>$GH</span></a></h3></div> </div> EOF; $startGHModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-gh-model" name="select-gh-model"> EOF; $endGHModelSelect = <<<EOF </select> </div> EOF; // ---- ILM ---- $divILMHeader = <<<EOF <div style="width: 300px; left: 235px; top: 115px;" class="header-box"> <div style="" class="header-content"><h3><a title="$ILM" href="#"><span>$ILM</span></a></h3></div> </div> EOF; $startILMModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-ilm-model" name="select-ilm-model"> EOF; $endILMModelSelect = <<<EOF </select> </div> EOF; // ---- PR ---- $divPRHeader = <<<EOF <div style="width: 300px; left: 235px; top: 145px;" class="header-box"> <div style="" class="header-content"><h3><a title="$PR" href="#"><span>$PR</span></a></h3></div> </div> EOF; $startPRModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-pr-model" name="select-pr-model"> EOF; $endPRModelSelect = <<<EOF </select> </div> EOF; // ---- S ---- $divSHeader = <<<EOF <div style="width: 300px; left: 235px; top: 175px;" class="header-box"> <div style="" class="header-content"><h3><a title="$S" href="#"><span>$S</span></a></h3></div> </div> EOF; $startSModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-s-model" name="select-s-model"> EOF; $endSModelSelect = <<<EOF </select> </div> EOF; // ---- _ST ---- $div_STHeader = <<<EOF <div style="width: 500px; left: 135px; top: 205px;" class="header-box"> <div style="" class="header-content"><h3><a title="$_ST" href="#"><span>$_ST</span></a></h3></div> </div> EOF; $start_STModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-st-model" name="select-st-model"> EOF; $end_STModelSelect = <<<EOF </select> </div> EOF; // ---- Touch ---- $divTouchHeader = <<<EOF <div style="width: 300px; left: 235px; top: 235px;" class="header-box"> <div style="" class="header-content"><h3><a title="$Touch" href="#"><span>$Touch</span></a></h3></div> </div> EOF; $startTouchModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-touch-model" name="select-touch-model"> EOF; $endTouchModelSelect = <<<EOF </select> </div> EOF; // ---- _TW ---- $divTWHeader = <<<EOF <div style="width: 400px; left: 180px; top: 265px;" class="header-box"> <div style="" class="header-content"><h3><a title="$_TW" href="#"><span>$_TW</span></a></h3></div> </div> EOF; $startTWModelSelect = <<<EOF <div class="model-select-positioning"><select class="app select-model" id="select-tw-model" name="select-tw-model"> EOF; $endTWModelSelect = <<<EOF </select> </div> EOF; // ---- Display 7AC contents ---- //print $startModelsBox; print $div7ACHeader; print $beginMdSelArea.' style="top: 35px;">'; print $start7ACModelSelect; for ($a=0; $a<sizeof($htcModels["7 | A | C"]); $a++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["7AC"]["category_id"][$a]); print "'>"; print $htcModels["7 | A | C"][$a]; print "</option>"; } print $end7ACModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-7AC-model"); print $endMdSelArea; //print $endModelsBox; //print "<br><br><br>"; // ---- Display DEF contents ---- //print $startModelsBox; print $divDEFHeader; print $beginMdSelArea.' style="top: 65px;">'; print $startDEFModelSelect; for ($b=0; $b<sizeof($htcModels["D | E | F"]); $b++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["DEF"]["category_id"][$b]); print "'>"; print $htcModels["D | E | F"][$b]; print "</option>"; } print $endDEFModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-DEF-model"); print $endMdSelArea; //print $endModelsBox; //print "<br><br><br>"; // ---- Display GH contents ---- //print $startModelsBox; print $divGHHeader; print $beginMdSelArea.' style="top: 100px;">'; print $startGHModelSelect; for ($c=0; $c<sizeof($htcModels["G | HD | Hero"]); $c++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["GH"]["category_id"][$c]); print "'>"; print $htcModels["G | HD | Hero"][$c]; print "</option>"; } print $endGHModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-GH-model"); print $endMdSelArea; //print $endModelsBox; //print "<br><br><br>"; // ---- Display ILM contents ---- //print $startModelsBox; print $divILMHeader; print $beginMdSelArea.' style="top: 130px;">'; print $startILMModelSelect; for ($d=0; $d<sizeof($htcModels["I | L | M"]); $d++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["ILM"]["category_id"][$d]); print "'>"; print $htcModels["I | L | M"][$d]; print "</option>"; } print $endILMModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-ILM-model"); print $endMdSelArea; //print $endModelsBox; //print "<br><br><br>"; // ---- Display PR contents ---- //print $startModelsBox; print $divPRHeader; print $beginMdSelArea.'style="top: 160px;">'; print $startPRModelSelect; for ($e=0; $e<sizeof($htcModels["P | R"]); $e++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["PR"]["category_id"][$e]); print "'>"; print $htcModels["P | R"][$e]; print "</option>"; } print $endPRModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-PR-model"); print $endMdSelArea; //print $endModelsBox; //print "<br><br><br>"; // ---- Display S contents ---- //print $startModelsBox; print $divSHeader; print $beginMdSelArea." style='top: 190px;'>"; print $startSModelSelect; for ($f=0; $f<sizeof($htcModels["S"]); $f++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["S"]["category_id"][$f]); print "'>"; print $htcModels["S"][$f]; print "</option>"; } print $endSModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-S-model"); print $endMdSelArea; //print $endModelsBox; //print "<br><br><br>"; // ---- Display _ST contents ---- //print $startModelsBox; print $div_STHeader; print $beginMdSelArea."style='top: 220px;'>"; print $start_STModelSelect; for ($g=0; $g<sizeof($htcModels["Sa | Se | Sh | Sn | Ta | Ti"]); $g++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["ST"]["category_id"][$g]); print "'>"; print $htcModels["Sa | Se | Sh | Sn | Ta | Ti"][$g]; print "</option>"; } print $end_STModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-ST-model"); print $endMdSelArea; //print $endModelsBox; //print "<br><br><br>"; // ---- Display Touch contents ---- //print $startModelsBox; print $divTouchHeader; print $beginMdSelArea."style='top: 250px;'>"; print $startTouchModelSelect; for ($h=0; $h<sizeof($htcModels["Touch"]); $h++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["Touch"]["category_id"][$h]); print "'>"; print $htcModels["Touch"][$h]; print "</option>"; } print $endTouchModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-Touch-model"); print $endMdSelArea; //print $endModelsBox; //print "<br><br><br>"; // ---- Display _TW contents ---- //print $startModelsBox; print $divTWHeader; print $beginMdSelArea." style='top: 280px;'>"; print $startTWModelSelect; for ($i=0; $i<sizeof($htcModels["TyTN | Wildfire"]); $i++) { print "<option class='models-option-style' value='"; print base64_encode($htcModelsID["TW"]["category_id"][$i]); print "'>"; print $htcModels["TyTN | Wildfire"][$i]; print "</option>"; } print $endTWModelSelect; print submitButton($faceText="find&raquo;", $style="" ,$pos="relative", $submit="submit-TW-model"); print $endMdSelArea; //print $endModelsBox; print $brandBanner; }
[ "function lgModelsDropDownMenu($brandName, $modelsDB)\n{\n $lgModels = array (\n \"B | C\" => \"\",\n \"F | G\" => \"\",\n \"GB | GD | GS\" => \"\",\n \"GT | GU | GW\" => \"\",\n \"KC | KE | KF\" => \"\",\n \"KG | KM | KP\" => \"\",\n \"KS | KU\" => \"\",\n \"L | M\" => \"\",\n \"P | S\" => \"\",\n \"T | U\" => \"\",\n );\n\n $lgModelsDB = array ();\n\n $getModelsDB = $modelsDB;\n $getLGModelsKeys = array_keys($lgModels);\n\n for ($counter=0; $counter<sizeof($getModelsDB[\"models_db_model_name\"]); $counter++) {\n // REGEX pattern: \"^[BbCc]\", \"(^F)|(^G[^BbDdSsTtUuWw])\", \"^G([Bb]|[Dd]|[Ss])\", \"^G([Tt]|[Uu]|[Ww])\"\n // REGEX pattern (contd): \"^K([Cc]|[Ee]|[Ff])\", \"^K([Gg]|[Mm]|[Pp])\", \"^K([Ss]|[Uu])\", \"(^[LlMm])\", \"(^[PpSs])\", \"^[Uu]\"\n \n if ((ereg(\"^[BbCc]\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter])) && (ereg(\"[BbCc]\", $getLGModelsKeys[0]))) {\n \tstatic $a=0;\n\n \tif ($getModelsDB[\"models_db_model_name\"][$counter] == \"Chocolate\") {\n \t\t$lgModels[\"B | C\"][$a] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].\"&nbsp;\".$getModelsDB[\"models_db_category\"][$counter];\n \t $lgModelsID[\"BC\"][\"category_id\"][$a] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t} else {\n \t\t$lgModels[\"B | C\"][$a] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t $lgModelsID[\"BC\"][\"category_id\"][$a] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t}\n\n \t$a+=1;\n } else if ((ereg(\"(^F)|(^[Gg][^BbSsDdTtUuWw])\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter])) &&\t(ereg(\"[FG]\", $getLGModelsKeys[1]))) {\n \tstatic $b=0;\n \t$lgModels[\"F | G\"][$b] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t$lgModelsID[\"FG\"][\"category_id\"][$b] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t$b=$b+1;\n } else if ((ereg(\"[GgBbDdSs]\", $getLGModelsKeys[2])) && (ereg(\"^G([Bb]|[Dd]|[Ss])\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter]))) {\n \tstatic $c=0;\n \t$lgModels[\"GB | GD | GS\"][$c] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t$lgModelsID[\"GBDS\"][\"category_id\"][$c] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t$c++;\n } else if ((ereg(\"[GgTtUuWw]\", $getLGModelsKeys[3])) &&\t(ereg(\"^G([Tt]|[Uu]|[Ww])\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter]))) {\n \tstatic $d=0;\n \t$lgModels[\"GT | GU | GW\"][$d] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t$lgModelsID[\"GTUW\"][\"category_id\"][$d] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t$d+=1;\n } else if ((ereg(\"[KkcCeEfF]\", $getLGModelsKeys[4])) && (ereg(\"^K([Cc]|[Ee]|[Ff])\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter]))) {\n \tstatic $e=0;\n \t$lgModels[\"KC | KE | KF\"][$e] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t$lgModelsID[\"KCEF\"][\"category_id\"][$e] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t$e=$e+1;\n } else if ((ereg(\"[KkGgMmPp]\", $getLGModelsKeys[5])) &&\t(ereg(\"^K([Gg]|[Mm]|[Pp])\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter]))) {\n \tstatic $f=0;\n \t$lgModels[\"KG | KM | KP\"][$f] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t$lgModelsID[\"KGMP\"][\"category_id\"][$f] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t$f=$f+1;\n } else if ((ereg(\"[KkSsUu]\", $getLGModelsKeys[6])) && (ereg(\"^K([Ss]|[Uu])\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter]))) {\n \tstatic $g=0;\n \t$lgModels[\"KS | KU\"][$g] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t$lgModelsID[\"KSU\"][\"category_id\"][$g] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t$g++;\n } else if ((ereg(\"[LlMm]\", $getLGModelsKeys[7])) && (ereg(\"^[LlMm]\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter]))) {\n \tstatic $h=0;\n \t$lgModels[\"L | M\"][$h] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t$lgModelsID[\"LM\"][\"category_id\"][$h] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t$h+=1;\n } else if ((ereg(\"[PpSs]\", $getLGModelsKeys[8])) && (ereg(\"^[PpSs]\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter]))) {\n \tstatic $i=0;\n\n \tswitch ($getModelsDB[\"models_db_model_name\"][$counter]) {\n \t case \"Prada\":\n \t $lgModels[\"P | S\"][$i] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].\"&nbsp;\".$getModelsDB[\"models_db_category\"][$counter];\n \t $lgModelsID[\"PS\"][\"category_id\"][$i] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t break;\n \t case \"Shine\":\n \t $lgModels[\"P | S\"][$i] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].\"&nbsp;\".$getModelsDB[\"models_db_category\"][$counter];\n \t $lgModelsID[\"PS\"][\"category_id\"][$i] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t break;\n \t case \"Secret\":\n \t $lgModels[\"P | S\"][$i] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].\"&nbsp;\".$getModelsDB[\"models_db_category\"][$counter];\n \t $lgModelsID[\"PS\"][\"category_id\"][$i] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t break; \n \t default:\n \t $lgModels[\"P | S\"][$i] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t $lgModelsID[\"PS\"][\"category_id\"][$i] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t}\n\n \t$i++;\n } else if ((ereg(\"[UuTt]\", $getLGModelsKeys[9])) && (ereg(\"^[TtUu]\", $getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter]))) {\n \tstatic $j=0;\n \t$lgModels[\"T | U\"][$j] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].$getModelsDB[\"models_db_category\"][$counter];\n \t$lgModelsID[\"TU\"][\"category_id\"][$j] = $getModelsDB[\"models_db_category_id\"][$counter];\n \t$j+=1;\n }\n }\n\nfunction showLGDropDownMenu($lgModels, $lgModelsID, $getLGModelsKeys)\n{\n \n /*\n\t\tInput parameters:\n\t\tArray $lgModels,\n\t\tArray $getLGModelsKeys\n\n\t\tOutput parameters:\n\t\tString showLGDropDownMenu\n\t*/\n\t\n\tglobal $brandName;\n\n$beginMdSelArea = <<<EOF\n <div class=\"md-sel-area\"\nEOF;\n\n $endMdSelArea = <<<EOF\n </div>\nEOF;\n\t\n\t$BC = $getLGModelsKeys[0];\n\t$FG = $getLGModelsKeys[1];\n\t$GB_GD_GS = $getLGModelsKeys[2];\n\t$GT_GU_GW = $getLGModelsKeys[3];\n\t$KC_KE_KF = $getLGModelsKeys[4];\n\t$KG_KM_KP = $getLGModelsKeys[5];\n\t$KS_KU = $getLGModelsKeys[6];\n\t$LM = $getLGModelsKeys[7];\n\t$PS = $getLGModelsKeys[8];\n\t$TU = $getLGModelsKeys[9];\n\t\n\t$brandBanner = <<<EOF\n<input type=\"hidden\" name=\"brand-name\" value=\"$brandName\" />\nEOF;\n\t\n\t// General models content box\n\t\t$startModelsBox = <<<EOF\n\t<div class=\"models-content-box\">\nEOF;\n\t\t$endModelsBox = <<<EOF\n\t</div>\nEOF;\n\n // ---- BC ----\n\t$divBCHeader = <<<EOF\n\t<div style=\"\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$BC\"><span>$BC</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startBCModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-bc-model\" name=\"select-bc-model\">\nEOF;\n\n\t$endBCModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n // ---- FG ----\n\t$divFGHeader = <<<EOF\n\t<div style=\"top: 40px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$FG\"><span>$FG</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startFGModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-fg-model\" name=\"select-fg-model\">\nEOF;\n\n\t$endFGModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n // ---- GB | GD | GS ----\n\t$divGB_GD_GSHeader = <<<EOF\n\t<div style=\"width: 400px; left: 180px; top: 60px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$GB_GD_GS\"><span>$GB_GD_GS</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startGB_GD_GSModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-GB_GD_GS-model\" name=\"select-gbds-model\">\nEOF;\n\n\t$endGB_GD_GSModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n // ---- GT | GU | GW ----\n\t$divGT_GU_GWHeader = <<<EOF\n\t<div style=\"width: 400px; left: 180px; top: 80px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$GT_GU_GW\"><span>$GT_GU_GW</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startGT_GU_GWModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-GT_GU_GW-model\" name=\"select-gtuw-model\">\nEOF;\n\n\t$endGT_GU_GWModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n // ---- KC_KE_KF ----\n\t$divKC_KE_KFHeader = <<<EOF\n\t<div style=\"width: 400px; left: 180px; top: 100px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$KC_KE_KF\"><span>$KC_KE_KF</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startKC_KE_KFModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-KC_KE_KF-model\" name=\"select-kcef-model\">\nEOF;\n\n\t$endKC_KE_KFModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n // ---- KG_KM_KP ----\n\t$divKG_KM_KPHeader = <<<EOF\n\t<div style=\"width: 400px; left: 180px; top: 120px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$KG_KM_KP\"><span>$KG_KM_KP</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startKG_KM_KPModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-KG_KM_KP-model\" name=\"select-kgmp-model\">\nEOF;\n\n\t$endKG_KM_KPModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n // ---- KS_KU ----\n\t$divKS_KUHeader = <<<EOF\n\t<div style=\" top: 140px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$KS_KU\"><span>$KS_KU</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startKS_KUModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-KS_KU-model\" name=\"select-ksu-model\">\nEOF;\n\n\t$endKS_KUModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- LM ----\n\t$divLMHeader = <<<EOF\n\t<div style=\" top: 160px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$LM\"><span>$LM</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startLMModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-LM-model\" name=\"select-lm-model\">\nEOF;\n\n\t$endLMModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- PS ----\n\t$divPSHeader = <<<EOF\n\t<div style=\" top: 180px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$PS\"><span>$PS</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startPSModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-PS-model\" name=\"select-ps-model\">\nEOF;\n\n\t$endPSModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- TU ----\n\t$divTUHeader = <<<EOF\n\t<div style=\" top: 200px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$TU\"><span>$TU</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startTUModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-TU-model\" name=\"select-tu-model\">\nEOF;\n\n\t$endTUModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- Display BC contents ----\n\t//print $startModelsBox;\n\tprint $divBCHeader;\n\tprint $beginMdSelArea.' style=\"\">';\n\tprint $startBCModelSelect;\n\tfor ($a=0; $a<sizeof($lgModels[\"B | C\"]); $a++)\t{\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"BC\"][\"category_id\"][$a]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"B | C\"][$a];\n\t\tprint \"</option>\";\n\t}\n\tprint $endBCModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-BC-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display FG contents ----\n\t//print $startModelsBox;\n\tprint $divFGHeader;\n\tprint $beginMdSelArea.' style=\"top: 50px;\">';\n\tprint $startFGModelSelect;\n\tfor ($b=0; $b<sizeof($lgModels[\"F | G\"]); $b++)\t{\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"FG\"][\"category_id\"][$b]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"F | G\"][$b];\n\t\tprint \"</option>\";\n\t}\n\tprint $endFGModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-FG-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display GB | GD | GS contents ----\n\t//print $startModelsBox;\n\tprint $divGB_GD_GSHeader;\n\tprint $beginMdSelArea.' style=\" top: 70px;\">';\n\tprint $startGB_GD_GSModelSelect;\n\tfor ($c=0; $c<sizeof($lgModels[\"GB | GD | GS\"]); $c++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"GBDS\"][\"category_id\"][$c]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"GB | GD | GS\"][$c];\n\t\tprint \"</option>\";\n\t}\n\tprint $endGB_GD_GSModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-GBDS-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display GT | GU | GW contents ----\n\t//print $startModelsBox;\n\tprint $divGT_GU_GWHeader;\n\tprint $beginMdSelArea.' style=\" top: 90px;\">';\n\tprint $startGT_GU_GWModelSelect;\n\tfor ($d=0; $d<sizeof($lgModels[\"GT | GU | GW\"]); $d++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"GTUW\"][\"category_id\"][$d]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"GT | GU | GW\"][$d];\n\t\tprint \"</option>\";\n\t}\n\tprint $endGT_GU_GWModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-GTUW-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display KC | KE | KF contents ----\n\t//print $startModelsBox;\n\tprint $divKC_KE_KFHeader;\n\tprint $beginMdSelArea.' style=\" top: 110px;\">';\n\tprint $startKC_KE_KFModelSelect;\n\tfor ($e=0; $e<sizeof($lgModels[\"KC | KE | KF\"]); $e++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"KCEF\"][\"category_id\"][$e]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"KC | KE | KF\"][$e];\n\t\tprint \"</option>\";\n\t}\n\tprint $endKC_KE_KFModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-KCEF-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display KG | KM | KP contents ----\n\t//print $startModelsBox;\n\tprint $divKG_KM_KPHeader;\n\tprint $beginMdSelArea.' style=\" top: 130px;\">';\n\tprint $startKG_KM_KPModelSelect;\n\tfor ($f=0; $f<sizeof($lgModels[\"KG | KM | KP\"]); $f++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"KGMP\"][\"category_id\"][$f]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"KG | KM | KP\"][$f];\n\t\tprint \"</option>\";\n\t}\n\tprint $endKG_KM_KPModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-KGMP-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display KS | KU contents ----\n\t//print $startModelsBox;\n\tprint $divKS_KUHeader;\n\tprint $beginMdSelArea.' style=\" top: 150px;\">';\n\tprint $startKS_KUModelSelect;\n\tfor ($g=0; $g<sizeof($lgModels[\"KS | KU\"]); $g++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"KSU\"][\"category_id\"][$g]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"KS | KU\"][$g];\n\t\tprint \"</option>\";\n\t}\n\tprint $endKS_KUModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-KSU-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display L | M contents ----\n\t//print $startModelsBox;\n\tprint $divLMHeader;\n\tprint $beginMdSelArea.' style=\" top: 170px;\">';\n\tprint $startLMModelSelect;\n\tfor ($h=0; $h<sizeof($lgModels[\"L | M\"]); $h++)\t{\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"LM\"][\"category_id\"][$h]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"L | M\"][$h];\n\t\tprint \"</option>\";\n\t}\n\tprint $endLMModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-LM-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display P | S contents ----\n\t//print $startModelsBox;\n\tprint $divPSHeader;\n\tprint $beginMdSelArea.' style=\" top: 190px;\">';\n\tprint $startPSModelSelect;\n\tfor ($i=0; $i<sizeof($lgModels[\"P | S\"]); $i++)\t{\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"PS\"][\"category_id\"][$i]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"P | S\"][$i];\n\t\tprint \"</option>\";\n\t}\n\tprint $endPSModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-PS-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display T | U contents ----\n\t//print $startModelsBox;\n\tprint $divTUHeader;\n\tprint $beginMdSelArea.' style=\" top: 210px;\">';\n\tprint $startTUModelSelect;\n\tfor ($j=0; $j<sizeof($lgModels[\"T | U\"]); $j++)\t{\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($lgModelsID[\"TU\"][\"category_id\"][$j]);\n\t\tprint \"'>\";\n\t\tprint $lgModels[\"T | U\"][$j];\n\t\tprint \"</option>\";\n\t}\n\tprint $endTUModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-TU-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\tprint $brandBanner;\t\t\t\n}\n\n return array ($lgModels, $lgModelsID, $getLGModelsKeys);\n}", "function showDoroDropDownMenu($doroModels, $doroModelsID, $getDoroModelsKeys) {\n\n$beginMdSelArea = <<<EOF\n <div class=\"md-sel-area\"\nEOF;\n\n $endMdSelArea = <<<EOF\n </div>\nEOF;\n\n\tglobal $brandName;\n\t\n\t$handleEasy = $getDoroModelsKeys[0];\n\t$handlePlus = $getDoroModelsKeys[1];\n\t$phoneEasy = $getDoroModelsKeys[2];\n\n\t$brandBanner = <<<EOF\n<input type=\"hidden\" name=\"brand-name\" value=\"$brandName\" />\nEOF;\n\t\n\t// General models content box\n\t$startModelsBox = <<<EOF\n\t<div class=\"models-content-box\">\nEOF;\n\n\t$endModelsBox = <<<EOF\n\t</div>\nEOF;\n\n\t// ---- HandleEasy ----\n\t$divHandleEasyHeader = <<<EOF\n\t<div style=\"width: 300px; top: 30px; left: 235px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$handleEasy\"><span>$handleEasy</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startHandleEasyModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-handleEasy-model\" name=\"select-handleEasy-model\">\nEOF;\n\n\t$endHandleEasyModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n\t// ---- HandlePlus ----\n\t$divHandlePlusHeader = <<<EOF\n<div style=\"width: 300px; top: 90px; left: 235px;\" class=\"header-box\">\n<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$handlePlus\"><span>$handlePlus</span></a></h3></div>\n</div>\nEOF;\n\n\t$startHandlePlusModelSelect = <<<EOF\n<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-handlePlus-model\" name=\"select-handlePlus-model\">\nEOF;\n\n\t$endHandlePlusModelSelect = <<<EOF\n</select>\n</div>\nEOF;\n\n\t// ---- PhoneEasy ----\n\t$divPhoneEasyHeader = <<<EOF\n<div style=\"width: 300px; top: 150px; left: 235px;\" class=\"header-box\">\n<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$phoneEasy\"><span>$phoneEasy</span></a></h3></div>\n</div>\nEOF;\n\n\t$startPhoneEasyModelSelect = <<<EOF\n<div class=\"model-select-positioning\">\n<select class=\"app select-model\" id=\"select-phoneEasy-model\" name=\"select-phoneEasy-model\">\nEOF;\n\n\t$endPhoneEasyModelSelect = <<<EOF\n</select>\n</div>\nEOF;\n\n\t// ---- Display HandleEasy contents ----\n\t//print $startModelsBox;\n\tprint $divHandleEasyHeader;\n\tprint $beginMdSelArea.\" style='top: 60px;'>\";\n\tprint $startHandleEasyModelSelect;\n\tfor ($i=0; $i<sizeof($doroModels[\"HandleEasy\"]); $i++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($doroModelsID[\"handleEasyID\"][\"category_id\"][$i]);\n\t\tprint \"'>\";\n\t\tprint $doroModels[\"HandleEasy\"][$i];\n\t\tprint \"</option>\";\n\t}\n\tprint $endHandleEasyModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-HandleEasy\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t// ---- Display HandlePlus contents ----\n\t//echo $startModelsBox;\n\techo $divHandlePlusHeader;\n\tprint $beginMdSelArea.\" style='top: 120px;'>\";\n\techo $startHandlePlusModelSelect;\n\tfor ($m=0; $m<sizeof($doroModels[\"HandlePlus\"]); $m++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($doroModelsID[\"handlePlusID\"][\"category_id\"][$m]);\n\t\tprint \"'>\";\n\t\tprint $doroModels[\"HandlePlus\"][$m];\n\t\tprint \"</option>\";\n\t}\n\techo $endHandlePlusModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-HandlePlus\");\n\tprint $endMdSelArea;\n\t//echo $endModelsBox;\n\n\t// ---- Display PhoneEasy contents ----\n\t//echo $startModelsBox;\n\techo $divPhoneEasyHeader;\n\tprint $beginMdSelArea.\" style='top: 180px;'>\";\n\techo $startPhoneEasyModelSelect;\n\tfor ($n=0; $n<sizeof($doroModels[\"PhoneEasy\"]); $n++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($doroModelsID[\"phoneEasyID\"][\"category_id\"][$n]);\n\t\tprint \"'>\";\n\t\tprint $doroModels[\"PhoneEasy\"][$n];\n\t\tprint \"</option>\";\n\t}\n\techo $endPhoneEasyModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-PhoneEasy\");\n\tprint $endMdSelArea;\n\t//echo $endModelsBox;\n\t\n\tprint $brandBanner;\n}", "function appleModelsDropDownMenu($brandName, $modelsDB) {\n\t/*\n\t\tAlgorithm for ModelsDropDownMenu\n\t\t1. Create an associative array that uses names of models as keys/index\n\t\t2. Use either ereg(String pattern, ) or preg_match to match contents of $modelsDB array received from modelsDropDownMenu\n\t\t3. Compare indices/keys of models_db_model_name and modelsDBmodelCategory\n\t\t4. Create an array and assign the matched values to it\n\t*/\n\t\n\t$appleModels = array (\n\t\t\"iPad\" => \"\",\n\t\t\"iPhone\" => \"\",\n\t);\n\t\n\t$appleModelsID = array ();\n\t\n\t$getModelsDB = $modelsDB;\n\n\t$getAppleModelsKeys = array_keys($appleModels);\n\n\tfor ($counter=0; $counter<sizeof($getModelsDB[\"models_db_model_name\"]); $counter++) {\n\t\t// REGEX pattern: \"i[pP]ad\" and \"i[pP]hone\"\n\t\tif ((ereg(\"(i[Pp]ad)\", $getAppleModelsKeys[0])) && ($getAppleModelsKeys[0] == $getModelsDB[\"models_db_model_name\"][$counter])) {\n\t\t\tstatic $i=0;\n\t\t\t\n\t\t\t$appleModels[\"iPad\"][$i] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].\"&nbsp;\".$getModelsDB[\"models_db_category\"][$counter].\"&nbsp;\".$getModelsDB[\"models_db_add_info\"][$counter];\n\t\t\t$appleModelsID[\"iPadID\"][\"category_id\"][$i] = $getModelsDB[\"models_db_category_id\"][$counter]; \n\t\t\t\n\t\t\t$i++;\n\t\t} else if ((ereg(\"(i[Pp]hone)\", $getAppleModelsKeys[1])) && ($getAppleModelsKeys[1] == $getModelsDB[\"models_db_model_name\"][$counter])) {\n\t\t\tstatic $m=0;\n\t\t\t\n\t\t\t$appleModels[\"iPhone\"][$m] = $brandName.\"&nbsp;\".$getModelsDB[\"models_db_model_name\"][$counter].\"&nbsp;\".$getModelsDB[\"models_db_category\"][$counter].\"&nbsp;\".$getModelsDB[\"models_db_add_info\"][$counter];\n\t\t\t$appleModelsID[\"iPhoneID\"][\"category_id\"][$m] = $getModelsDB[\"models_db_category_id\"][$counter];\n\t\t\t\n\t\t\t$m++;\n\t\t}\n\t}\n\nfunction showAppleDropDownMenu($appleModels, $appleModelsID, $getAppleModelsKeys) {\n\n\t/*\n\t\tInput parameters:\n\t\tArray $appleModels,\n\t\tArray $getAppleModelsKeys\n\n\t\tOutput parameters:\n\t\tString showAppleDropDownMenu\n\t*/\n\n\t\tglobal $brandName;\n\t\t\n\t\t$iPad = $getAppleModelsKeys[0];\n\t\t$iPhone = $getAppleModelsKeys[1];\n\t\t\n\t\t// Get model and category id from appleDropDownMenu function\n\n \n $beginMdSelArea = <<<EOF\n <div class=\"md-sel-area\"\nEOF;\n\n $endMdSelArea = <<<EOF\n </div>\nEOF;\n\n\t\t// General models content box\n\t\t$startModelsBox = <<<EOF\n\t<div class=\"models-content-box\">\nEOF;\n\t\t$endModelsBox = <<<EOF\n\t</div>\nEOF;\n\n\t// ---- iPad ----\n\t$diviPadHeader = <<<EOF\n\t<div class=\"header-box\">\n\t\t<div class=\"header-content\"><h3><a href=\"#\" title=\"$iPad\"><span>$iPad</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startiPadModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-ipad-model\" name=\"select-ipad-model\">\nEOF;\n\n\t$endiPadModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n\t// ---- iPhone ----\n\t$diviPhoneHeader = <<<EOF\n\t<div style=\"top: 100px;\" class=\"header-box\">\n\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$iPhone\"><span>$iPhone</span></a></h3></div>\n</div>\nEOF;\n\n\t$startiPhoneModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-iphone-model\" name=\"select-iphone-model\">\nEOF;\n\n\t$endiPhoneModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n $brandBanner = <<<EOF\n<input type=\"hidden\" name=\"brand-name\" value=\"$brandName\" />\nEOF;\n\n \n\t// ---- Display iPad contents ----\n\t//print $startModelsBox;\n\tprint $diviPadHeader;\n\tprint $beginMdSelArea.\" style='top: 50px;'>\";\n\tprint $startiPadModelSelect;\n\tfor ($i=0; $i<sizeof($appleModels[\"iPad\"]); $i++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($appleModelsID[\"iPadID\"][\"category_id\"][$i]);\n\t\tprint \"'>\";\n\t\tprint $appleModels[\"iPad\"][$i];\n\t\tprint \"</option>\";\n\t}\n\tprint $endiPadModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-ipad\");\n\tprint $endMdSelArea;\n\t\n\t// ---- Display iPhone contents ----\n\t\n\techo $diviPhoneHeader;\n\tprint $beginMdSelArea.\"style='top: 130px;'>\";\n\tprint $startiPhoneModelSelect;\n\tfor ($m=0; $m<sizeof($appleModels[\"iPhone\"]); $m++)\t{\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($appleModelsID[\"iPhoneID\"][\"category_id\"][$m]);\n\t\tprint \"'>\";\n\t\tprint $appleModels[\"iPhone\"][$m];\n\t\tprint \"</option>\";\n\t}\n\tprint $endiPhoneModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-iphone\");\n\tprint $endMdSelArea;\n\t\t\n\tprint $brandBanner;\n}\n\n\treturn array ($appleModels, $appleModelsID, $getAppleModelsKeys);\n}", "function otherModelsDropDownMenu($brandName, $modelsDBarray) {\n include_once (\"/home/fod/www/projects/isar/sar/direct/globalvars.php\");\n \n global $submit;\n \n$beginMdSelArea = <<<EOF\n <div class=\"md-sel-area\"\nEOF;\n\n $endMdSelArea = <<<EOF\n </div>\nEOF;\n\n $getModelsArray = $modelsDBarray;\n\n $modelName = $getModelsArray[\"models_db_model_name\"];\n\t$modelCategory = $getModelsArray[\"models_db_category\"];\n\t$category_id = $getModelsArray[\"models_db_category_id\"];\n \n // General models content box\n\t\t$startModelsBox = <<<EOF\n\t<div style=\"height: 700px;\" class=\"models-content-box\">\nEOF;\n\t\t$endModelsBox = <<<EOF\n\t</div>\nEOF;\n \n // ---- Other Models ----\n\t$divHeaderBox = <<<EOF\n\t<div style=\"height: 100px; width: 350px; left: 215px; top: 50px;\" class=\"header-box\">\n\t\t<div style=\"text-align: center; font-size: 60px; line-height: 100px; color: #ffffff;\" class=\"header-content\">$brandName\n\t\t<input type=\"hidden\" name=\"brand-name\" value=\"$brandName\" />\n\t\t</div>\n\t</div>\nEOF;\n \n\t$startModelsSelect = <<<EOF\n\t<div style=\"top: 280px; position: absolute;\" class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-other-model\" name=\"select-other-model\">\nEOF;\n $endModelsSelect = <<<EOF\n </select></div>\nEOF;\n\n //print $startModelsBox;\n print $divHeaderBox;\n print $beginMdSelArea.\" style='top: 100px; padding-top: 400px;'>\";\n print $startModelsSelect;\n\n for ($counter=0; $counter<sizeof($modelName); $counter++) {\n print \"<option class='models-option-style' value='\";\n print base64_encode($category_id[$counter]);\n print \"'>\";\n print $brandName.\"&nbsp;\".$modelName[$counter].\"&nbsp;\".$modelCategory[$counter];\n print \"</option>\";\n }\n\n print $endModelsSelect;\n print \"<div style='position: absolute; top: 300px;'>\";\n print submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submitButton=\"submit-other-model\");\n print \"</div>\";\n print $endMdSelArea; \n //print $endModelsBox;\n \n return;\n}", "function display_new_dropdown()\n {\n if ($_REQUEST['auto_save']) {\n $this->display_dropdowns();\n } else {\n $this->menu_loader->display_page($this->new_dropdown_form());\n }\n }", "protected function module_list_menus(){\n\t\t//get all menus\n\t\t$this->menus = db\\orm::find('menus');\n\t\treturn $this->view_list_menus($this->menus);\n\t}", "function CG_select_setup()\n{\n $personID = $_SESSION['id'];\n $query = \"SELECT model.modelID, description, lastUpdated \" .\n \"FROM modelPerson, model \" .\n \"WHERE personID = $personID \" .\n \"AND modelPerson.modelID = model.modelID \" .\n \"AND description LIKE '%CustomGrid%' \" .\n \"ORDER BY lastUpdated DESC \";\n $result = mysql_query( $query )\n or die( \"Query failed : $query<br />\\n\" . mysql_error() );\n\n if ( mysql_num_rows( $result ) == 0 )\n {\n echo <<<HTML\n <fieldset class='option_value'>\n <legend>Custom Grid Model</legend>\n <p>There are no custom grid models available</p>\n </fieldset>\nHTML;\n\n return;\n }\n\n $models = '';\n while ( list( $modelID, $description, $lastUpdated ) = mysql_fetch_array( $result ) )\n {\n $descr = explode( \".\", $description );\n array_pop( $descr ); // pop off the .model part\n $description = implode( \".\", $descr );\n $models .= \" <option value='$modelID'>$lastUpdated $description</option>\\n\";\n }\n \necho<<<HTML\n <fieldset class='option_value'>\n <legend>Custom Grid Model</legend>\n <select name=\"CG_modelID\">\n $models\n </select>\n </fieldset>\nHTML;\n}", "function menuConfig()\t{\n\t\tglobal $LANG, $MCONF;\n\t\t$this->MOD_MENU = Array ('function' => Array ());\n\t\t\n\t\tforeach ($MCONF['menuItems'] as $action => $name) {\n\t\t\t$this->MOD_MENU['function'][$action] = $LANG->getLL($name);\n\t\t}\n\t\t\n\t\tparent::menuConfig();\n\t}", "protected function generateMenu() {}", "function menuConfig() {\r\n\t\t$this->MOD_MENU = array();\r\n\t\t$this->MOD_MENU['function'] = array();\r\n\t\tforeach ($this->items as $key => $row) {\r\n\t\t\t$this->MOD_MENU['function'] [] = $row['title'];\r\n\t\t}\r\n\t\tparent::menuConfig();\r\n\t}", "function menu_list($arr,$selected,$addkeys)\n{\n $key=0;\n if ($selected==null) $selected='';\n\n if (is_array($selected)) $ARRAYKEY=1;\n else $ARRAYKEY=0;\n\n if ($addkeys==null) $OPT=0;\n else $OPT=1;\n\n if($key>0) { $tmpstr=\"<option value=\\\" \\\">UNKNOWN</option>\"; }\n else { $tmpstr=''; }\n\n $selstr='';\n if(isset($arr))\n {\n $ret=sizeof($arr);\n if ($ret>0) {\n $menu=''.$tmpstr;\n $i=0; while ($i<$ret) {\n if($ARRAYKEY==0) {\n if($selected!='') { if($addkeys[$i]==$selected) {\n $selstr=\"selected\";\n }\n else {\n $selstr='';\n }\n }\n }\n else {\n\n if(in_array($addkeys[$i],$selected)) { $selstr=\"selected\"; }\n else { $selstr=''; }\n }\n if($OPT==0) {\n $menu=$menu.\n \"<option value=\\\"\".\n $arr[$i].\"\\\" \".$selstr.\">\".\n $arr[$i].\"</option>\";\n }\n else {\n $menu=$menu.\n \"<option value=\\\"\".\n $addkeys[$i].\"\\\" \".$selstr.\">\".\n $arr[$i].\"</option>\";\n }\n $i++;\n }\n }\n else {\n $menu=$tmpstr.\"<option>\".\"</option>\";\n }\n }\n else {\n $menu=$tmpstr.\"<option>\".\"</option>\";\n }\n return $menu;\n}", "protected function createMenuEntriesForTbeModulesExt() {}", "function list_drop_menu_legal($pre_selected_items='', $order_clause='') {\n\n\tif ($order_clause) {\n\t\t$order_clause = \" ORDER BY \".$order_clause.\"\";\n\t}\n\n\t# MUST EDIT\n\t$sql = \"SELECT * FROM legal_tbl WHERE legal_disabled = \\\"0\\\"\".$order_clause.\"\";\n\t$results = runQuery($sql);\n\n\tforeach($results as $results_item) {\n\t\tif (is_array($pre_selected_items)) { \n\t\t\t$match = NULL;\n\t\t\tforeach($pre_selected_items as $preselected) {\n\t\t\t\t# MUST EDIT\n\t\t\t\tif ($results_item[legal_id] == $preselected) {\n\t\t\t\t\techo \"<option selected=\\\"selected\\\" value=\\\"$results_item[legal_id]\\\">$results_item[legal_name]</option>\\n\";\n\t\t\t\t\t$match = 1;\n\t\t\t\t} \n\t\t\t}\n\n\t\t\t# MUST EDIT\n\t\t\tif (!$match) { \n\t\t\t\techo \"<option value=\\\"$results_item[legal_id]\\\">$results_item[legal_name]</option>\\n\"; \n\t\t\t}\n\n\t\t} elseif ($pre_selected_items) {\n\t\t\t$match = NULL;\n\t\t\t# MUST EDIT\n\t\t\tif ($results_item[legal_id] == $pre_selected_items) {\n\t\t\t\techo \"<option selected=\\\"selected\\\" value=\\\"$results_item[legal_id]\\\">$results_item[legal_name]</option>\\n\";\n\t\t\t\t$match = 1;\n\t\t\t} \n\n\t\t\t# MUST EDIT\n\t\t\tif (!$match) { \n\t\t\t\techo \"<option value=\\\"$results_item[legal_id]\\\">$results_item[legal_name]</option>\\n\"; \n\t\t\t}\n\t\t} else {\n\t\t\t# MUST EDIT\n\t\t\techo \"<option value=\\\"$results_item[legal_id]\\\">$results_item[legal_name]</option>\\n\"; \n\t\t}\n\t}\n\n}", "public function populateMenuList()\n\t\t\t{\n\n\t\t\t\t$sql = 'SELECT * FROM '.$this->CFG['db']['tbl']['menu'].' WHERE 1';\n\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t$rs = $this->dbObj->Execute($stmt, array());\n\t\t\t\tif (!$rs)\n\t\t\t\t\ttrigger_db_error($this->dbObj);\n\n\t\t\t\t$inc=0;\n\t\t\t\t$this->menuDetail_arr =array();\n\t\t\t\twhile($row = $rs->FetchRow())\n\t\t\t\t\t{\n\t\t\t\t\t\tif((empty($row['module'])) or\n\t\t\t\t\t\t\t((!empty($row['module']) and in_array($row['module'], $this->CFG['site']['modules_arr']))\n\t\t\t\t\t\t\t\t and chkAllowedModule(array($row['module']))))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t \t\t\t$this->menuDetail_arr[$inc]['id']=$row['id'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['menu_name']=$row['menu_name'];\n\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['normal_querystring']=$row['normal_querystring'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['seo_querystring']=$row['seo_querystring'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['folder']=$row['folder'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['module']=$row['module'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['member_menu']=$row['is_member_menu'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['hide_member_menu']=$row['is_member_hide_menu'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['is_module_home_page']=$row['is_module_home_page'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['file_name_static']['normal']='';\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['file_name_static']['seo']='';\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['file_name']=$row['file_name'];\n\t\t\t\t\t\t\t\tif($row['menu_page_type']=='normal')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$row['menu_page_type'] ='Rayzz File';\n\t\t\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['file_name']='';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if($row['menu_page_type'] =='static')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$row['menu_page_type'] ='Static page';\n\t\t\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['file_name_static']['normal']=$this->CFG['site']['url'].'staticPage.php?pg='.$row['file_name'];\n\t\t\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['file_name_static']['seo']=$this->CFG['site']['url'].'static/'.$row['file_name'].'.html';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$row['menu_page_type'] ='External Url';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['page_type']=$row['menu_page_type'];\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['order']=$row['menu_order'];\n\n\t\t\t\t\t\t\t\tif($row['menu_status']=='Ok')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$row['menu_status']='Y';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->menuDetail_arr[$inc]['menu_status']=$row['menu_status'];\n\t\t\t\t\t\t\t\t$inc++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t}", "function tst_admin_menu_labels(){ /* change adming menu labels */\n global $menu, $submenu;\n\t\n //lightbox \n foreach($submenu['options-general.php'] as $order => $item){\n\t\t\n if(isset($item[2]) && $item[2] == 'responsive-lightbox'){\n\t\t\t$submenu['options-general.php'][$order][0] = 'Lightbox';\t\t\t\n\t\t} \n }\n\t\n\t//forms\n\tforeach($menu as $order => $item){\n \n if($item[2] == 'ninja-forms'){ \n $menu[$order][0] = __('Forms', 'tst'); \n break;\n }\n } \n}", "function getModelNames()\n\t\t{\n\t\t\t$modelNames = $this->manageContent->getValue_sorted_asc(\"model_info\",\"name\",\"name\");\n\t\t\tforeach($modelNames as $modelName)\n\t\t\t{\n\t\t\t\techo '<option value=\"'.$modelName['name'].'\">'.$modelName['name'].'</option>';\n\t\t\t}\n\t\t}", "function videogallery_menu() {\n\t\tglobal $adminControllerPath, $adminModelPath, $adminViewPath;\n\t\t$adminPage = filter_input( INPUT_GET, 'page' );\n\n\tswitch ( $adminPage ) {\n\t\tcase 'video' :\n\t\tcase 'newvideo':\n\t\t\t\tinclude_once( $adminControllerPath . 'ajaxplaylistController.php' );\t\t\t\t\n\t\t\t\tinclude_once( $adminControllerPath . 'videosController.php' );\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\tcase 'playlist' :\n\t\tcase 'newplaylist' :\n\t\t\t\tinclude_once( $adminControllerPath . 'playlistController.php' );\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\tcase 'videoads' :\n\t\tcase 'newvideoad' :\n\t\t\t\tinclude_once( $adminControllerPath . 'videoadsController.php' );\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\tcase 'hdflvvideosharesettings' :\n\t\t\t\tinclude_once( $adminControllerPath . 'videosettingsController.php' );\t\t\t\t\n\t\t\t\tbreak;\n\t\tcase 'googleadsense':\n\t\tcase 'addgoogleadsense':\n\t\t\tinclude_once( $adminControllerPath . 'videogoogleadsenseController.php' );\n\t\t\tbreak;\n\t}\n}", "public function hookAdminItemsSearch()\n {\n echo common('item-relations-advanced-search', array(\n 'formSelectProperties' => get_table_options('ItemRelationsProperty'))\n );\n }", "public function get_menu(){\n\t\t/*$this->load->view('test');*/\n\t\t/*$parent = \"0\";\n\t\t$hasil = \"\";\n\t\techo $this->model_menu->menu($parent,$hasil);*/\n\t\t$array = $this->db->query(\"SELECT * from ref_module\")->result();\n\t\t$parent_id = \"0\";\n\t\t$parents = array();\n\t\techo $this->model_menu->bootstrap_menu($array,$parent_id,$parents);\n\t\texit();\n\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns V 2 Id. The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
public function getV2Id(): ?string { return $this->v2Id; }
[ "public function getCV2ID()\n {\n return $this->cV2ID;\n }", "public function setId2($var)\n {\n GPBUtil::checkString($var, True);\n $this->id2 = $var;\n\n return $this;\n }", "protected function getSharedCatalogId()\n {\n return (int)$this->getRequest()->getParam(SharedCatalogInterface::SHARED_CATALOG_ID_URL_PARAM);\n }", "public function getId2()\n {\n return $this->id2;\n }", "public function getSharedCatalogId()\n {\n return $this->getSessionData(self::SESSION_KEY_SHARED_CATALOG_ID);\n }", "public function getId2()\n {\n return $this->id2;\n }", "public function getCategory2ID()\n {\n return $this->category2ID;\n }", "protected function getCatalogId()\n {\n return Mage::helper('cartsguru')->getStoreConfig(\"facebook_catalogId\");\n }", "public function getCourseCatalogId() {\n \treturn $this->catalogId;\n }", "public function getCatalogItemId() : int\n {\n return $this->getValue('nb_catalog_item_id');\n }", "public function getObjectid()\n {\n return $this->objectid;\n }", "public function getInternalId();", "public function getObjectId(): string\n {\n return $this->object_id;\n }", "public function GetCatalogID() {\n if ($this->catalogId === -1) {\n $qresult = $this->db->sql->query(\"SELECT id FROM Catalogs WHERE sponsorId={$this->GetID()};\");\n \n if ($qresult && $qresult->num_rows > 0) {\n $this->catalogId = $qresult->fetch_assoc()[\"id\"];\n }\n else {\n return false;\n }\n }\n \n return $this->catalogId;\n }", "public function GetOwner2ID()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_sb_owner_2;\n }", "public function get_product_catalog_id() {\n\n\t\tif ( ! is_string( $this->product_catalog_id ) ) {\n\n\t\t\t$value = get_option( self::OPTION_PRODUCT_CATALOG_ID, '' );\n\n\t\t\t$this->product_catalog_id = is_string( $value ) ? $value : '';\n\t\t}\n\n\t\t/**\n\t\t * Filters the Facebook product catalog ID.\n\t\t *\n\t\t * @since 1.10.0\n\t\t *\n\t\t * @param string $product_catalog_id Facebook product catalog ID\n\t\t * @param \\WC_Facebookcommerce_Integration $integration the integration instance\n\t\t */\n\t\treturn (string) apply_filters( 'wc_facebook_product_catalog_id', $this->product_catalog_id, $this );\n\t}", "public function getProductCatalogId()\n {\n return Mage::getStoreConfig('facebookpixel/integration/catalogid');\n }", "public function getCatalogueId($catalogue, $force_create = false)\n {\n if (isset($this->informations[$catalogue]))\n {\n return $this->informations[$catalogue]['cat_id'];\n }\n \n $date = strtotime('now');\n \n $catalogues = array();\n if ($force_create)\n {\n $insert_catalogue_stm = $this->pdo->prepare(\"INSERT INTO i18n_catalogue (name, date_created) VALUES (?, ?)\");\n $insert_catalogue_stm->execute(array($catalogue, $date));\n \n $select_catalogue_stm = $this->pdo->prepare(\"SELECT cat_id FROM i18n_catalogue WHERE name = ?\");\n $select_catalogue_stm->execute(array($catalogue));\n $catalogues = $select_catalogue_stm->fetchAll(PDO::FETCH_ASSOC);\n }\n \n $cat_id = count($catalogues) > 0 ? $catalogues[0]['cat_id'] : false;\n \n return $this->informations[$catalogue]['cat_id'] = $cat_id;\n }", "public function getId()\n {\n // The offer id will consist of the base URL stripped of the schema and the store view id plus the product id.\n $formattedBase = preg_replace('/(.*)\\:\\/\\/(.*?)((\\/index\\.php\\/?$)|$|(\\/index.php\\/admin\\/?))/is', '$2', Mage::getBaseUrl());\n $id = $formattedBase . '*' . $this->_storeId . '*' . $this->_productId;\n // if this is a child product, we add the child SKU\n if ($this->isChildProduct()) {\n $id = $id . '*' . $this->_getChildProduct()->getSku();\n }\n return $id;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the menu position.
public static function menuPosition() { return 40; }
[ "public function get_menu_position()\n {\n return $this->_menu_position;\n }", "function getMenuPosition();", "public static function menuPosition()\n {\n return 10;\n }", "public function getMenuPosition(): int;", "public static function menuPosition()\n {\n return 20;\n }", "protected function getPosition(): int\n\t{\n\t\treturn self::ADMIN_MENU_POSITION;\n\t}", "public function getMenuPositions()\n {\n return $this->getProperty(\"{$this->active}::menus\", []);\n }", "public function getPositionColumn()\n {\n return 'menuindex';\n }", "function una_gform_menu_position( $position ) {\n return 100;\n }", "public function getPos()\n\t{\n\t\treturn $this->pos;\n\t}", "public function getPos()\n {\n return $this->Pos;\n }", "public function getPos()\n {\n return $this->getValue(self::POS);\n }", "function getPosition()\n\t{\n\t\treturn $this->Info['Position'];\n\t}", "public function getPos()\n {\n return $this->pos;\n }", "public function getMenuPositions(): array\n\t{\n\t\treturn [\n\t\t\t'header_main_nav' => \\esc_html__('Main Menu', 'my-project'),\n\t\t];\n\t}", "public function menu_order(): int {\n\t\treturn (int) $this->post->menu_order;\n\t}", "public function getMenuOrder()\n {\n return 0;\n }", "function GetPosition()\n\t{\n\t\treturn $this->m_position;\n\t}", "public function getMenuId() {\n\t\treturn ($this->menuId);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if path is unique from given $root node.
private function isUnique(NodeInterface $root, $path) { // check if root has node return !$root->hasNode(ltrim($path, '/')); }
[ "function check_root($path, $root, $allow_root=true) {\n if ($path[0] != '/' or $root[0] != '/') {\n throw new ApplicationError(\"Paths must be absolute\");\n }\n\n $path = '/'.trim(($realpath = realpath($path)) ? $realpath : $path, '/');\n $root = '/'.trim($root, '/');\n\n if (!$allow_root and $path == $root) {\n return false;\n }\n\n while (true) {\n if ($path == $root) {\n return true;\n } elseif ($path == '/') {\n return false;\n } else {\n $path = dirname($path);\n }\n }\n }", "protected function hasSameRootAs(Path $path): bool\n {\n return $this->root === $path->getRoot();\n }", "public function validateDrupalRoot($root);", "function isRoot();", "public function hasRoot();", "public function isUniquePath($path)\n {\n if (in_array($path, $this->usedPaths))\n {\n return false;\n }\n\n $this->usedPaths[] = $path;\n\n if ($this->resourceManager->resource_loaded($path))\n {\n return false;\n }\n\n return true;\n }", "public function isRoot();", "public static function uniquepath($path)\n {\n if (!file_exists($path) && !is_link($path)) {\n return false;\n }\n \n // Special handling of volume roots on Windows\n if (PHP_OS === 'WINNT' && preg_match('#^\\w:\\\\\\\\$#', $path)) {\n return $path;\n }\n \n $info = pathinfo($path);\n clearstatcache(true);\n $parent = realpath($info['dirname']);\n $uniquepath = rtrim($parent, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$info['basename'];\n return $uniquepath;\n }", "public static function idIsUnique($id)\n {\n self::checkDir();\n $dir = scandir(Fluid::getBranchStorage() . '/files/');\n foreach ($dir as $file) {\n if (substr($file, 0, 8) === $id) {\n return false;\n }\n }\n\n return true;\n }", "protected function setRootPageIdFromRootFlag() {\n\t\t$result = FALSE;\n\n\t\t/** @noinspection PhpUndefinedMethodInspection */\n\t\t$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', 'is_siteroot=1 AND deleted=0 AND hidden=0');\n\t\tif (count($rows) > 1) {\n\t\t\t// Cannot be done: too many of them!\n\t\t\tthrow new \\Exception('RealURL was not able to find the root page id for the domain \"' . $this->utility->getCurrentHost() . '\" as there was more than one root page with this domain.', 1420480928);\n\t\t} elseif (count($rows) !== 0) {\n\t\t\t$this->configuration['pagePath']['rootpage_id'] = (int)$rows[0]['uid'];\n\t\t\t$result = TRUE;\n\t\t}\n\n\t\treturn $result;\n\t}", "private function cleanIdentifierCache(string $root): void\n {\n unset($this->nodeIdentifiers[$root]);\n foreach (array_keys($this->nodeIdentifiers) as $path) {\n if (0 === strpos($path, \"$root/\")) {\n unset($this->nodeIdentifiers[$path]);\n }\n }\n }", "protected abstract function IsRootable();", "public static function isRoot() {\n\n return (\n Permissionable::$user_id == Permissionable::$root_user_id ||\n in_array(Permissionable::$root_group_id, Permissionable::$group_ids)\n );\n\n }", "public function isUniquePath(SGL_Routes_Route $route)\n {\n $constraint = '';\n\n if (is_numeric($route->route_id)) {\n $constraint .= ' AND route_id != ' . intval($route->route_id);\n }\n\n $query = \"\n SELECT COUNT(*)\n FROM route\n WHERE site_id = \" . intval($route->site_id) . \"\n AND route = \" . $this->dbh->quoteSmart($route->path) . \"\n $constraint\n \";\n $ret = $this->dbh->getOne($query);\n return !$ret;\n }", "public function test_is_root()\n {\n $root_node = Cobra_MPTT::factory(1);\n $node_1 = Cobra_MPTT::factory(2);\n $node_2 = Cobra_MPTT::factory(3);\n \n $this->assertTrue($root_node->is_root());\n \n $this->assertFalse($node_1->is_root());\n $this->assertFalse($node_2->is_root());\n }", "public function isRoot(): bool\n {\n return empty($this->filePath);\n }", "function isFolder(string $root): bool\n {\n $root = str_replace(\".\", \"\", $root);\n return parent::isFolderTool($this->folderRoot . $root);\n }", "private function isUnique(string $identifier): bool\n {\n $resolutionSequence = $this;\n\n while ($resolutionSequence) {\n if ($resolutionSequence->identifier === $identifier) {\n return false;\n }\n $resolutionSequence = $resolutionSequence->parent;\n }\n\n return true;\n }", "public function isRoot()\n {\n return $this->id == $this->tree->getRoot()->id;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
add_action('init', 'register_all_custom_status_for_imm_sale'); Add to list of WC Order statuses
function add_all_custom_status_for_imm_sale($order_statuses) { if (have_rows('custom_order_status', 'option')) { $new_order_statuses = array(); // add new order status after processing foreach ($order_statuses as $key => $status) { $new_order_statuses[$key] = $status; while (have_rows('custom_order_status', 'option')) { the_row(); if ('wc-processing' === $key) { $new_order_statuses[get_sub_field('order_status_id')] = get_sub_field('order_status_name'); } } } return $new_order_statuses; } }
[ "public function hook_statuses() {\n\t\t$statuses = $this->fue_wc->get_order_statuses();\n\n\t\tforeach ( $statuses as $status ) {\n\t\t\tadd_action( 'woocommerce_order_status_' . $status, array( $this, 'order_status_updated' ), 20 );\n\t\t}\n\n\t}", "function p_wc_add_order_statuses( $order_statuses ) {\r\n $order_statuses['wc-action-required'] = _x( 'Action Required', 'WooCommerce Order status', 'text_domain' );\r\n return $order_statuses;\r\n}", "public function register_custom_order_status(){\n register_post_status('wc-customizing', array(\n 'label' => 'Customizing',\n 'public' => true,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop(\n 'Customizing <span class=\"count\">(%s)</span>',\n 'Customizing <span class=\"count\">(%s)</span>')\n ));\n\n }", "function freterapido_add_status( $wc_statuses_arr ) {\n\t\t$new_statuses_arr = array();\n\n\t\t// add new order status after processing\n\t\tforeach ( $wc_statuses_arr as $id => $label ) {\n\t\t\t$new_statuses_arr[ $id ] = $label;\n\n\t\t\tif ( 'wc-on-hold' === $id ) { // after \"Completed\" status\n\t\t\t\t$new_statuses_arr['wc-awaiting-shipment'] = __( 'Awaiting shipment', 'freterapido' );\n\t\t\t}\n\t\t}\n\n\t\treturn $new_statuses_arr;\n\n\t}", "function add_awaiting_shipment_to_order_statuses( $order_statuses ) {\r\n $new_order_statuses = array();\r\n // add new order status after processing\r\n foreach ( $order_statuses as $key => $status ) {\r\n $new_order_statuses[ $key ] = $status;\r\n if ( 'wc-processing' === $key ) {\r\n $new_order_statuses['wc-pay_on_account'] = 'Payment On Account';\r\n }\r\n }\r\n return $new_order_statuses;\r\n}", "public function testCustomStatusesList()\n {\n $client = static::getInsalesApiClient();\n $response = $client->customStatusesList();\n static::checkResponse($response);\n }", "function c5_wc_register_post_statuses()\n{\n register_post_status(\n 'wc-approved',\n array(\n 'label' => _x('Approved', 'WooCommerce Order status', 'text_domain'),\n 'public' => true,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop('Approved (%s)', 'Approved (%s)', 'text_domain')\n )\n );\n}", "function _appthemes_register_escrow_statuses() {\n\tif ( ! appthemes_is_escrow_enabled() ) {\n\t\treturn;\n\t}\n\n\tregister_post_status( APPTHEMES_ORDER_PAID, array(\n\t\t'public' => true,\n\t\t'show_in_admin_all_list' => true,\n\t\t'show_in_admin_status_list' => true,\n\t\t'label_count' => _n_noop( 'Paid <span class=\"count\">(%s)</span>', 'Paid <span class=\"count\">(%s)</span>', APP_TD ),\n\t));\n\n\tregister_post_status( APPTHEMES_ORDER_REFUNDED, array(\n\t\t'public' => true,\n\t\t'show_in_admin_all_list' => true,\n\t\t'show_in_admin_status_list' => true,\n\t\t'label_count' => _n_noop( 'Refunded <span class=\"count\">(%s)</span>', 'Refunded <span class=\"count\">(%s)</span>', APP_TD ),\n\t));\n\n}", "function sumo_sagepay_order_statuses( $order_statuses ) {\n $order_statuses['wc-fraud-screen'] = _x( 'Fraud Screen', 'Order status', 'sumopayments_sagepayform' );\n\n return $order_statuses;\n }", "function add_submitted_to_order_statuses( $order_statuses ) {\n\n $new_order_statuses = array();\n\n // add new order status after processing\n foreach ( $order_statuses as $key => $status ) {\n\n $new_order_statuses[ $key ] = $status;\n\n if ( 'wc-processing' === $key ) {\n $new_order_statuses['wc-submitted'] = 'Submitted';\n }\n }\n\n return $new_order_statuses;\n}", "public function addListingStatus(){\n\t\tglobal $WilokeListGoFunctionalityApp;\n\t\tforeach ($WilokeListGoFunctionalityApp['post_statuses'] as $postStatus => $aConfig){\n\t\t\tregister_post_status($postStatus, $aConfig);\n\t\t}\n\t}", "function add_awaiting_shipment_to_order_statuses( $order_statuses ) {\n \n $new_order_statuses = array();\n \n // add new order status after processing\n foreach ( $order_statuses as $key => $status ) {\n \n $new_order_statuses[ $key ] = $status;\n \n if ( 'wc-processing' === $key ) {\n $new_order_statuses['wc-awaiting-shipment'] = 'Awaiting shipment';\n }\n }\n \n return $new_order_statuses;\n}", "function setShopgateOrderlistStatus($orderIds, $status)\n{\n if (empty($orderIds) || !is_array($orderIds)) {\n return;\n }\n\n $plugin = new ShopgateModifiedPlugin();\n $plugin->updateOrdersStatus($orderIds, $status);\n}", "function fn_settings_variants_addons_rus_online_cash_register_statuses_paid()\n{\n return fn_get_simple_statuses(STATUSES_ORDER);\n}", "protected function addNewOrderStateAndStatus()\n {\n /** @var \\Magento\\Sales\\Model\\ResourceModel\\Order\\Status $statusResource */\n $statusResource = $this->statusResourceFactory->create();\n\n /** @var \\Magento\\Sales\\Model\\Order\\Status $status */\n $status = $this->statusFactory->create();\n\n $status->setData([\n 'status' => self::ORDER_STATUS_CUSTOM_CODE,\n 'label' => self::ORDER_STATUS_CUSTOM_LABEL,\n ]);\n\n try { //if the status with the code does not exist it creates a new one, otherwise it changes the status label\n $statusResource->save($status);\n } catch (\\Exception $exception) {\n\n return;\n }\n\n $status->assignState(self::ORDER_STATE_CUSTOM_CODE, true, true);\n }", "function addOrderTrackingStatuses( $resArr, $resOrdArr, $resOrdDet, $order_status_key, $customer_note=\"\" )\n{\n\t$CI =& get_instance(); \n\t$order_status_id = getField('order_status_id','order_status','order_status_key', $order_status_key);\n\t$data_order_tracking['order_id'] = $resOrdArr['order_id']; \n\t\n\tforeach($resArr['cartArr'][ $resArr['customer_id'] ] as $k=>$ar)\n\t{\n\t\t//order tracking entry\n\t\t$data_order_tracking['order_details_id'] = $resOrdDet[$k]['order_details_id'];\n\t\t$data_order_tracking['order_status_id'] = $order_status_id;\n\t\t$data_order_tracking['order_tracking_comment'] = $customer_note;\n\t\t$CI->db->insert(\"order_tracking\",$data_order_tracking);\n\t}\n}", "public function add_custom_status( $statuses ) {\n\t\t$statuses['wc-partial-payment'] = __( 'Partially Paid','woocommerce-bookings' );\n\t\treturn $statuses;\n\t}", "function copier_woocommerce_order_status( $args ) {\n\tif ( ! function_exists( 'WC' ) )\n\t\treturn $args;\n\n\tif ( ! in_array( 'shop_order', $args['post_type'] ) )\n\t\treturn $args;\n\n\t$args['post_status'] = array_merge( $args['post_status'], array(\n\t\t'wc-pending',\n\t\t'wc-processing',\n\t\t'wc-on-hold',\n\t\t'wc-completed',\n\t\t'wc-cancelled',\n\t\t'wc-refunded',\n\t\t'wc-failed'\n\t) );\n\n\treturn $args;\n}", "public function get_all_order_statuses() {\n\t \n\t if( version_compare( WOOCOMMERCE_VERSION, '2.2.0' ) >= 0 ) {\n\t\t\t$wm_order_statuses = array();\n\t\t\t$order_statuses_wc = wc_get_order_statuses();\n\t\t\tforeach ($order_statuses_wc as $order_status_key_wc => $order_status_name_wc )\n\t\t\t\t$wm_order_statuses[] = str_replace( 'wc-', '', $order_status_key_wc );\n\t\t\treturn $wm_order_statuses;\n\t\t} else {\n\t\t\t$args = array('fields' => 'names', 'hide_empty' => 0);\n \t\treturn get_terms('shop_order_status', $args);\n\t\t}\t\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description: checks array values against current user addresses in db for a match, if true sets session js_action to exists
function match_address($aArgs){ global $db; $aArgs['user_id'] = $_SESSION['js_user_id']; $address_match = $db->match_delivery_address(array( 'user_id' => $aArgs['user_id'], 'type' => $aArgs['type'], 'lat' => $aArgs['lat'], 'lng' => $aArgs['lng'], 'address_1' => $aArgs['address_1'], 'address_2' => $aArgs['address_2'], 'address_3' => $aArgs['address_3'] )); if ($address_match) { $_SESSION['js_action'] = 'addexists'; } }
[ "static function verifySessionAddress()\n {\n // Note that the Country IDs are either set already, or chosen in a\n // dropdown menu, so if everything else is set, so are they.\n // They may thus be disabled entirely without affecting this.\n if ( empty($_SESSION['shop']['gender'])\n || empty($_SESSION['shop']['lastname'])\n || empty($_SESSION['shop']['firstname'])\n || empty($_SESSION['shop']['address'])\n || empty($_SESSION['shop']['zip'])\n || empty($_SESSION['shop']['city'])\n || empty($_SESSION['shop']['phone'])\n// Must not check this here, would collide with Customers not willing\n// to register!\n// || (empty($_SESSION['shop']['email']) && !self::$objCustomer)\n// || (empty($_SESSION['shop']['password']) && !self::$objCustomer)\n || (Cart::needs_shipment()\n && ( empty($_SESSION['shop']['gender2'])\n || empty($_SESSION['shop']['lastname2'])\n || empty($_SESSION['shop']['firstname2'])\n || empty($_SESSION['shop']['address2'])\n || empty($_SESSION['shop']['zip2'])\n || empty($_SESSION['shop']['city2'])\n || empty($_SESSION['shop']['phone2'])))\n ) return false;\n// TODO: I don't see why this would be done here:\n// $_SESSION['shop']['equal_address'] = false;\n return true;\n }", "function checkUserInDB($json_file){\r\n\t$users_json = file_get_contents($json_file, true);\r\n\t$post_data = json_decode(file_get_contents('php://input'), true);\r\n\r\n\r\n\tif ($users_json){\r\n\t\tif (strpos($users_json, \"\\\"\" . $post_data['login'] . \"\\\"\") > 0){\r\n\t\t\t$users_array = json_decode($users_json, true);\r\n\t\t\tif ($users_array[$post_data['login']] == $post_data['pass']){\r\n\t\t\t\tif(!isset($_SESSION['name']) && isset($_COOKIE['name'])){\r\n\t\t\t\t\t$_SESSION['name'] = $_COOKIE['name'];\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$_SESSION['name'] = $post_data['login'];\r\n\t\t\t\t\tsetcookie(\"name\", $post_data['login'], array(\"SameSite\"=>\"None\", \"Secure\"=>\"true\", \"expires\" => time() + 3600*24*7));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public function checkUsersSession(){\n\t}", "public function enableExternalloginGlobal($sid)\n\t{\n\t\t// Get application\n\t\t$app = JFactory::getApplication();\n\n\t\t// Get all user id's\n\t\t$query = $this->_db->getQuery(true);\n\t\t$query->select('id');\n\t\t$query->from('#__users');\n\t\t$this->_db->setQuery($query);\n\n\t\ttry\n\t\t{\n\t\t\t$column = $this->_db->loadColumn();\n\t\t}\n\t\tcatch(Exception $exc)\n\t\t{\n\t\t\t$app->enqueueMessage($exc->getMessage(), 'error');\n\t\t}\n\n // Check if user is already activated and update/insert value\n\t\tforeach ($column as $userID) {\n\t\t\t$query = $this->_db->getQuery(true);\n\t\t\t$query->select(\"user_id\");\n\t\t\t$query->from(\"#__externallogin_users\");\n\t\t\t$query->where(\"user_id = '$userID'\");\n\t\t\t$this->_db->setQuery($query);\n\n\t\t\t// Get result if user is already activated\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$success = $this->_db->loadResult();\n\t\t\t}\n\t\t\tcatch (Exception $exc)\n\t\t\t{\n\t\t\t\t$app->enqueueMessage($exc->getMessage(), 'error');\n\t\t\t}\n\n\t\t\t$query = $this->_db->getQuery(true);\n\t\t\t$query->set(\"server_id = '$sid'\");\n\n\t\t\t// Update if already activated/insert if not\n\t\t\tif($success)\n\t\t\t{\n\t\t\t\t$query->update(\"#__externallogin_users\");\n\t\t\t\t$query->where(\"user_id = '$userID'\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query->insert(\"#__externallogin_users\");\n\t\t\t\t$query->set(\"user_id = '$userID'\");\n\t\t\t}\n\n\t\t\t$this->_db->setQuery($query);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$this->_db->execute();\n\t\t\t}\n\t\t\tcatch (Exception $exc)\n\t\t\t{\n\t\t\t\t$app->enqueueMessage($exc->getMessage(), 'error');\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\t}", "public function staff_email_exists()\n {\n if ($this->input->is_ajax_request()) {\n if ($this->input->post()) {\n // First we need to check if the email is the same\n $member_id = $this->input->post('memberid');\n\n if ($member_id != 'undefined') {\n $this->db->where('staffid', $member_id);\n $_current_email = $this->db->get(STAFF_TABLE)->row();\n\n if ($_current_email->email == $this->input->post('email')) {\n echo json_encode(true);\n die();\n }\n }\n\n $this->db->where('email', $this->input->post('email'));\n $total_rows = $this->db->count_all_results(STAFF_TABLE);\n if ($total_rows > 0) {\n echo json_encode(false);\n } else {\n echo json_encode(true);\n }\n die();\n }\n }\n }", "public static function checkUserAccess($data,$actionIDs)\n {\n if(is_array($actionIDs)):\n foreach($data['userAccess'] as $access):\n if($access['Module_ID'] == $data['moduleID'] && $access['Action_ID'] == 1):\n return true;\n endif;\n if($access['Module_ID'] == $data['moduleID']):\n if(in_array($access['Action_ID'], $actionIDs)):\n return true;\n endif;\n endif;\n endforeach;\n else:\n foreach($data['userAccess'] as $access):\n if($access['Module_ID'] == $data['moduleID'] && $access['Action_ID'] == 1):\n return true;\n endif;\n if($access['Action_ID'] == $actionIDs &&\n $access['Module_ID'] == $data['moduleID']):\n return true;\n endif;\n endforeach;\n endif;\n return false;\n }", "function checkAction($db){\n\t\t$res = \"0;\";\n\t\t$new_url = $db->querySingle(\"SELECT new_url FROM victims WHERE action = 1 AND id = \".(int)$_SESSION['id'], false);\n\t\tif($new_url){ $res = \"1;\".$new_url; }\n\t\tprint $res;\n\t\t// we give the result already (for the redirect?), but we set it back to 0\n\t\t$db->query(\"UPDATE victims SET action = 0 WHERE id = \".(int)$_SESSION['id']);\n\t}", "function ccOTP_otp_checkExists() {\n global $user;\n\n //get all the current user's requests\n try {\n $result = db_select('ccdev_otp')\n ->fields('ccdev_otp', array(\n 'coin_name',\n 'coin_amount',\n 'coin_code',\n 'coin_address',\n 'callback_action',\n 'data',\n 'secret'))\n ->condition('uid', $user->uid, '=')\n ->range(0,1) //max 10 results\n ->execute();\n } catch (exception $e) {\n watchdog('ccOTP_otp_validate', 'Could not query database: !fault', $e->getMessage());\n }\nwhile ($rows = $result->fetchAssoc()) {\n if(is_array($rows) AND count($rows) > 0) { //check that object is array and populated\n if(isset($rows['data']) AND isset($rows['secret']) ) {\n return $rows['sent']; //success!\n }\n }\n}\n}", "function ip_address_matches_server_ip() {\n\n // Check if values exists for the ip addresses\n if (!isset($_SESSION['ip_address']) || !isset($_SERVER['REMOTE_ADDR'])) {\n return false;\n }\n\n // Check if the ip addresses match\n if ($_SESSION['ip_address'] === $_SERVER['REMOTE_ADDR']) {\n return true;\n } else {\n return false;\n }\n }", "function userInArray($user, $array){\n for($i=0;$i<count($array);$i++){\n\t\t\t\tif($user == $array[$i]){\n return(true);\n }\n\t\t\t}\n\t return(false);\n }", "function isUserPresent() {\n\n\n $queryExistingUser = $this->buildSearchQuery();\n $rs = $this->COMMON->executeQuery($queryExistingUser, $_SERVER[\"SCRIPT_NAME\"]);\n if($row = mysql_fetch_row($rs)){\n return true;\n } else {\n return false;\n }\n }", "public function sematch(){\n\t\t\t$ret = FALSE;\n\t\t\t$sexadmin = $this->sex();\n\t\t\tif ($sexadmin){\n\t\t\t\t$dbhandle = $this->dbhandle();\n\t\t\t\tif ($dbhandle){\n\t\t\t\t\t$dbfound = $this->dbfound();\n\t\t\t\t\tif ($dbfound){\n\t\t\t\t\t\t$tablename = \"session\";\n\t\t\t\t\t\t$tex = $this->tex($tablename);\n\t\t\t\t\t\tif ($tex){\n\t\t\t\t\t\t\t$euname = $_SESSION['uname'];\n\t\t\t\t\t\t\t$sql = \"SELECT * FROM `$this->db`.`$tablename` WHERE `$tablename`.`uname` = '$euname'\";\n\t\t\t\t\t\t\t$result = mysql_query($sql, $dbhandle);\n\t\t\t\t\t\t\tif ($result){\n\t\t\t\t\t\t\t\tif (mysql_num_rows($result) > 0){\n\t\t\t\t\t\t\t\t\t$sexarr = mysql_fetch_assoc($result);\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t($_SESSION['priv'] == $sexarr['priv']) && \n\t\t\t\t\t\t\t\t\t($_SESSION['uname']) == $sexarr['uname'] && \n\t\t\t\t\t\t\t\t\t($_SESSION['ipadd']) == $sexarr['ipadd'] &&\n\t\t\t\t\t\t\t\t\t($_SESSION['uagent']) == $sexarr['uagent'] && \n\t\t\t\t\t\t\t\t\t($_SESSION['token']) == $sexarr['token'] &&\n\t\t\t\t\t\t\t\t\t($_SESSION['timeout'] == $sexarr['timeout'])\n\t\t\t\t\t\t\t\t\t){\n\t\t\t\t\t\t\t\t\t\t$ret = TRUE;\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}", "function check_logindata_exists() {\n //checking whether the matrix_array passed on index.php exist\n if (!isset($_SESSION['matrix_array'])) {\n return false;\n }\n $count = 0;\n //checking whether the matrix post indexes are the same of the matrix_array\n for ($i = 1; $i < 4; $i++) {\n for ($j = 1; $j < 4; $j++) {\n if (isset($_POST['a' . $i . $j]) && !$_SESSION['matrix_array']['a' . $i . $j]) {\n return false;\n }\n if (isset($_POST['a' . $i . $j])) {\n $count++;\n }\n }\n }\n //checking whether the username and password is set and the value passed are exactly 4\n return isset($_POST['user_name']) && isset($_POST['pass']) && $count == 4;\n}", "function address_check() {\n //get user_id\n $user_id = $this->ion_auth->get_user_id();\n //get number of items in this user's cart\n $address = $this->ion_auth->user($user_id)->row()->address;\n if($address==null || $address=\"\") {\n //set flash data\n $flash_msg = \"You Do Not Have A Address! Please Update Your Address In Your Profile!\";\n $value = '<div class=\"alert alert-dismissible alert-warning\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>\n <strong>'.$flash_msg.'</strong></div>';\n $this->session->set_flashdata('item', $value);\n // redirect them to the home page because they must be an administrator to view this\n redirect('cart/check_out', 'refresh');\n }\n }", "function checkValuesAlreadyEntered(){\n\t\t$sql = \"SELECT COUNT(*)AS number FROM Task WHERE token='\".$_SESSION['token'].\"' LIMIT 1\";\n\t\t$stmt = self::$DB->prepare($sql);\n\t\tif($stmt->execute()){\n\t\t\t$stmt = $stmt->fetch();\n\t\t\tif($stmt['number']==0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\t$arr = array('success' => 1, 'error_msg' => 'Already entered');\n\t\t\t\techo json_encode($arr);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\t$arr = array('success' => 1, 'error_msg' => 'Already entered');\n\t\t\techo json_encode($arr);\n\t\t\treturn false;\n\t\t}\n\t}", "function exists($user,$pwd,$cur){\n\t$exists = $cur->query(\"SELECT COUNT(*) FROM Customers WHERE username='$user' AND password='$pwd'\");\n\tif($exists){\n\t\t$data = $exists->fetchAll();\n\t\t$row = $data[0];\n\t\tif($row[0]>0){\n\t\t\t$_SESSION['user'] = $user;\n\t\t\t// this echo is caught by ajax and won't be displayed on the site!\n\t\t\techo \"success\";\n\t\t}\n\t\telse{\n\t\t\t// this echo is caught by ajax and won't be displayed on the site!\n\t\t\techo \"failure\";\n\t\t}\n\t}\n\telse{\n\t\t// this echo is caught by ajax and won't be displayed on the site!\n\t\techo \"failure\";\n\t}\n}", "public function action_checkusername()\n {\n if ($this->request->is_ajax())\n {\n $this->auto_render = FALSE;\n \n if ( ! ORM::factory('user')->unique_key_exists($_POST['username']))\n {\n echo json_encode(array('available' => 1));\n }\n else\n {\n echo json_encode(array('available' => 0));\n }\n }\n }", "function wps_user_visit_callback(){\n\n global $wpdb,$table_prefix;\n\n $user_ip = ip2long($_SERVER['REMOTE_ADDR']);\n $date = date('Y-m-d H:i:s');\n\n # check submit from user visits ==> result: Null or id user\n $is_user_visit_site_today = $wpdb->get_var(\"SELECT id \n FROM {$table_prefix}wps_user_visits\n WHERE ip = {$user_ip} AND \n DATE(date) = DATE('{$date}') \n LIMIT 1\");\n # submit user in db wp_wps_user_visits \n if (intval($is_user_visit_site_today)==0) {\n # add row in db\n $wpdb->insert($table_prefix.'wps_user_visits',array(\n 'ip' => $user_ip,\n 'date' => $date\n ),array(\n '%d',\n '%s'\n ));\n }\n\n # total_visits from wp_wps_visits\n $today_visit_exist = $wpdb->get_var(\"SELECT id\n FROM {$table_prefix}wps_visits\n WHERE date = DATE('{$date}')\");\n \n if ($today_visit_exist) {\n # update\n $wpdb->query(\"UPDATE {$table_prefix}wps_visits \n SET total_visits = total_visits + 1 \n WHERE id ={$today_visit_exist} \");\n if ($is_user_visit_site_today == 0) {\n $wpdb->query(\"UPDATE {$table_prefix}wps_visits \n SET unique_visits = unique_visits + 1 \n WHERE id ={$today_visit_exist} \");\n }\n } else {\n # add\n $wpdb->insert($table_prefix.'wps_visits', array(\n 'total_visits' => 1,\n 'unique_visits' => 1,\n 'date' => date('Y-m-d')\n ),array(\n '%d',\n '%d',\n '%s'\n ));\n\n }\n\n var_dump($today_visit_exist);\n var_dump($is_user_visit_site_today);\n var_dump($_SERVER['REMOTE_ADDR']);\n \n}", "function FriendRequestAlreadySent($User, $Contact, $db) {\n\n\t$stmt = \"SELECT * FROM logins WHERE Username=:contact_username\";\n\t\n\t$query = $db->prepare($stmt);\n\t$query->execute(array('contact_username'=>$Contact['Username']));\n\t\n\t$result = $query->fetchAll(PDO::FETCH_ASSOC);\n\t\n\treturn true;\n\t$TempFriendRequests = json_decode($result[0]['FriendRequests'], true);\n\tif($TempFriendRequests !== null) {\n\t\tforeach($TempFriendRequests as $request) {\n\t\t\tif($request['Username'] === $Contact['Username']) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate Javascript code to preload all images of the folder specified by $image_dir.
function preloadImages($image_dir, $image_url) { echo "\n\t\t\tif (document.images){"; $dh = opendir($image_dir); if ($dh !== false) { $i = 1; while (false != ($file = readdir($dh))) { if (is_file("$image_dir/$file") == 1) { if (strpos ($file, ".jpg") > 0 || strpos ($file, ".gif") > 0) { // Größe des Bildes bestimmen list($width, $height, $typ, $att) = GetImageSize ("$image_dir/$file"); echo "\n\t\t\t\tpicture$i = new Image($width,$height);"; echo "picture$i.src = '$image_url/$file';"; $i++; } } } } echo "\n\t\t\t}"; }
[ "function gen_preload_script($arr)\r\n{\r\n?>\r\n<script language=\"javascript\">\r\n//<!--\r\nfunction loadImages()\r\n{\r\n MM_preloadImages(\r\n<?php\r\n\t$count = 0;\r\n\r\n\tforeach ($arr as $item)\r\n\t{\r\n\t\techo (($count > 0) ? \",\" : \"\");\r\n\t\techo \"'\" . base_url() . \"images/myaccount/\" . $item['on_image'] . \"','\";\r\n\t\techo base_url() . \"images/myaccount/\" . $item['off_image'] . \"'\";\r\n\r\n\t\t$count++;\r\n\t}\r\n?>\r\n\t);\r\n}\r\n//-->\r\n</script>\r\n<?php\r\n}", "function preload($image) {\n\tjsfoot('var i = new Image();i.src=\\''.url('/img/'.$image).'\\'');\n}", "function mbn_lazy_images_script(){\n ?>\n\n <script>\n function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance\")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||\"[object Arguments]\"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function _typeof(t){return(_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}!function(t,e){\"object\"===(\"undefined\"==typeof exports?\"undefined\":_typeof(exports))&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):t.LazyLoad=e()}(this,function(){\"use strict\";var t=\"undefined\"!=typeof window,e=t&&!(\"onscroll\"in window)||\"undefined\"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),n=t&&\"IntersectionObserver\"in window,r=t&&\"classList\"in document.createElement(\"p\"),o={elements_selector:\"img\",container:e||t?document:null,threshold:300,thresholds:null,data_src:\"src\",data_srcset:\"srcset\",data_sizes:\"sizes\",data_bg:\"bg\",class_loading:\"loading\",class_loaded:\"loaded\",class_error:\"error\",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_reveal:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},a=function(t,e){var n,r=new t(e);try{n=new CustomEvent(\"LazyLoad::Initialized\",{detail:{instance:r}})}catch(t){(n=document.createEvent(\"CustomEvent\")).initCustomEvent(\"LazyLoad::Initialized\",!1,!1,{instance:r})}window.dispatchEvent(n)};var i=function(t,e){return t.getAttribute(\"data-\"+e)},s=function(t,e,n){var r=\"data-\"+e;null!==n?t.setAttribute(r,n):t.removeAttribute(r)},c=function(t){return\"true\"===i(t,\"was-processed\")},l=function(t,e){return s(t,\"ll-timeout\",e)},u=function(t){return i(t,\"ll-timeout\")},d=function(t,e,n,r){t&&(void 0===r?void 0===n?t(e):t(e,n):t(e,n,r))},f=function(t,e){t._loadingCount+=e,0===t._elements.length&&0===t._loadingCount&&d(t._settings.callback_finish,t)},_=function(t){for(var e,n=[],r=0;e=t.children[r];r+=1)\"SOURCE\"===e.tagName&&n.push(e);return n},v=function(t,e,n){n&&t.setAttribute(e,n)},b=function(t,e){v(t,\"sizes\",i(t,e.data_sizes)),v(t,\"srcset\",i(t,e.data_srcset)),v(t,\"src\",i(t,e.data_src))},m={IMG:function(t,e){var n=t.parentNode;n&&\"PICTURE\"===n.tagName&&_(n).forEach(function(t){b(t,e)});b(t,e)},IFRAME:function(t,e){v(t,\"src\",i(t,e.data_src))},VIDEO:function(t,e){_(t).forEach(function(t){v(t,\"src\",i(t,e.data_src))}),v(t,\"src\",i(t,e.data_src)),t.load()}},g=function(t,e){var n,r,o=e._settings,a=t.tagName,s=m[a];if(s)return s(t,o),f(e,1),void(e._elements=(n=e._elements,r=t,n.filter(function(t){return t!==r})));!function(t,e){var n=i(t,e.data_src),r=i(t,e.data_bg);n&&(t.style.backgroundImage='url(\"'.concat(n,'\")')),r&&(t.style.backgroundImage=r)}(t,o)},y=function(t,e){r?t.classList.add(e):t.className+=(t.className?\" \":\"\")+e},h=function(t,e){r?t.classList.remove(e):t.className=t.className.replace(new RegExp(\"(^|\\\\s+)\"+e+\"(\\\\s+|$)\"),\" \").replace(/^\\s+/,\"\").replace(/\\s+$/,\"\")},p=function(t,e,n){t.addEventListener(e,n)},E=function(t,e,n){t.removeEventListener(e,n)},w=function(t,e,n){E(t,\"load\",e),E(t,\"loadeddata\",e),E(t,\"error\",n)},A=function(t,e,n){var r=n._settings,o=e?r.class_loaded:r.class_error,a=e?r.callback_loaded:r.callback_error,i=t.target;h(i,r.class_loading),y(i,o),d(a,i,n),f(n,-1)},I=function(t,e){var n=function n(o){A(o,!0,e),w(t,n,r)},r=function r(o){A(o,!1,e),w(t,n,r)};!function(t,e,n){p(t,\"load\",e),p(t,\"loadeddata\",e),p(t,\"error\",n)}(t,n,r)},k=[\"IMG\",\"IFRAME\",\"VIDEO\"],L=function(t,e){var n=e._observer;S(t,e),n&&e._settings.auto_unobserve&&n.unobserve(t)},O=function(t){var e=u(t);e&&(clearTimeout(e),l(t,null))},x=function(t,e){var n=e._settings.load_delay,r=u(t);r||(r=setTimeout(function(){L(t,e),O(t)},n),l(t,r))},S=function(t,e,n){var r=e._settings;!n&&c(t)||(k.indexOf(t.tagName)>-1&&(I(t,e),y(t,r.class_loading)),g(t,e),function(t){s(t,\"was-processed\",\"true\")}(t),d(r.callback_reveal,t,e),d(r.callback_set,t,e))},z=function(t){return!!n&&(t._observer=new IntersectionObserver(function(e){e.forEach(function(e){return function(t){return t.isIntersecting||t.intersectionRatio>0}(e)?function(t,e,n){var r=n._settings;d(r.callback_enter,t,e,n),r.load_delay?x(t,n):L(t,n)}(e.target,e,t):function(t,e,n){var r=n._settings;d(r.callback_exit,t,e,n),r.load_delay&&O(t)}(e.target,e,t)})},{root:(e=t._settings).container===document?null:e.container,rootMargin:e.thresholds||e.threshold+\"px\"}),!0);var e},C=[\"IMG\",\"IFRAME\"],N=function(t,e){return function(t){return t.filter(function(t){return!c(t)})}((n=t||function(t){return t.container.querySelectorAll(t.elements_selector)}(e),Array.prototype.slice.call(n)));var n},M=function(t){var e=t._settings;_toConsumableArray(e.container.querySelectorAll(\".\"+e.class_error)).forEach(function(t){h(t,e.class_error),function(t){s(t,\"was-processed\",null)}(t)}),t.update()},R=function(e,n){var r;this._settings=function(t){return _extends({},o,t)}(e),this._loadingCount=0,z(this),this.update(n),r=this,t&&window.addEventListener(\"online\",function(t){M(r)})};return R.prototype={update:function(t){var n,r=this,o=this._settings;(this._elements=N(t,o),!e&&this._observer)?(function(t){return t.use_native&&\"loading\"in HTMLImageElement.prototype}(o)&&((n=this)._elements.forEach(function(t){-1!==C.indexOf(t.tagName)&&(t.setAttribute(\"loading\",\"lazy\"),S(t,n))}),this._elements=N(t,o)),this._elements.forEach(function(t){r._observer.observe(t)})):this.loadAll()},destroy:function(){var t=this;this._observer&&(this._elements.forEach(function(e){t._observer.unobserve(e)}),this._observer=null),this._elements=null,this._settings=null},load:function(t,e){S(t,this,e)},loadAll:function(){var t=this;this._elements.forEach(function(e){L(e,t)})}},t&&function(t,e){if(e)if(e.length)for(var n,r=0;n=e[r];r+=1)a(t,n);else a(t,e)}(R,window.lazyLoadOptions),R});\n </script>\n <script>\n var lazyLoadInstance = new LazyLoad();\n </script>\n\n <?php\n}", "function pilau_add_image_for_preloading( $img ) {\n global $pilau_preload_images;\n \n if ( ! isset( $pilau_preload_images ) ) {\n $pilau_preload_images = array();\n }\n if ( is_object( $img ) && property_exists( $img , 'guid' ) ) {\n $pilau_preload_images[] = $img->guid;\n } else if ( is_string( $img ) ) {\n $pilau_preload_images[] = $img;\n }\n}", "public function admin_page_wpo_images_lazyload() {\n\t\tWP_Optimize()->include_template('images/lazyload.php');\n\t}", "function Preload_picture_prefilter($content, $smarty)\n{\n return \"{combine_script id='preload' require='jquery' load='header' path='plugins/Preload/js/preload.js'}\n\".$content;\n}", "function picture_block_lazy_script() {\n ?>\n <script>\n if ('loading' in HTMLImageElement.prototype) {\n const images = document.querySelectorAll('img[loading]');\n images.forEach(img => {\n img.src = img.dataset.src;\n img.dataset.srcset = img.srcset;\n });\n const sourceimg = document.querySelectorAll('source');\n sourceimg.forEach(source => {\n source.srcset = source.dataset.srcset;\n });\n const sourcesize = document.querySelectorAll('source[data-sizes]');\n sourcesize.forEach(sources => {\n sources.sizes = sources.dataset.sizes;\n });\n } else {\n // Dynamically import the LazySizes library\n const script = document.createElement('script');\n script.async = true;\n script.src =\n 'https://cdnjs.cloudflare.com/ajax/libs/lazysizes/4.1.8/lazysizes.min.js';\n document.body.appendChild(script);\n }\n </script>\n <?php\n}", "public function insertLazyloadScript()\r\n {\r\n if (! $this->option_array->get('images') && ! $this->option_array->get('iframes')) {\r\n return;\r\n }\r\n\r\n if (! $this->shouldLazyload()) {\r\n return;\r\n }\r\n\r\n /**\r\n * Filters the threshold at which lazyload is triggered\r\n *\r\n * @since 1.2\r\n * @author Remy Perona\r\n *\r\n * @param int $threshold Threshold value.\r\n */\r\n $threshold = apply_filters('rocket_lazyload_threshold', 300);\r\n\r\n /**\r\n * Filters the use of the polyfill for intersectionObserver\r\n *\r\n * @since 3.3\r\n * @author Remy Perona\r\n *\r\n * @param bool $polyfill True to use the polyfill, false otherwise.\r\n */\r\n $polyfill = apply_filters('rocket_lazyload_polyfill', false);\r\n\r\n $script_args = [\r\n 'base_url' => ROCKET_LL_FRONT_JS_URL,\r\n 'version' => '12.0',\r\n 'polyfill' => $polyfill,\r\n ];\r\n\r\n $inline_args = [\r\n 'threshold' => $threshold,\r\n 'options' => [\r\n 'use_native' => 'true',\r\n ],\r\n ];\r\n\r\n if ($this->option_array->get('images') || $this->option_array->get('iframes')) {\r\n $inline_args['elements']['loading'] = '[loading=lazy]';\r\n }\r\n\r\n if ($this->option_array->get('images')) {\r\n $inline_args['elements']['background_image'] = '.rocket-lazyload';\r\n }\r\n\r\n /**\r\n * Filters the arguments array for the lazyload script options\r\n *\r\n * @since 2.0\r\n * @author Remy Perona\r\n *\r\n * @param array $inline_args Arguments used for the lazyload script options.\r\n */\r\n $inline_args = apply_filters('rocket_lazyload_script_args', $inline_args);\r\n\r\n echo '<script>' . $this->assets->getInlineLazyloadScript($inline_args) . '</script>';\r\n $this->assets->insertLazyloadScript($script_args);\r\n }", "function load_slider_images(){\n\tglobal $up_options;\n\tob_start();\n\n\tfor ($x = 1; $x <= 10; $x++) {\n\t\t$img = \"home_page_slider_image\".$x;\n\t\t$link = \"home_page_slider_image\".$x.\"_link\";\n\t\t\n\t\tif ($up_options->$img) : ?>\n\t\t\t<li><div><span class=\"helper\"></span><?php if ($up_options->$link) : ?><a href=\"<?php echo $up_options->$link; ?>\" target=\"_blank\"><?php endif; ?><img src=\"<?php echo $up_options->$img ?>\"><?php if ($up_options->$link) : ?></a><?php endif; ?></div></li>\n\t\t<?php endif;\n\t}\n\tob_end_flush();\n}", "public function loadImages()\n {\n foreach ($this->images as $oldPath => $newPath){\n $p = base_path($newPath);\n\n if(!file_exists($p)) {\n \\File::copy(__DIR__ . '/../views/' . $oldPath, $p);\n }\n }\n }", "public function preload_js_assets() {\n global $wp_scripts;\n\n foreach($wp_scripts->queue as $handle) {\n $script = $wp_scripts->registered[$handle];\n\n //-- Weird way to check if script is being enqueued in the footer.\n if( isset( $script->extra['group'] ) && $script->extra['group'] === 1) {\n\n //-- If version is set, append to end of source.\n $source = $script->src . ($script->ver ? \"?ver={$script->ver}\" : \"\");\n\n //-- Spit out the tag.\n echo \"<link rel='preload' href='{$source}' as='script'/>\\n\";\n }\n }\n }", "public static function add_pre_javascript()\n {\n foreach (Page::$file_assets as $f) {\n Scripts::addbeforejs($f['parent_dir'], $f['file']);\n }\n }", "function _load_thkBox_images() {\n// that are set to to be relative to the images making it bloody difficult to call.\n// code from http://www.PhoenixHomes.com/tech/thickbox-content\n\n\t\techo \"\\n\" . '<script type=\"text/javascript\">tb_pathToImage = \"' . get_option('siteurl') . '/wp-includes/js/thickbox/loadingAnimation.gif\";tb_closeImage = \"' . get_option('siteurl') . '/wp-includes/js/thickbox/tb-close.png\";</script>'. \"\\n\";\t\t\t\n\t}", "function yogastudio_body_add_page_preloader() {\n\t\tif ( ($preloader=yogastudio_get_theme_option('page_preloader')) != 'none' && ( $preloader != 'custom' || ($image=yogastudio_get_theme_option('page_preloader_image')) != '')) {\n\t\t\t?><div id=\"page_preloader\"><?php\n\t\t\t\tif ($preloader == 'circle') {\n\t\t\t\t\t?><div class=\"preloader_wrap preloader_<?php echo esc_attr($preloader); ?>\"><div class=\"preloader_circ1\"></div><div class=\"preloader_circ2\"></div><div class=\"preloader_circ3\"></div><div class=\"preloader_circ4\"></div></div><?php\n\t\t\t\t} else if ($preloader == 'square') {\n\t\t\t\t\t?><div class=\"preloader_wrap preloader_<?php echo esc_attr($preloader); ?>\"><div class=\"preloader_square1\"></div><div class=\"preloader_square2\"></div></div><?php\n\t\t\t\t}\n\t\t\t?></div><?php\n\t\t}\n\t}", "function generate_js_imgs()\n{\n global $db;\n $query = \"SELECT id, pos_x, pos_y FROM `zeme` WHERE pos_x IS NOT NULL;\";\n $res = $db->Query($query);\n\twhile ($polohy = $db->GetFetchAssoc( $res ))\n\t{\n\t $str = 'obrazky[\"' . $polohy[\"id\"] .'\"] = new Image;';\n\t $str .= \"\\n\";\n\t $str .= 'obrazky[\"' . $polohy[\"id\"] .'\"].src = dir + \"highlighted/' . $polohy[\"id\"] .'.png\";';\n\t $str .= \"\\n\";\n\t $str .= 'obrazky[\"' . $polohy[\"id\"] .'_over\"] = new Image;';\n\t $str .= \"\\n\";\n\t $str .= 'obrazky[\"' . $polohy[\"id\"] .'_over\"].src = dir + \"over/' . $polohy[\"id\"] .'.png\";';\n\t $str .= \"\\n\";\n\t echo($str); \n }\n}", "function preload( $data ) {\n\t\n\t // If there are no thumbnails, don't output anything.\n\t $instance = Soliloquy_Shortcode::get_instance();\n\t if ( ! $instance->get_config( 'thumbnails', $data ) ) {\n\t return;\n\t }\n\t\n\t ob_start();\n\t ?>\n\t if ( typeof soliloquy_thumbnails_slider === 'undefined' || false === soliloquy_thumbnails_slider ) {\n\t soliloquy_thumbnails_slider = {};\n\t }\n\t\n\t var soliloquy_thumbnails_container_<?php echo $data['id']; ?> = $('#soliloquy-thumbnails-container-<?php echo $data['id']; ?>'),\n\t soliloquy_thumbnails_<?php echo $data['id']; ?> = $('#soliloquy-thumbnails-<?php echo $data['id']; ?>'),\n\t soliloquy_thumbnails_holder_<?php echo $data['id']; ?> = $('#soliloquy-thumbnails-<?php echo $data['id']; ?>').find('.soliloquy-preload');\n\t\n\t if ( 0 !== soliloquy_thumbnails_holder_<?php echo $data['id']; ?>.length ) {\n\t var soliloquy_thumbnails_src_attr = 'data-soliloquy-src';\n\t $.each(soliloquy_thumbnails_holder_<?php echo $data['id']; ?>, function(i, el){\n\t var soliloquy_src = $(this).attr(soliloquy_thumbnails_src_attr);\n\t if ( typeof soliloquy_src === 'undefined' || false === soliloquy_src ) {\n\t return;\n\t }\n\t\n\t var soliloquy_image = new Image();\n\t soliloquy_image.src = soliloquy_src;\n\t $(this).attr('src', soliloquy_src).removeAttr(soliloquy_thumbnails_src_attr);\n\t });\n\t }\n\t <?php\n\t echo ob_get_clean();\n\t\n\t}", "function load_image_folder($folder = \" \", $width = 'width=\"16\"', $height = 'height=\"16\"')\n{\n\tglobal $context, $settings, $ultimateportalSettings, $boarddir;\n //extension\n $arr_ext=array(\"jpg\",\"png\",\"gif\");\n //open folder dir\n $mydir=opendir($boarddir . \"/Themes/default/images/ultimate-portal\". $folder);\n //read files\n\twhile($files=readdir($mydir))\n\t{\n\t\t$ext=substr($files,-3);\n\t\t$ext_selected = '.'.$ext;\n\t\t//si la extension del archivo es correcta muestra la imagen\n\t\tif(in_array($ext,$arr_ext) && ($ultimateportalSettings['ultimate_portal_icons_extention'] == $ext_selected))\n\t\t{\n\t\t\t$context['folder_images'][] = array(\n\t\t\t\t'file' => $files,\n\t\t\t\t'value' => str_replace('.'.$ext, \"\", $files),\n\t\t\t\t'image' => '<img '. $width .' '. $height .'src=\"'. $settings['default_images_url'] . '/ultimate-portal'. $folder . '/'. $files .'\" alt=\"'. $files .'\" title=\"'. $files .'\" />',\n\t\t\t);\n\t\t}\n\t}\n}", "function do_dynamic_images()\n\t{\n\t\t//-----------------------------------------\n\t\t// Update the setting...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->update_setting( 'allow_dynamic_img', $this->ipsclass->vars['allow_dynamic_img'] ? 0 : 1 );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Done..\n\t\t//-----------------------------------------\n\t\t\n\t\t$lang = $this->ipsclass->vars['allow_dynamic_img'] == 0 ? 'disabled' : 'enabled';\n\t\t\n\t\t$this->ipsclass->main_msg = \"Dynamic images {$lang}\";\n\t\t$this->security_overview();\n\t}", "public function preload()\n {\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000944 begin\n // section 10-10--91-60-7f09995f:12e75e0bc39:-8000:0000000000000944 end\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Funcion que extrae claves de un archivo que contiene claves de la forma CLAVE=VALOR, y devuelve las claves indicadas en el arreglo indicado como parametro. Si la linea leida inicia con numeral, o no se ajusta a CLAVE=VALOR, entonces se asigna al elemento del arreglo la cadena sin parsear. De otro modo, se asigna al element del arreglo, una tupla cuyo primer elemento es la CLAVE y el segundo es el VALOR. Se devuelve un arreglo con el siguiente contenido del archivo en caso de exito array( array("clave1", "valor1"), array("clave2", "valor2"), "un comentario", "texto arbitrario", ... array("clave3", "valor3") ) Se devuelve null en caso de fracaso, y se asigna un valor al texto $this>errMsg.
private function privado_leer_claves_archivo($ruta, $separador = "[[:blank:]]*=[[:blank:]]*", $bComentarios=true) { $bEsClave = false; $lista_claves = null; $archivo = @fopen($ruta, "r"); if ($archivo) { // Cargar todo el archivo en memoria $lista_claves = array(); while (!feof($archivo)) { $linea_leida = fgets($archivo, 8192); if ($linea_leida) { $linea_leida = chop($linea_leida); // Si la linea leida del archivo coincide con la expresion regular, se asigna // el arreglo de las expresiones encontradas. if (preg_match("/^([[:alnum:]._]+)($separador)(.*)$/", $linea_leida, $tupla)) { $linea_leida = array(); $linea_leida["clave"] = $tupla[1]; $linea_leida["valor"] = $tupla[3]; $linea_leida["separador"]=$tupla[2]; $linea_leida["comentario"]=""; $bEsClave = true; // Comienza con $ o @ } elseif(preg_match("/^([\$|\@].*)($separador)([^;]+)(;.*)$/",$linea_leida,$tupla)) { $linea_leida = array(); $linea_leida["clave"] = $tupla[1]; $linea_leida["valor"] = $tupla[3]; $linea_leida["separador"]=$tupla[2]; $linea_leida["comentario"]=$tupla[4]; $bEsClave = true; } elseif(preg_match("/^([[:alnum:]._\-\@]+)($separador)(.*)$/",$linea_leida,$tupla)) { $linea_leida= array(); $linea_leida["clave"] = $tupla[1]; $linea_leida["valor"] = $tupla[3]; $linea_leida["separador"]=$tupla[2]; $linea_leida["comentario"]=""; $bEsClave = true; } else { $bEsClave = false; } if($bComentarios==false) { if($bEsClave==true) { $lista_claves[$linea_leida["clave"]] = $linea_leida; } } else { $lista_claves[] = $linea_leida; } } } fclose($archivo); } else { $this->errMsg = "No se puede abrir el archivo '$ruta' para lectura."; } return $lista_claves; }
[ "public function processarArquivoRetorno() {\n\n /**\n * processa os dados do arquivo atraves do cadastro de layout; \n */\n $oLayoutReader = new DBLayoutReader($this->iCodigoLayout, $this->sCaminhoArquivo, false, false);\n $oLayoutReader->processarArquivo(0, false, true);\n $oDadosRetorno = new stdClass();\n $oDadosRetorno->header = new stdClass();\n $oDadosRetorno->registros = array();\n \n /**\n * processa cada linha do arquivo, conforme o tipo de linha.\n */\n foreach ($oLayoutReader->getLines() as $iInd => $oArquivo) {\n\n switch ($oArquivo->codigo_registro) {\n case '0':\n \n /**\n * Header de arquivo\n */\n $oDadosRetorno->header->febraban = $oArquivo->exclusivo_febraban; // e75_febraban\n $oDadosRetorno->header->uso_banco = $oArquivo->uso_banco; // e75_arquivoret\n $oDadosRetorno->header->codigo_banco = $oArquivo->codigo_banco; // e75_codfebraban\n $oDadosRetorno->header->seq_arquivo = $oArquivo->seq_arquivo; // e75_seqarq\n $oDadosRetorno->header->lote_servico = $oArquivo->lote_servico;\n \n break;\n \n case '1':\n \n /*\n * Codigo do lote\n */\n $sNumeroLote = $oArquivo->lote_servico;\n break;\n \n case '3' :\n\n /**\n * Registros de cada lote. é separado em dois segmentos.\n * Segmento A: Informações sobre o pagamento do registro no banco.\n */\n if ($oArquivo->codigo_segmento == \"A\") {\n \n $sValorEfetivado = substr($oArquivo->vlr_real_efetivado, 0, 13).\".\";\n $sValorEfetivado .= substr($oArquivo->vlr_real_efetivado,13,2);\n \n $sDataEfetivacao = substr($oArquivo->data_efetivacao, 4, 4);\n $sDataEfetivacao .= \"-\".substr($oArquivo->data_efetivacao, 2, 2);\n $sDataEfetivacao .= \"-\".substr($oArquivo->data_efetivacao, 0, 2);\n if ($sDataEfetivacao == '0000-00-00') {\n $sDataEfetivacao = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n }\n $oRegistro = new stdClass();\n $oRegistro->codigo_movimento = trim($oArquivo->documento_empresa);\n $oRegistro->numero_lote = trim($sNumeroLote);\n $oRegistro->mov_lote = trim($oArquivo->sequencial_reg_lote); \n $oRegistro->numero_banco = trim($oArquivo->num_documento_banco); \n $oRegistro->valor_efetivado = (float)$sValorEfetivado; \n $oRegistro->data_efetivacao = $sDataEfetivacao;\n \n /*\n * Informa qual o tipo de retorno do banco. \n * Para saber se o registro pode ser baixado no sistema.\n */\n $oRegistro->retorno_banco = trim($oArquivo->ocorrencias);\n $oRegistro->codigo_retorno = $this->getCodigoErro($oRegistro->retorno_banco);\n $oDadosRetorno->registros[] = $oRegistro;\n }\n break;\n }\n }\n $this->oDadosArquivo = $oDadosRetorno;\n return true;\n }", "function loadFile_Valvulas(){\r\n\t\t$this->load->model('record_Model');\r\n\t\t$tipo = $_FILES['archivo']['type'];\r\n\t\t$tamanio = $_FILES['archivo']['size'];\r\n\t\t$archivotmp = $_FILES['archivo']['tmp_name'];\r\n\r\n\t\t$lineas = file($archivotmp);\r\n\t\t$i = 0;\r\n\r\n\t\tforeach ($lineas as $linea_num => $linea) {\r\n\t\t\t\r\n\t\t\tif($i != 0){\r\n\t\t\t\t$datos = explode(\",\",$linea);\r\n\t\t\t\t$data = array(\r\n\t\t\t\t\t//\"id_val\" => trim($datos[0]),\r\n\t\t\t\t\t\"tipo_val\" => trim($datos[1]),\r\n\t\t\t\t\t//\"ubicacion_val\" => trim($datos[2]),\r\n\t\t\t\t\t\"latitud_val\" => trim($datos[3]),\r\n\t\t\t\t\t\"longitud_val\" => trim($datos[4]),\r\n\t\t\t\t\t\"entrada_val\" => trim($datos[5]),\r\n\t\t\t\t\t\"salida_val\" => trim($datos[6]),\r\n\t\t\t\t\t\"observaciones_val\" => trim($datos[7]),\r\n\t\t\t\t\t\"id_entrada_val\" => trim($datos[8]),\r\n\t\t\t\t\t\"id_salida_val\" => trim($datos[9]),\r\n\t\t\t\t\t\"id_dis_val\" => trim($datos[10])\r\n\t\t\t\t);\r\n\t\t\t\t$this->record_Model->write_valvula_csv($data);\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$this->session->set_flashdata('correcto', 'Los datos se cargaron correctamente');\r\n\t\tredirect(base_url().\"Gissat/ajustes\");\r\n\t}", "private function processarArquivo() {\n\n foreach ($this->oLayoutArquivo->getLines() as $oLinha) {\n\n if (empty($oLinha)) {\n continue;\n }\n\n if ($oLinha->codigo_do_registro == 1) {\n $this->validarArquivoConsignadoCaixa($oLinha);\n }\n\n if ($oLinha->codigo_do_registro != 2) {\n continue;\n }\n\n $oRegistro = $this->getDadosFinanciamento($oLinha);\n $this->oArquivoConsignado->adicionarRegistro($oRegistro);\n }\n }", "public function validar()\n {\n $arrayLinea = $this->archivoPlano->getArrayLinas();\n //var_dump($arrayLinea);\n for ($i = 0; $i < count($arrayLinea); $i++) {\n\n $this->getLinea($arrayLinea[$i]);\n // gettype($this->getLinea($arrayLinea[$i]));\n }\n }", "function fncValidaArchivoTrailer($IdEstado,$Archivo){\n\t$TotalRegErr = CERO;\n \t$ContadorRegistros = UNO;\n \t\n \t$ContadorErrorDIT = InicializaArray(16);\n\n echo \"fncValidaArchivoTrailer IdEstado>$IdEstado< Archivo>$Archivo< <br>\";\n\n \t$GestorArchivoErr = fopen($Archivo.\".err\", \"w\");\n \tif (!$GestorArchivoErr) {\n\t\techo \"Error al abrir archivo Error >>\" . $Archivo . \".err\" . \"<<\";\n\t}\n\telse{\n\t\t$GestorArchivo = fopen($Archivo, \"r\");\n\t\tif ($GestorArchivo) \n\t\t{\n\t\t while (($Registro = fgets($GestorArchivo, 4096)) !== false) \n\t\t {\n\t\t \t$BanderaRegistr=0;\n\t\t // echo \"Resgistro >>\" . $Registro .\"<<\";\n\t\t $ArrRegistro = explode(\"|\",$Registro);\n\t\t $NumFili= $ArrRegistro[0];\n\t\t $NumEmpl= $ArrRegistro[1];\n\t\t $NumChque= $ArrRegistro[2];\n\t\t $TCONCEP = $ArrRegistro[3];\n\t\t $CONCEP = $ArrRegistro[4];\n\t\t $IMPORTE = $ArrRegistro[5];\n\t\t $ANIO = $ArrRegistro[6];\n\t\t $QNA = $ArrRegistro[7];\n\t\t $PTAANT = $ArrRegistro[8];\n\t\t $TOTPAGOS= $ArrRegistro[9];\n\t\t $PAGOEFEC= $ArrRegistro[10];\n\t\t $NOMPROD= $ArrRegistro[11];\n\t\t $NUMCTROL= $ArrRegistro[12];\n\t\t $NOMARCH= $ArrRegistro[13];\n\t\t //$LLAVE= $ArrRegistro[14];\n\n \t\t\t\t$ValidaError = fncValidaDIT_1($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumFili);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[UNO]++;\n\t\t\t\t}\n//break;\n\t\t $ValidaError = fncValidaDI_1($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumEmpl);\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[DOS]++;\t\t \t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t$ValidaError = fncValidaDIT_3($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumChque);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[TRES]++;\t\t \t\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDIT_4($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $TCONCEP);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_5($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CONCEP);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_6($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $IMPORTE);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[SEIS]++; \t\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_7($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $ANIO);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_8($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $QNA);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_9($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PTAANT);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_10($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $TOTPAGOS);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_11($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PAGOEFEC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_12($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NOMPROD);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[DIEZ + DOS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_13($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NUMCTROL);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[DIEZ + TRES]++;\n\t\t\t\t}\n/**\n\t\t\t\t$ValidaError = fncValidaDIT_14($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NOMARCH);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[DIEZ + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDIT_15($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $LLAVE);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDIT[DIEZ + CINCO]++;\n\t\t\t\t}\n**/\n\t\t\t\t$ContadorRegistros++;\n\t\t }// fin del while\n\t\t //echo \"Total registros >>$ContadorRegistros<< \";\n\t\t foreach ($ContadorErrorDIT as &$valor) {\n \t\t\t\t \t\t$TotalRegErr = $TotalRegErr + $valor ;\n\t\t\t}\n /**\n\t\t if (!feof($GestorArchivo)) {\n\t\t echo \"Error: fallo inesperado de fgets()\\n\";\n\t\t $TotalRegErr=FALLA;\n\t\t }\n\t\t **/\n\t\t fclose($GestorArchivo);\n\t\t} // fin Gestor archivo de datos\n\t} //Fin if (!$GestorArchivoErr) \n\treturn $TotalRegErr;\n}", "protected function processarHeaderArquivo($linha) {\n\t\t$vlinha = parent::processarHeaderArquivo($linha);\n\t\t\n\t\t//X = ALFANUMÉRICO 9 = NUMÉRICO V = VÍRGULA DECIMAL ASSUMIDA\n\t\t$vlinha[\"tipo_servico\"] = substr($linha, 12, 15); //LITERAL DE SERVIÇO - X Identificação por Extenso do Tipo de Serviço: \"COBRANCA\"\n\t\tunset($vlinha[\"complemento1\"]);\n\t\tunset($vlinha[\"dv_agencia_cedente\"]);\n\t\t$vlinha[\"complemento_registro\"] = substr($linha, 31, 2);//ZEROS - 9 COMPLEMENTO DE REGISTRO\n\t\t$vlinha[\"conta_cedente\"] = substr($linha, 33, 5); //CONTA - 9 Número da Conta Corrente onde está cadastrado o Convênio Líder do Cedente\n\t\t$vlinha[\"dac\"] = substr($linha, 38, 1); //DAC - 9 DÍGITO DE AUTO CONFERÊNCIA AG/CONTA EMPRESA\n\t\tunset($vlinha[\"dv_conta _cedente\"]);\n\t\t$vlinha[\"cod_banco\"] = substr($linha, 77, 3); //CÓDIGO DO BANCO - 9 NÚMERO DO BANCO NA CÂMARA DE COMPENSAÇÃO\n\t\t$vlinha[\"banco\"] = substr($linha, 80, 15); //NOME DO BANCO - X NOME POR EXTENSO DO BANCO COBRADOR\n\t\t$vlinha[\"densidade\"] = substr($linha, 101, 5); //DENSIDADE - 9 UNIDADE DA DENSIDADE \t\n\t\t$vlinha[\"uni_densidade\"] = substr($linha, 106, 3); //UNIDADE DE DENSID. - X DENSIDADE DE GRAVAÇÃO DO ARQUIVO \n\t\t$vlinha[\"num_seq_arquivo\"] = substr($linha, 109, 5); //Nº SEQ. ARQUIVO RET. - 9 NÚMERO SEQÜENCIAL DO ARQUIVO RETORNO \n\t\t$vlinha[\"data_credito\"] = $this->formataData(substr($linha, 114, 6)); //DATA DE CRÉDITO - 9 DATA DE CRÉDITO DOS LANÇAMENTOS\n\t\t$vlinha[\"uni_densidade\"] = substr($linha, 106, 3); //UNIDADE DE DENSID. - 9 DENSIDADE DE GRAVAÇÃO DO ARQUIVO \n\t\t\n\t\treturn $vlinha;\n\t}", "function validaLayOut($DataSrc,$SepCampo,$NumCampos){\n\t$Bandera = CERO;\n\t$ValidacionRegistro = array();\n\t$GestorArchivo = fopen($DataSrc, \"r\");\n\tif ($GestorArchivo){\n\t\t $Contador = UNO;\n\t\t $ContError= CERO;\n\t\t while (($Registro = fgets($GestorArchivo, 4096)) !== false){\n\t\t \t $ArrRegistro = explode($SepCampo,$Registro);\n\t\t \t $NumCamposRegistro = count($ArrRegistro);\n\t\t \t if ($NumCamposRegistro != $NumCampos and $ContError < 100){\n\t\t \t \tarray_push($ValidacionRegistro,$Contador . \"|\" . $Registro);\n\t\t \t \t$ContError++;\n\t\t \t }\n\t\t \t $Contador++;\n\t\t }// fin del while\t\n\t}// fin de if\n\treturn $ValidacionRegistro;\n}", "function fncValidaArchivo($IdEstado, $Path,$Archivo)\n{\n\t$TotalRegErr = CERO;\n \t$ContadorRegistros=UNO;\n \t\n \t$ContadorErrorDI = InicializaArray(80);\n\n \t$GestorArchivoErr = fopen($Path.$Archivo.\".err\", \"w\");\n \tif (!$GestorArchivoErr) \n\t{\n\t\techo \"Error al abrir archivo Error >>\".$Path.$Archivo.\".err\" .\"<<\";\n\t}\n\telse{\n\t\t$GestorArchivo = fopen($Path.$Archivo, \"r\");\n\t\tif ($GestorArchivo) \n\t\t{\n\t\t while (($Registro = fgets($GestorArchivo, 4096)) !== false) \n\t\t {\n\t\t \t$BanderaRegistr=0;\n\t\t // echo \"Resgistro >>\" . $Registro .\"<<\";\n\t\t $ArrRegistro = explode(\"|\",$Registro);\n\t\t $NumEmpl= $ArrRegistro[0];\n\t\t $NumFili= $ArrRegistro[1];\n\t\t $CURP= $ArrRegistro[2];\n\n\t\t $NombreEmpleado = $ArrRegistro[3];\n\t\t $BancoNvo= $ArrRegistro[SEIS];\n\t\t $NumCta = $ArrRegistro[SIETE];\n\t\t $CLABE= $ArrRegistro[OCHO];\n\t\t $CveSPC= $ArrRegistro[NUEVE];\n\t\t $UR= $ArrRegistro[14];\n\t\t $GF= $ArrRegistro[15];\n\t\t $Fun= $ArrRegistro[16];\n\t\t $SFun= $ArrRegistro[17];\n\t\t $PG= $ArrRegistro[18];\n\t\t $AI= $ArrRegistro[19];\n\t\t $PP= $ArrRegistro[20];\n\t\t $Ptda= $ArrRegistro[21];\n\t\t $Pto= $ArrRegistro[22];\n\t\t $NumPto= $ArrRegistro[23];\n\t\t $Edo= $ArrRegistro[24];\n\t\t $Mpio= $ArrRegistro[25];\n\t\t $CenRes= $ArrRegistro[26];\n\t\t $NSS= $ArrRegistro[27];\n\t\t $Pagdria= $ArrRegistro[28];\n\t\t $FteFin = $ArrRegistro[29];\n\t\t $TabPto = $ArrRegistro[30];\n\t\t $NIVEL = $ArrRegistro[31];\n\t\t $Rango = $ArrRegistro[32];\n\t\t $IndMando = $ArrRegistro[33];\n\t\t $Horario = $ArrRegistro[34];\n\t\t // el campo 36 queda libre\n\t\t $TipTra = $ArrRegistro[36];\n\t\t $NivSPC= $ArrRegistro[37];\n\t\t $IndStat= $ArrRegistro[38];\n\t\t $FecIng= $ArrRegistro[39];\n\t\t $FecIngSS= $ArrRegistro[40];\n\t\t $FecReIng= $ArrRegistro[41];\n\t\t\t\t$FecPag= $ArrRegistro[43];\n\n\t\t\t\t$PerPagIni= $ArrRegistro[44];\n\t\t\t\t$PerPagFin= $ArrRegistro[45];\n\t\t\t\t$PerAppIni= $ArrRegistro[46];\n\t\t\t\t$PerAppFin= $ArrRegistro[47];\n\n\t\t\t\t\n\n\t\t\t\t$QnaProReal= $ArrRegistro[48];\n\t\t\t\t$AnioProReal= $ArrRegistro[49];\n\n\t\t\t\t$TipoPago = $ArrRegistro[50];\n\t\t\t\t// no va (52) Instrumento de Pago Anterior (Libre) \n\t\t\t\t$IntrPagoNvo = $ArrRegistro[52];\n\t\t\t\t$Prpcns = $ArrRegistro[53];\n\t\t\t\t$Dedcns = $ArrRegistro[54];\n\t\t\t\t$Neto = $ArrRegistro[55];\n\t\t\t\t$NumTrail = $ArrRegistro[56];\n\t\t\t\t$NomProd = $ArrRegistro[58];\n\t\t\t\t$NumCtrl = $ArrRegistro[59];\n\t\t\t\t$NumCque = $ArrRegistro[60];\n\t\t\t\t// no hay regla 61\n\t\t\t\t$Jnda = $ArrRegistro[62];\n\t\t\t\t// no hay 63 Número de Días de Prima Dominical (Libre)\n\t\t\t\t$CicloFONAC = $ArrRegistro[64];\n\t\t\t\t$NumAportFONAC= $ArrRegistro[65];\n\t\t\t\t$AcumuladoFONAC= $ArrRegistro[66];\n\t\t\t\t// no hay 67 Número de faltas en la quincena (Libre)\n\t\t\t\t$LicCLUES = $ArrRegistro[68];\n\n\t\t\t\t$PorcPen1 = $ArrRegistro[69];\n\t\t\t\t$PorcPen2 = $ArrRegistro[70];\n\t\t\t\t$PorcPen3 = $ArrRegistro[71];\n\t\t\t\t$PorcPen4 = $ArrRegistro[72];\n\t\t\t\t$PorcPen5 = $ArrRegistro[73];\n\n\t\t\t\t$ElecTipRtro = $ArrRegistro[74];\t\t\t\t\n\t\t\t\t$TipUni = $ArrRegistro[75];\t\t\t\t\n\t\t\t\t$DescCR = $ArrRegistro[76];\t\t\t\t\n\n\t\t $ValidaError = fncValidaDI_1($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumEmpl);\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[UNO]++;\t\t \t\n\t\t\t\t}\n//break;\n\t\t\t\t$ValidaError = fncValidaDI_2($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumFili, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DOS]++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ValidaError = fncValidaDI_3($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CURP, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[TRES]++;\t\t \t\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_4($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NombreEmpleado);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_7($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $BancoNvo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_8($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumCta);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[OCHO]++; \t\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_9($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CLABE);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_10($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CveSPC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_15($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $UR);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_16($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $GF);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_17($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Fun);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_18($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $SFun);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_19($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PG);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_20($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $AI);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_21($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PP);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_22($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Ptda);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DOS]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_23($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Pto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_24($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NumPto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_25($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Edo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_26($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Mpio);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_27($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $CenRes);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_28($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NSS);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_29($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Pagdria);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_30($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FteFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_31($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $TabPto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_32($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NIVEL);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DOS]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_33($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Rango);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_34($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $IndMando);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + CUATRO]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_35($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $Horario);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t// campo 36 queda libre\n\n\t\t\t\t$ValidaError = fncValidaDI_37($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $TipTra);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_38($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $NivSPC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_39($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $IndStat);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_40($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecIng);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_41($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecIngSS, $FecIng);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_42($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecReIng,$FecIngSS);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ DOS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_44($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $FecPag);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_45($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerPagIni,$PerPagFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ CINCO]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_46($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerPagFin, $PerPagIni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_47($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerAppIni, $PerAppFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ SIETE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_48($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $PerAppFin, $PerAppIni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ OCHO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_49($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t\t$ContadorRegistros, $QnaProReal);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ + DIEZ + DIEZ + DIEZ+ NUEVE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_50($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $AnioProReal,$PerPagIni,$PerPagFin);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_51($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $TipoPago);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_53($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $IntrPagoNvo);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_54($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Prpcns);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_55($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Dedcns);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_56($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Neto);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_57($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumTrail);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_59($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NomProd);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * CINCO + NUEVE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_60($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumCtrl);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_61($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumCque);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + UNO]++;\n\t\t\t\t}\n\t\t\t\t$ValidaError = fncValidaDI_63($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $Jnda);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_65($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $CicloFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_66($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $NumAportFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_67($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $AcumuladoFONAC);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + SIETE]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_69($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $LicCLUES );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SEIS + NUEVE]++;\n\t\t\t\t}\n\n\n\t\t\t\t$ValidaError = fncValidaDI_70($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen1 );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE ]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_71($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen2 );\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + UNO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_72($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen3);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + DOS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_73($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen4);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + TRES]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_74($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $PorcPen5);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + CUATRO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_75($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $ElecTipRtro);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + CINCO]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_76($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $TipUni);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + SEIS]++;\n\t\t\t\t}\n\n\t\t\t\t$ValidaError = fncValidaDI_77($IdEstado, $GestorArchivoErr, \n\t\t \t\t\t\t\t$ContadorRegistros, $DescCR);\t\n\t\t if($ValidaError!=0){\n\t\t\t\t\t$ContadorErrorDI[DIEZ * SIETE + SIETE]++;\n\t\t\t\t}\n\t\t\n\t\t $ContadorRegistros++;\n\t\t }\n\n\t\t foreach ($ContadorErrorDI as &$valor) {\n \t\t\t\t \t\t$TotalRegErr = $TotalRegErr + $valor ;\n\t\t\t}\n /**\n\t\t if (!feof($GestorArchivo)) {\n\t\t echo \"Error: fallo inesperado de fgets()\\n\";\n\t\t $TotalRegErr=FALLA;\n\t\t }\n\t\t **/\n\t\t fclose($GestorArchivo);\n\t\t} // fin Gestor archivo de datos\n\t} //Fin if (!$GestorArchivoErr) \n\treturn $TotalRegErr;\n}", "public function __construct($ruta)\n {\n $rutas = require 'rutas.php';\n $controlador_defecto = '';\n foreach ($rutas as $r) {\n // Si el patrón de esta ruta es vacío, lo guardamos, y continuamos\n if ($r[0] == '') {\n $controlador_defecto = $r[1];\n continue;\n }\n\n $matches = [];\n if (preg_match(\"%{$r[0]}%\", $ruta, $matches) === 1) {\n\n // Convertimos los keys de matches en 'variables' para\n // reemplazar en otros lugares\n $reempl = [];\n foreach ($matches as $llave => $valor) {\n $reempl[\"{{$llave}}\"] = $valor;\n }\n\n // Reemplazamos los valores en el controlador\n $this->controlador = strtr($r[1], $reempl);\n\n // Reemplazamos los valores en los parámetros, si hay\n $params = [];\n if (isset($r[2])) {\n foreach ($r[2] as $llave => $valor) {\n $params[strtr($llave, $reempl)] = strtr($valor, $reempl);\n }\n $params = $r[2];\n }\n\n // Le añadimos los valores obtenidos de la ruta\n $this->parámetros = array_merge($params, $matches);\n\n // Y salimos del bucle\n break;\n }\n }\n\n // Si la ruta es vacía, y existe un controlador por defecto, lo usamos\n if ($ruta == '' && $controlador_defecto) {\n $this->controlador = $controlador_defecto;\n }\n\n }", "public function txtRawDataToArray()\n {\n // Separa uma linha do array pra cada linha, sse código consigo prever\n // tipos dferentes de quebrada de linha\n $tempData = preg_split(\"/\\\\r\\\\n|\\\\r|\\\\n/\", $this->rawData);\n $i = 0;\n\n foreach ($tempData as $key => $value) {\n // Divido cada linha por seu separar e agora dentro de cada linha tb\n // tenho um array com os campos do produto divididos\n $value = explode($this->txtSeparator, $value);\n\n if (count($value) == 3) {\n $this->data[$i]['ean'] = $value[0];\n $this->data[$i]['nome'] = $value[1];\n $this->data[$i]['setor'] = $value[2];\n }\n\n $i++;\n }\n\n $this->totalProdutos = count($this->data);\n\n // Aqui aproveito e checo se o total de produtos está acima do permitido\n if ($this->totalProdutos > $this->_maximoProdutosPermitido) {\n throw new \\Exception(__(\"O arquivo possui {0} produtos para deve conter no máximo {1}\", $this->totalProdutos, $this->_maximoProdutosPermitido));\n }\n }", "function Comprobar_NOMBREPROFESOR(){\n\t\t\t$arrayNOMBREPROFESOR=array(); //definicion de array temporal\n\t\t\t$correcto = true; //variable de control\n\n\t\t\t//si no cumple la expresión regular\n\t\t\tif(strlen($this->nombreProfesor)==0 || $this->nombreProfesor==null || preg_match(\"/(^\\s+$)/\", $this->nombreProfesor)){\n\t\t\t\t$error = 'Atributo vacío'; //error\n\t\t\t\t$array = array('nombreatributo' => $this->nombreProfesor, 'codigoincidencia' => '00001', 'mensajeerror' => $error); //array errores\n\t\t\t\tarray_push($arrayNOMBREPROFESOR, $array);\n\t\t\t\t$correcto=false;\n\t\t\t} //fin comprobacion vacio\n\t\t\t//si el nº de letras del nombre es menor que tres\n\t\t\tif (strlen($this->nombreProfesor)<3){\n\t\t\t\t//mensaje de error\n\t\t\t\t$error = 'Valor de atributo no numérico demasiado corto';\n\t\t\t\t$array = array('nombreatributo' =>$this->nombreProfesor, 'codigoincidencia' =>'00003', 'mensajeerror' => $error); //errores\n\t\t\t\t//introduce el mensaje en el rray de errores\n\t\t\t\tarray_push($arrayNOMBREPROFESOR, $array);\n\n\t\t\t\t//cambia correcto a false\n\t\t\t\t$correcto = false;\n\n\t\t\t}//fin comprobación longitud <3\n\n\t\t\t//si el nº de letras del nombre es mayor que 30\n\t\t\tif (strlen($this->nombreProfesor)>15){\n\n\t\t\t\t//crea mensaje de error\n\t\t\t\t$error = 'Valor de atributo demasiado largo';\n\t\t\t\t$array = array('nombreatributo' =>$this->nombreProfesor, 'codigoincidencia' =>'00002', 'mensajeerror' => $error); //errores\n\t\t\t\t//intrudce el mensaje en el array de errores\n\t\t\t\tarray_push($arrayNOMBREPROFESOR, $array);\n\n\t\t\t\t//establece correcto a false\n\t\t\t\t$correcto = false;\n\t\t\n\t\t\t}//fin comprobación nº letras >30\n\t\t\t//si no se cumple la expresión regular\n\t\t\tif (!preg_match(\"/^[a-zA-ZñÑáéíóúÁÉÍÓÚüÜïÏ]+(\\s*[a-zA-ZA-ZñÑáéíóúÁÉÍÓÚüÜïÏ]*)+$/\",$this->nombreProfesor)){\n\n\t\t\t\t//guarda mensaje de error\n\t\t\t\t$error = 'Solo están permitidas alfabéticos';\n\t\t\t\t$array = array( 'nombreatributo' =>$this->nombreProfesor, 'codigoincidencia' =>'00030', 'mensajeerror' => $error);//error\n\t\t\t\t//añade el error al array\n\t\t\t\tarray_push($arrayNOMBREPROFESOR, $array);\n\n\t\t\t\t//establece correcto a falso\n\t\t\t\t$correcto = false;\n\t\t\n\t\t\t}//fin comprobación expresión regular\n\t\t\t//comprobacion errores\n\t\t\tif($correcto==true){\n\t\t\t\t//devuelve el valor de correcto\n\t\t\t\treturn $correcto;\n\t\t\t\t}else{ //si errores\n\t\t\t\t\treturn $arrayNOMBREPROFESOR;\n\t\t\t\t} //fin\n\t\t}", "public function processar()\n {\n $retorno = new Retorno();\n $lote = null;\n\n $lines = file($this->processor->getNomeArquivo(), FILE_IGNORE_NEW_LINES);\n foreach ($lines as $lineNumber => $lineContent) {\n $string = new Stringy(rtrim($lineContent, \"\\r\\n\"));\n $composable = $this->processor->processarLinha($lineNumber, $string);\n\n if ($this->processor->needToCreateLote()) {\n $lote = $this->createLote($retorno);\n }\n\n $this->processor->processCnab($retorno, $composable, $lote);\n\n $event = new OnDetailRegisterEvent($this->processor, $lineNumber, $composable);\n $this->dispatcher->dispatch(RetornoEvents::ON_DETAIL_REGISTER, $event);\n }\n\n return $retorno;\n }", "function comprobar_NOMBREPROFESOR()\n{\n\t$errores = array();\n\t$correcto=true;\n //Compruebo si el valor es null o no es vacio\n if (($this->nombre == null) || (strlen($this->nombre) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"NOMBREPROFESOR\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n\tif(strlen($this->nombre)<3){\n\t $mensajeError = array (\n \"nombreatributo\" => \"NOMBREPROFESOR\",\n \"codigoincidencia\" => \"00003\",\n \"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\t\nif(strlen($this->nombre)>15){\n\t $mensajeError = array (\n \"nombreatributo\" => 'NOMBREPROFESOR',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\tif (!preg_match(\"/^[a-zA-ZñÑáéíóúÁÉÍÓÚ\\s]+$/\",$this->nombre)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'NOMBREPROFESOR',\n \"codigoincidencia\" => \"00090\",\n \"mensajeerror\" => \"Solo se permiten alfabéticos\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "function parcours_depart($fichier){\n if(is_string($fichier)){\n try{\n $fichier = fopen($fichier, 'r');\n }catch (Exeption $e){\n echo \"Erreur : \". $e->getMessage().\"<br>\";\n return NULL;\n }\n }\n\n $listeSkieurs = array();\n $premiereLigne = TRUE;\n while(!feof($fichier)){\n $ligne = fgets($fichier);\n if($premiereLigne){$echgval = $ligne; $ligneTest = $echgval; $premiereLigne = FALSE;}\n\n if($ligne==$ligneTest){\n $nvoSkieur = new Skieur;\n\n $nvoSkieur->dossard = $dossard = intval(fgets($fichier)); \n $nvoSkieur->nom = fgets($fichier); \n $nvoSkieur->prenom = fgets($fichier); \n $nvoSkieur->pays = fgets($fichier); \n \n $echgNvoSkieur = $nvoSkieur;\n $listeSkieurs[$dossard] = $echgNvoSkieur;\n }\n }\n return $listeSkieurs;\n}", "function PCO_CargarObjetoTextoFormato($registro_campos,$registro_datos_formulario,$existe_campo_textoformato)\n\t{\n\t\tglobal $PCO_CampoBusquedaBD,$PCO_ValorBusquedaBD;\n\t\tglobal $MULTILANG_TitValorUnico,$MULTILANG_DesValorUnico,$MULTILANG_TitObligatorio,$MULTILANG_DesObligatorio;\n global $TabIndex_Elemento;\n\n\t\t$salida='';\n\t\t$nombre_campo=$registro_campos[\"campo\"];\n\n\t\t// Define cadenas de tamano de campo\n\t\t$cadena_ancho_visual=' cols=\"'.$registro_campos[\"ancho\"].'\" ';\n\t\t$cadena_alto_visual=' rows=\"'.$registro_campos[\"alto\"].'\" ';\n\t\t$cadena_longitud_visual=$cadena_ancho_visual.$cadena_alto_visual;\n\n\t\t// Define cadena en caso de tener valor predeterminado o el valor tomado desde el registro buscado\n\t\t$cadena_valor='';\n\t\tif ($registro_campos[\"valor_predeterminado\"]!=\"\") $cadena_valor=$registro_campos[\"valor_predeterminado\"];\n\t\t//Evalua si el valor predeterminado tiene signo $ al comienzo y ademas es una variable definida para poner su valor.\n\t\tif (substr($registro_campos[\"valor_predeterminado\"], 0,1)==\"$\")\n\t\t\t{\n\t\t\t\t$nombre_variable = substr($registro_campos[\"valor_predeterminado\"], 1);\n\t\t\t\tglobal ${$nombre_variable};\n\t\t\t\tif (isset($nombre_variable))\n\t\t\t\t\t{\n\t\t\t\t\t\t$valor_variable=${$nombre_variable};\n\t\t\t\t\t\t$cadena_valor=' value=\"'.$valor_variable.'\" ';\n\t\t\t\t\t}\n\t\t\t}\n\t\tif ($PCO_CampoBusquedaBD!=\"\" && $PCO_ValorBusquedaBD!=\"\") $cadena_valor=$registro_datos_formulario[\"$nombre_campo\"];\n\n\t\t// Muestra el campo\n\t\t$salida.= '<textarea tabindex=\"'.$TabIndex_Elemento.'\" id=\"'.$registro_campos[\"id_html\"].'\" name=\"'.$registro_campos[\"campo\"].'\" '.$cadena_longitud_visual.' '.$registro_campos[\"solo_lectura\"].' '.$registro_campos[\"personalizacion_tag\"].' >'.$cadena_valor.'</textarea>';\n\n\t\t// Define las barras posibles para el editor\n\t\t$barra_documento=\"'sourceEditing','|','heading'\";\n\t\t$barra_basica=\"'bold', 'italic', 'underline', 'strikethrough','subscript','superscript','|','removeFormat'\";\n\t\t$barra_parrafo=\"'numberedList','bulletedList','|','outdent','indent','|','blockQuote','|','alignment'\";\n\t\t$barra_enlaces=\"'link'\";\n\t\t$barra_estilos=\"'fontSize','fontFamily'\";\n\t\t$barra_portapapeles=\"'|','undo','redo'\";\n\t\t$barra_edicion=\"'findAndReplace','selectAll','|'\";\n\t\t$barra_insertar=\"'insertTable','horizontalLine','specialCharacters','pageBreak','htmlEmbed'\";\n\t\t$barra_colores=\"'fontColor','fontBackgroundColor','highlight'\";\n\t\t$barra_formularios=\"\"; //DEPRECATED en version 5\n\t\t$barra_otros=\"'code', 'codeBlock'\";\n\n\t\t// Construye las barras de herramientas de acuerdo a la seleccion del usuario\n\t\t@$barra_editor.=\"'|'\";\n\t\tif ($registro_campos[\"barra_herramientas\"]==\"0\")\n\t\t\t{\n\t\t\t\t$barra_editor.=\",\".$barra_documento;\n\t\t\t\t$barra_editor.=\",\".$barra_basica;\n\t\t\t\t$barra_editor.=\",\".$barra_parrafo;\n\t\t\t}\n\t\tif ($registro_campos[\"barra_herramientas\"]==\"1\")\n\t\t\t{\n\t\t\t\t$barra_editor.=\",\".$barra_documento;\n\t\t\t\t$barra_editor.=\",\".$barra_basica;\n\t\t\t\t$barra_editor.=\",\".$barra_parrafo;\n\t\t\t\t$barra_editor.=\",\".$barra_enlaces;\n\t\t\t\t$barra_editor.=\",\".$barra_estilos;\n\t\t\t}\n\t\tif ($registro_campos[\"barra_herramientas\"]==\"2\")\n\t\t\t{\n\t\t\t\t$barra_editor.=\",\".$barra_documento;\n\t\t\t\t$barra_editor.=\",\".$barra_basica;\n\t\t\t\t$barra_editor.=\",\".$barra_parrafo;\n\t\t\t\t$barra_editor.=\",\".$barra_enlaces;\n\t\t\t\t$barra_editor.=\",\".$barra_estilos;\n\t\t\t\t$barra_editor.=\",\".$barra_portapapeles;\n\t\t\t\t$barra_editor.=\",\".$barra_edicion;\n\t\t\t}\n\t\tif ($registro_campos[\"barra_herramientas\"]==\"3\")\n\t\t\t{\n\t\t\t\t$barra_editor.=\",\".$barra_documento;\n\t\t\t\t$barra_editor.=\",\".$barra_basica;\n\t\t\t\t$barra_editor.=\",\".$barra_parrafo;\n\t\t\t\t$barra_editor.=\",\".$barra_enlaces;\n\t\t\t\t$barra_editor.=\",\".$barra_estilos;\n\t\t\t\t$barra_editor.=\",\".$barra_portapapeles;\n\t\t\t\t$barra_editor.=\",\".$barra_edicion;\n\t\t\t\t$barra_editor.=\",\".$barra_insertar;\n\t\t\t\t$barra_editor.=\",\".$barra_colores;\n\t\t\t}\n\t\tif ($registro_campos[\"barra_herramientas\"]==\"4\")\n\t\t\t{\n\t\t\t\t$barra_editor.=\",\".$barra_documento;\n\t\t\t\t$barra_editor.=\",\".$barra_basica;\n\t\t\t\t$barra_editor.=\",\".$barra_parrafo;\n\t\t\t\t$barra_editor.=\",\".$barra_enlaces;\n\t\t\t\t$barra_editor.=\",\".$barra_estilos;\n\t\t\t\t$barra_editor.=\",\".$barra_portapapeles;\n\t\t\t\t$barra_editor.=\",\".$barra_edicion;\n\t\t\t\t$barra_editor.=\",\".$barra_insertar;\n\t\t\t\t$barra_editor.=\",\".$barra_colores;\n\t\t\t\t//$barra_editor.=\",\".$barra_formularios;\n\t\t\t\t$barra_editor.=\",\".$barra_otros;\n\t\t\t}\n\t\t// Aplica el script del ckeditor al campo\n\t\tif (!$existe_campo_textoformato)\n\t\t\t$salida.= '<script type=\"text/javascript\" src=\"inc/ckeditor/ckeditor.js\"></script>';\n\t\t\n\t\t//Determina si se requiere un tamano especifico del control y lo usa, sino lo deja en blanco para responsive\n\t\t\n\t\t$CadenaTamanoControl='';\n\t\tif ($registro_campos[\"alto\"]!=\"\" && $registro_campos[\"alto\"]!=\"0\" && $registro_campos[\"ancho\"]!=\"\" && $registro_campos[\"ancho\"]!=\"0\")\n\t\t $CadenaTamanoControl=' editor.ui.element.style.height = \"'.$registro_campos[\"alto\"].'px\";\n \t\t\t editor.ui.element.style.width = \"'.$registro_campos[\"ancho\"].'px\";';\n\t\t\n\t\t$salida.= '<script>\n \tClassicEditor\n \t\t.create( document.querySelector( \"#'.$registro_campos[\"id_html\"].'\" ), {\n \t\t\ttoolbar: [ '.$barra_editor.' ]\n \t\t} )\n \t\t.then( editor => {\n \t\t\twindow.editor = editor;\n \t\t\t'.$CadenaTamanoControl.'\n \t\t} )\n \t\t.catch( err => {\n \t\t\tconsole.error( err.stack );\n \t\t} );\n </script>';\n\n\t\t// Muestra indicadores de obligatoriedad o ayuda\n\t\tif ($registro_campos[\"obligatorio\"]) $salida.= '<a href=\"#\" data-toggle=\"tooltip\" data-html=\"true\" data-placement=\"auto\" title=\"<b>'.$MULTILANG_TitObligatorio.'</b><br>'.$MULTILANG_DesObligatorio.'\"><i class=\"fa fa-exclamation-triangle icon-orange\"></i></a>';\n\t\tif ($registro_campos[\"ayuda_titulo\"] != \"\") $salida.= '<a href=\"#\" data-toggle=\"tooltip\" data-html=\"true\" data-placement=\"auto\" title=\"<b>'.PCO_ReemplazarVariablesPHPEnCadena($registro_campos[\"ayuda_titulo\"],$registro_datos_formulario).'</b><br>'.PCO_ReemplazarVariablesPHPEnCadena($registro_campos[\"ayuda_texto\"],$registro_datos_formulario).'\"><i class=\"fa fa-question-circle\"></i></a>';\n\n\t\t//Activa booleana de existencia de tipo de campo para evitar doble inclusion de javascript\n\t\t$existe_campo_textoformato=1;\n\t\treturn $salida;\n\t}", "function scriviArray ($arContenuto, $file){\r\n $arContenuto = str_replace(['Array','(',')'], '', print_r($arContenuto, true));\r\n \r\n if(!is_file($file)){\r\n file_put_contents($file, print_r($arContenuto, true));\r\n };\r\n }", "function comprobar_apellidos()\n\t{\n\t$correcto = true; //variable booleana que comprueba si el atributo cuumple o no lo especificado\n\n\t//si los atributos estan vacios\n\tif (strlen($this->apellidos) == 0)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00001\" ,\"mensajeerror\" => \"apellidos vacio\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\t//si los atributos estan vacios\n\tif (strlen($this->apellidos) > 51)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00002\" ,\"mensajeerror\" => \"apellidos demasiado largo, maximo 10 caracteres\"]);\n\n\t\t$correcto = false;\t\t}\n\n\tif (strlen($this->apellidos) < 3)\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"]);\n\n\t\t$correcto = false;\n\t}\n\n\t//si los atributos son alfabeticos\n\tif (ctype_alpha($this->apellidos))\n\t{\n\t\tarray_push($this->erroresdatos, [\"nombreatributo\" => \"apellidos\", \"codigoincidencia\" => \"00003\" ,\"mensajeerror\" => \"apellidos no valido, solo se admiten caracteres\"]);\n\n\t\t$correcto = false;\t\n\t}\n\n\treturn $correcto;\n}", "function comprobar_fotopersonal(){\n\n\t$errores = array();\n\t$correcto=true;\n\t//Compruebo si es nulo o vacio\n if (($this->fotopersonal == null) || (strlen($this->fotopersonal) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"fotopersonal\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n //Compruebo si es menor que 3\n\tif(strlen($this->fotopersonal)<3){\n\t $mensajeError = array (\n \"nombreatributo\" => \"fotopersonal\",\n \"codigoincidencia\" => \"00003\",\n \"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n//Compruebo si es mayor que 50\nif(strlen($this->fotopersonal)>50){\n\t $mensajeError = array (\n \"nombreatributo\" => 'fotopersonal',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n//Compruebo que el formato de la fotopersonal sea el correcto\n\tif (preg_match(\"/([\\/:*?\\\"<>|])/\",$this->fotopersonal)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'fotopersonal',\n \"codigoincidencia\" => \"000130\",\n \"mensajeerror\" => \"Nombre del archivo no válido\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "public function validaDados()\n {\n $msg = ['error' => '', 'nameFile' => ''];\n\n if (!strlen(trim($this->nome))) {\n $msg['error'] .= 'Nome do produto obrigatório! <br>';\n }\n\n if (!strlen(trim($this->descricao))) {\n $msg['error'] .= 'Descrição do produto obrigatório! <br>';\n }\n\n if (!strlen(trim($this->valor))) {\n $msg['error'] .= 'Valor do produto obrigatório! <br>';\n }\n\n if (!strlen($msg['error'])) {\n $validFile = $this->validaArquivoInserido();\n $msg['error'] .= $validFile['error'];\n $msg['nameFile'] = $validFile['nameFile'];\n }\n\n $msg['error'] = $this->getMsgFormat($msg['error'], 'alert-danger');\n\n return $msg;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prevents OptimizeMember from intefering with our ajax user search
function affwp_optimize_member_user_query( $search_term = '' ) { remove_action( 'pre_user_query', 'c_ws_plugin__optimizemember_users_list::users_list_query', 10 ); }
[ "public function searchprocessAction() {\r\n\t\t$this->_helper->ajaxgrid->setConfig ( AdminUser::grid() )->search ();\r\n\t}", "function zaxu_disable_search_function($obj) {\n if ( $obj->is_search && $obj->is_main_query() ) {\n unset( $_GET['s'] );\n unset( $_POST['s'] );\n unset( $_REQUEST['s'] );\n unset( $obj->query['s'] );\n $obj->set('s', '');\n $obj->is_search = false;\n $obj->set_404();\n status_header(404);\n nocache_headers();\n }\n }", "public function memberSearchAjax()\n {\n header('Content-Type: text/plain; encoding=utf-8');\n if (empty($this->route_vars['search_term']) || empty($this->route_vars['group_id']) || !($group = $this->_model->findGroup($this->route_vars['group_id'])) || !$this->_model->getLoggedInMember() || ($group->Status != 'Public' && $this->_model->getLoggedInMember()->getPKValue() != $group->getGroupOwner()->getPKValue()))\n {\n header('Status: 500 Fudged it');\n exit;\n }\n $members = $this->_model->findMembersByName($group, $this->route_vars['search_term']);\n $output = array();\n foreach ($members as $member)\n {\n $output[$member->Username] = $member->getPKValue();\n }\n echo json_encode($output);\n exit;\n }", "function hide_pagespeed_suggestion() {\n\t\t\tupdate_site_option( WP_SMUSH_PREFIX . 'hide_pagespeed_suggestion', true );\n\t\t\twp_send_json_success();\n\t\t}", "function _searchDisable() {\n\t$this->_searchEnabled = false;\n\treturn false;\n\t}", "function give_ajax_donor_search() {\n\tglobal $wpdb;\n\n\t$search = esc_sql( sanitize_text_field( $_POST['s'] ) );\n\t$results = array();\n\tif ( ! current_user_can( 'view_give_reports' ) ) {\n\t\t$donors = array();\n\t} else {\n\t\t$donors = $wpdb->get_results( \"SELECT id,name,email FROM $wpdb->donors WHERE `name` LIKE '%$search%' OR `email` LIKE '%$search%' LIMIT 50\" );\n\t}\n\n\tif ( $donors ) {\n\t\tforeach ( $donors as $donor ) {\n\n\t\t\t$results[] = array(\n\t\t\t\t'id' => $donor->id,\n\t\t\t\t'name' => $donor->name . ' (' . $donor->email . ')',\n\t\t\t);\n\t\t}\n\t}\n\n\twp_send_json( $results );\n}", "function do_member_mini_search()\n\t{\n\t\t\t$redirect_url = $this->_member_path('member_mini_search');\n\n\t\t/** -------------------------------------\n\t\t/** Parse the $_POST data\n\t\t/** -------------------------------------*/\n\t\tif ($_POST['screen_name'] \t== '' &&\n\t\t\t$_POST['email'] \t\t== ''\n\t\t\t)\n\t\t\t{\n\t\t\t\tee()->functions->redirect($redirect_url);\n\t\t\t\texit;\n\t\t\t}\n\n\t\t$search_query = array();\n\n\t\tforeach ($_POST as $key => $val)\n\t\t{\n\t\t\tif ($key == 'group_id')\n\t\t\t{\n\t\t\t\tif ($val != 'any')\n\t\t\t\t{\n\t\t\t\t\t$search_query[] = \" group_id ='\".ee()->db->escape_str($_POST['group_id']).\"'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($val != '')\n\t\t\t\t{\n\t\t\t\t\t$search_query[] = $key.\" LIKE '%\".ee()->db->escape_like_str($val).\"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (count($search_query) < 1)\n\t\t{\n\t\t\tee()->functions->redirect($redirect_url);\n\t\t\texit;\n\t\t}\n\n \t\t$Q = implode(\" AND \", $search_query);\n\n\t\t$sql = \"SELECT DISTINCT exp_members.member_id, exp_members.screen_name FROM exp_members, exp_member_groups\n\t\t\t\tWHERE exp_members.group_id = exp_member_groups.group_id AND exp_member_groups.site_id = '\".ee()->db->escape_str(ee()->config->item('site_id')).\"'\n\t\t\t\tAND \".$Q;\n\n\t\t$query = ee()->db->query($sql);\n\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\treturn $this->member_mini_search(ee()->lang->line('no_search_results'));\n\t\t}\n\n\t\t$r = '';\n\n\t\tforeach($query->result_array() as $row)\n\t\t{\n\t\t\t$item = '<a href=\"#\" onclick=\"opener.dynamic_action(\\'add\\');opener.list_addition(\\''.$row['screen_name'].'\\', \\'name\\');return false;\">'.$row['screen_name'].'</a>';\n\t\t\t$r .= $this->_var_swap($this->_load_element('member_results_row'),\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'item' => $item\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn $this->_var_swap($this->_load_element('member_results'),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'include:search_results'\t=> $r,\n\t\t\t\t\t\t\t\t\t\t'path:new_search_url'\t\t=> $redirect_url,\n\t\t\t\t\t\t\t\t\t\t'which_field'\t\t\t\t=> 'name'\t\t// not used in this instance; probably will log a minor js error\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t}", "public function adminAjax()\r\n\t{\r\n\t\treturn;\r\n\t}", "function admin_search() {\n\n\t//AJAX request\n\n\n\t//if ( $this->RequestHandler->isAjax() ) {\n\n\t$condition = array();\n\n\t//If Data submitted through search form\n\n\tif( !empty($this->data) ) {\n\n\t//Search by ... (anyfield)\n\n\tforeach ( $this->data['User'] AS $key=>$value ){\n\n\tif ( !empty($value) ){\n\n\t$condition[] .= $key. ' LIKE \"%'.$value.'%\" ';\n\n\t}\n\n\t} \n \n // $condition[] .= $key. '= '.$value.' ';\n // print_r($condition);\n\t$this->Session->write('condition', $condition);\n \n\t\n\n\t}//End: Check Submission\n\n\n\n\t$this->Session->check('condition') ? $condition = $this->Session->read('condition'):'' ;\n\t$condition[].= 'type=\"1\"';\n\n\t//fetches paged results\n\n\t$data = $this->paginate('User', $condition);\n\n\n\n\t$this->set('data', $data);\n\n\t$this->render('admin_search', 'ajax');\n\n\t//}\n\n\t}", "function bpmag_show_member_search(){\n ?>\n <div class=\"members-search-result search-result\">\n <h2 class=\"content-title\"><?php _e('Members',\"bpmag\");?></h2>\n <?php locate_template( array( 'members/members-loop.php' ), true ) ; ?>\n <?php global $members_template;\n\tif($members_template->total_member_count>1):?>\n <a href=\"<?php echo bp_get_root_domain().'/'. bp_get_members_slug().'/?s='.$_REQUEST['search-terms']?>\" ><?php _e(sprintf('View all %d matched Members',$members_template->total_member_count),\"bpmag\");?></a>\n\t<?php \tendif; ?>\n </div>\n<?php\t\n }", "protected function should_search_users() {\n\t\treturn ! empty( $this->user_fields ) && in_array( $this->field, $this->user_fields );\n\t}", "public function doMemberSearch()\n\t{\n\t\t/* Make sure we have a search term */\n\t\tif( ! $this->request['search_term'] )\n\t\t{\n\t\t \t$this->registry->output->showError( $this->lang->words['stats_no_search_term'], 11737 );\n\t\t}\n\t\t\n\t\t$search_term = $this->DB->addSlashes( strtolower($this->request['search_term']) );\n\t\t\n\t\t/* Do the member search */\n\t\t$this->DB->build( array('select' => 'member_id, members_display_name', \n\t\t\t\t\t\t\t\t'from' => 'members',\n\t\t\t\t\t\t\t\t'order' => 'members_display_name ASC',\n\t\t\t\t\t\t\t\t'where' => \"members_l_username LIKE '%\" . $search_term . \"%' OR members_l_display_name LIKE '%\" . $search_term . \"%'\" \n\t\t\t\t\t\t )\t\t);\n\t\t$this->DB->execute();\n\n\t\t$result_cnt = $this->DB->getTotalRows();\n\n\t\t/* How many results.. */\n\t\tif( $result_cnt == 1 )\n\t\t{\n\t\t \t$i = $this->DB->fetch();\n\t\t \t$this->viewMemberReport( $i['member_id'] ); \n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Build the rows array */\n\t\t\t$rows = array();\n\n\t\t\twhile( $i = $this->DB->fetch() )\n\t\t\t{\n\t\t\t\t$rows[] = array( 'url' => \"{$this->settings['base_url']}{$this->form_code}do=domemsrch&amp;viewuser={$i['member_id']}\", 'name' => $i['members_display_name'] );\n\t\t\t}\n\t\t\t\n\t\t\t/* Output */\n\t\t\t$this->registry->output->html .= $this->html->statSearchResults( sprintf( $this->lang->words['stats_mem_results_cnt'], $result_cnt ), $rows );\n\t\t}\n\t}", "function gmw_ps_fl_enable_bp_groups_search_form_filter( $gmw ) {\n\n if ( 'members_locator' == $gmw['slug'] || 'members_locator_ajax' == $gmw['slug'] ) {\n gmw_search_form_bp_groups_filter( $gmw );\n }\n}", "function relevanssi_prevent_default_request( $request, $query ) {\n\tif ($query->is_search) {\n\t\tglobal $wpdb;\n\t\tif (isset($query->query_vars['post_type']) && isset($query->query_vars['post_status'])) {\n\t\t\tif ($query->query_vars['post_type'] == 'attachment' && $query->query_vars['post_status'] == 'inherit,private') {\n\t\t\t \t// this is a media library search; do not meddle\n\t\t\t \treturn $request;\n\t\t\t}\n\t\t}\n\t\t$bbpress = false;\n\t\tif ($query->query_vars['post_type'] == 'topic' || $query->query_vars['post_type'] == 'reply') $bbpress = true;\n\t\tif (is_array($query->query_vars['post_type'])) {\n\t\t \tif (in_array('topic', $query->query_vars['post_type'])) $bbpress = true;\n\t\t \tif (in_array('reply', $query->query_vars['post_type'])) $bbpress = true;\n\t\t}\n\t\tif ($bbpress) {\n\t\t\t// this is a BBPress search; do not meddle\n\t\t\treturn $request;\n\t\t}\n\t\t$admin_search_ok = true;\n\t\t$admin_search_ok = apply_filters('relevanssi_admin_search_ok', $admin_search_ok, $query );\n\n\t\t$prevent = true;\n\t\t$prevent = apply_filters('relevanssi_prevent_default_request', $prevent, $query );\n\n\t\tif (empty($query->query_vars['s'])) {\n\t\t\t$prevent = false;\n\t\t\t$admin_search_ok = false;\n\t\t}\n\n if ( $query->is_admin && defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\t$prevent = false;\n\t\t\t$admin_search_ok = false;\n\t\t}\n\n if ( $query->is_admin && $query->query_vars['post_type'] == 'page') {\n $prevent = false;\n\t\t\t$admin_search_ok = false;\n\t\t}\n\n\t\tif (!is_admin() && $prevent )\n\t\t\t$request = \"SELECT * FROM $wpdb->posts WHERE 1=2\";\n\t\telse if ('on' == get_option('relevanssi_admin_search') && $admin_search_ok )\n\t\t\t$request = \"SELECT * FROM $wpdb->posts WHERE 1=2\";\n\t}\n\treturn $request;\n}", "public static function disable_tags_auto_suggestion() {\n\t\tif( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\tif( isset( $_GET['action'] ) && $_GET['action'] == 'ajax-tag-search' && isset( $_GET['tax'] ) && $_GET['tax'] == 'glossary_tag' ) {\n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}", "public function ajax_addremove_friend() {\n\n\t\t\t// Bail if not a POST action\n\t\t\tif ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )\n\t\t\t\treturn;\n\n\t\t\t$user_id = bp_loggedin_user_id();\n\t\t\t$balance = $this->core->get_users_balance( $user_id, $this->mycred_type );\n\t\t\t$cost = abs( $this->prefs['new_friend']['creds'] );\n\n\t\t\t// Take into account any existing requests which will be charged when the new\n\t\t\t// friend approves it. Prevents users from requesting more then they can afford.\n\t\t\t$pending_requests = $this->count_pending_requests( $user_id );\n\t\t\tif ( $pending_requests > 0 )\n\t\t\t\t$cost = $cost + ( $cost * $pending_requests );\n\n\t\t\t// Prevent BP from running this ajax call\n\t\t\tif ( $balance < $cost ) {\n\t\t\t\techo apply_filters( 'mycred_bp_declined_addfriend', __( 'Insufficient Funds', 'twodayssss' ), $this );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "function AjaxSearch() {\n }", "protected function checkIfQueryIsForSearchingPurpose()\n {\n if( $this->request->isSearchable() )\n {\n $this->searchQuery();\n }\n }", "function ajax_filter()\n{\n\t$ci = & get_instance();\n\tif (!$ci->input->is_ajax_request())\n\t{\n\t\tshow_404();\n\t}\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the HTML for a toolbox ad (125x125).
public static function getToolboxHTML() { global $wgAdConfig; $skinName = self::determineSkin(); $adSlot = ''; if ( isset( $wgAdConfig[$skinName . '-button-ad-slot'] ) ) { $adSlot = $wgAdConfig[$skinName . '-button-ad-slot']; } if ( isset( $wgAdConfig['debug'] ) && $wgAdConfig['debug'] === true ) { return '<!-- Begin toolbox ad (ShoutWikiAds) --> <div id="p-ads-left" class="noprint"> <img src="http://www.google.com/help/hc/images/adsense_185665_adformat-text_125x125_en.png" alt="" /> </div> <!-- End toolbox ad (ShoutWikiAds) -->' . "\n"; } if ( isset( $wgAdConfig['mode'] ) && $wgAdConfig['mode'] == 'responsive' ) { $adHTML = '<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-' . $wgAdConfig['adsense-client'] . '" data-ad-slot="' . $adSlot . '" data-ad-format="rectangle"></ins> <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>'; } else { $borderColorMsg = wfMessage( 'shoutwiki-' . $skinName . '-toolbox-ad-color-border' )->inContentLanguage(); $colorBGMsg = wfMessage( 'shoutwiki-' . $skinName . '-toolbox-ad-color-bg' )->inContentLanguage(); $colorLinkMsg = wfMessage( 'shoutwiki-' . $skinName . '-toolbox-ad-color-link' )->inContentLanguage(); $colorTextMsg = wfMessage( 'shoutwiki-' . $skinName . '-toolbox-ad-color-text' )->inContentLanguage(); $colorURLMsg = wfMessage( 'shoutwiki-' . $skinName . '-toolbox-ad-color-url' )->inContentLanguage(); $adHTML = '<script type="text/javascript"> google_ad_client = "pub-' . $wgAdConfig['adsense-client'] . '"; google_ad_slot = "' . $adSlot . '"; google_ad_width = 125; google_ad_height = 125; google_ad_format = "125x125_as"; google_ad_type = "text"; google_ad_channel = ""; google_color_border = ' . Xml::encodeJsVar( $borderColorMsg->isDisabled() ? 'F6F4C4' : $borderColorMsg->text() ) . '; google_color_bg = ' . Xml::encodeJsVar( $colorBGMsg->isDisabled() ? 'FFFFE0' : $colorBGMsg->text() ) . '; google_color_link = ' . Xml::encodeJsVar( $colorLinkMsg->isDisabled() ? '000000' : $colorLinkMsg->text() ) . '; google_color_text = ' . Xml::encodeJsVar( $colorTextMsg->isDisabled() ? '000000' : $colorTextMsg->text() ) . '; google_color_url = ' . Xml::encodeJsVar( $colorURLMsg->isDisabled() ? '002BB8' : $colorURLMsg->text() ) . '; </script> <script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script>'; } return '<!-- Begin toolbox ad (ShoutWikiAds) --> <div id="p-ads-left" class="noprint">' . $adHTML . '</div> <!-- End toolbox ad (ShoutWikiAds) -->' . "\n"; }
[ "public static function getSkyscraperHTML() {\n\t\tglobal $wgAdConfig;\n\n\t\t$skinName = self::determineSkin();\n\n\t\t$adSlot = '';\n\t\tif ( isset( $wgAdConfig[$skinName . '-skyscraper-ad-slot'] ) ) {\n\t\t\t$adSlot = $wgAdConfig[$skinName . '-skyscraper-ad-slot'];\n\t\t}\n\n\t\t// Just output an image in debug mode\n\t\tif ( isset( $wgAdConfig['debug'] ) && $wgAdConfig['debug'] === true ) {\n\t\t\treturn \"\\n\" . '<!-- Begin skyscraper ad (ShoutWikiAds) -->\n<div id=\"column-google\" class=\"' . $skinName . '-ad noprint\">\n\t<img src=\"http://www.google.com/help/hc/images/adsense_185665_adformat-text_120x600.png\" alt=\"\" />\n</div>\n<!-- End skyscraper ad (ShoutWikiAds) -->' . \"\\n\";\n\t\t}\n\n\t\tif ( isset( $wgAdConfig['mode'] ) && $wgAdConfig['mode'] == 'responsive' ) {\n\t\t\t$adHTML = '<ins class=\"adsbygoogle\"\n\t\tstyle=\"display:block\"\n\t\tdata-ad-client=\"ca-pub-' . $wgAdConfig['adsense-client'] . '\"\n\t\tdata-ad-slot=\"' . $adSlot . '\"\n\t\tdata-ad-format=\"vertical\"></ins>\n\t<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>';\n\t\t} else {\n\t\t\t$borderColorMsg = wfMessage( 'shoutwiki-' . $skinName . '-rightcolumn-ad-color-border' )->inContentLanguage();\n\t\t\t$colorBGMsg = wfMessage( 'shoutwiki-' . $skinName . '-rightcolumn-ad-color-bg' )->inContentLanguage();\n\t\t\t$colorLinkMsg = wfMessage( 'shoutwiki-' . $skinName . '-rightcolumn-ad-color-link' )->inContentLanguage();\n\t\t\t$colorTextMsg = wfMessage( 'shoutwiki-' . $skinName . '-rightcolumn-ad-color-text' )->inContentLanguage();\n\t\t\t$colorURLMsg = wfMessage( 'shoutwiki-' . $skinName . '-rightcolumn-ad-color-url' )->inContentLanguage();\n\n\t\t\t$adHTML = '<script type=\"text/javascript\">\ngoogle_ad_client = \"pub-' . $wgAdConfig['adsense-client'] . '\";\ngoogle_ad_slot = \"' . $adSlot . '\";\ngoogle_ad_width = 120;\ngoogle_ad_height = 600;\ngoogle_ad_format = \"120x600_as\";\n//google_ad_type = \"text\";\ngoogle_ad_channel = \"\";\ngoogle_color_border = ' . Xml::encodeJsVar( $borderColorMsg->isDisabled() ? 'F6F4C4' : $borderColorMsg->text() ) . ';\ngoogle_color_bg = ' . Xml::encodeJsVar( $colorBGMsg->isDisabled() ? 'FFFFE0' : $colorBGMsg->text() ) . ';\ngoogle_color_link = ' . Xml::encodeJsVar( $colorLinkMsg->isDisabled() ? '000000' : $colorLinkMsg->text() ) . ';\ngoogle_color_text = ' . Xml::encodeJsVar( $colorTextMsg->isDisabled() ? '000000' : $colorTextMsg->text() ) . ';\ngoogle_color_url = ' . Xml::encodeJsVar( $colorURLMsg->isDisabled() ? '002BB8' : $colorURLMsg->text() ) . ';\n</script>\n<script type=\"text/javascript\" src=\"https://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>';\n\t\t}\n\n\t\treturn \"\\n\" . '<!-- Begin skyscraper ad (ShoutWikiAds) -->\n<div id=\"column-google\" class=\"' . $skinName . '-ad noprint\">' . $adHTML . '</div>\n<!-- End skyscraper ad (ShoutWikiAds) -->' . \"\\n\";\n\t}", "function getAllAddOnTools(){\n\t $url = urlize();\n\t $url = substr($url,0,strpos($url,'index.php'));\n\t $url .= 'jukebox/jukeboxes/junctionbox/?id=';\n\t return ' - <a href=\"'.htmlentities($url).'\" target=\"_BLANK\"> [Click to open]</a>';\n\t}", "function cp_adbox_468x60() {\n\tglobal $cp_options;\n\n\tif ( ! $cp_options->adcode_468x60_enable ) {\n\t\treturn;\n\t}\n\n\tif ( ! empty( $cp_options->adcode_468x60 ) ) {\n\t\techo stripslashes( $cp_options->adcode_468x60 );\n\t} else {\n\t\tif ( ! $cp_options->adcode_468x60_url ) {\n\t\t\t$img = html( 'img', array( 'src' => get_template_directory_uri() . '/assets/images/468x60-banner.jpg', 'width' => '468', 'height' => '60', 'border' => '0', 'alt' => 'Premium WordPress Themes - AppThemes' ) );\n\t\t\techo html( 'a', array( 'href' => 'https://www.appthemes.com', 'target' => '_blank' ), $img );\n\t\t} else {\n\t\t\t$img = html( 'img', array( 'src' => $cp_options->adcode_468x60_url, 'border' => '0', 'alt' => '' ) );\n\t\t\techo html( 'a', array( 'href' => $cp_options->adcode_468x60_dest, 'target' => '_blank' ), $img );\n\t\t}\n\t}\n\n}", "abstract protected function getWidgetHtml();", "public static function getSmallSquareHTML() {\n\t\tglobal $wgAdConfig;\n\n\t\t$skinName = self::determineSkin();\n\n\t\t$adSlot = '';\n\t\tif ( isset( $wgAdConfig[$skinName . '-small-square-ad-slot'] ) ) {\n\t\t\t$adSlot = $wgAdConfig[$skinName . '-small-square-ad-slot'];\n\t\t}\n\n\t\t// Just output an image in debug mode\n\t\tif ( isset( $wgAdConfig['debug'] ) && $wgAdConfig['debug'] === true ) {\n\t\t\t/*\n\t\t\tStrangely enough when trying to display the text-only ad (located\n\t\t\tat http://www.google.com/help/hc/images/adsense_185665_adformat-text_200x200.png),\n\t\t\ta few pixels are cut off from its right side or at least that's\n\t\t\twhat it looks like to me on Internet Explorer 10 on Windows 7 Ultimate.\n\t\t\tThe image ad, which is what's used below, appears to render correctly.\n\t\t\t--Jack Phoenix, 3 July 2013\n\t\t\t*/\n\t\t\treturn \"\\n\" . '<!-- Begin small square (ShoutWikiAds) -->\n<div id=\"small-square-ad\" class=\"' . $skinName . '-ad noprint\">\n\t<img src=\"https://storage.googleapis.com/support-kms-prod/SNP_2922332_en_v0\" alt=\"\" />\n</div>\n<!-- End small square (ShoutWikiAds) -->' . \"\\n\";\n\t\t}\n\n\t\tif ( isset( $wgAdConfig['mode'] ) && $wgAdConfig['mode'] == 'responsive' ) {\n\t\t\t$adHTML = '<ins class=\"adsbygoogle\"\n\t\tstyle=\"display:block\"\n\t\tdata-ad-client=\"ca-pub-' . $wgAdConfig['adsense-client'] . '\"\n\t\tdata-ad-slot=\"' . $adSlot . '\"\n\t\tdata-ad-format=\"rectangle\"></ins>\n\t<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>';\n\t\t} else {\n\t\t\t$borderColorMsg = wfMessage( 'shoutwiki-' . $skinName . '-smallsquare-ad-color-border' )->inContentLanguage();\n\t\t\t$colorBGMsg = wfMessage( 'shoutwiki-' . $skinName . '-smallsquare-ad-color-bg' )->inContentLanguage();\n\t\t\t$colorLinkMsg = wfMessage( 'shoutwiki-' . $skinName . '-smallsquare-ad-color-link' )->inContentLanguage();\n\t\t\t$colorTextMsg = wfMessage( 'shoutwiki-' . $skinName . '-smallsquare-ad-color-text' )->inContentLanguage();\n\t\t\t$colorURLMsg = wfMessage( 'shoutwiki-' . $skinName . '-smallsquare-ad-color-url' )->inContentLanguage();\n\n\t\t\t$adHTML = '<script type=\"text/javascript\">\ngoogle_ad_client = \"pub-' . $wgAdConfig['adsense-client'] . '\";\ngoogle_ad_slot = \"' . $adSlot . '\";\ngoogle_ad_width = 200;\ngoogle_ad_height = 200;\ngoogle_ad_format = \"200x200_as\";\n//google_ad_type = \"text\";\ngoogle_ad_channel = \"\";\ngoogle_color_border = ' . Xml::encodeJsVar( $borderColorMsg->isDisabled() ? 'F6F4C4' : $borderColorMsg->text() ) . ';\ngoogle_color_bg = ' . Xml::encodeJsVar( $colorBGMsg->isDisabled() ? 'FFFFE0' : $colorBGMsg->text() ) . ';\ngoogle_color_link = ' . Xml::encodeJsVar( $colorLinkMsg->isDisabled() ? '000000' : $colorLinkMsg->text() ) . ';\ngoogle_color_text = ' . Xml::encodeJsVar( $colorTextMsg->isDisabled() ? '000000' : $colorTextMsg->text() ) . ';\ngoogle_color_url = ' . Xml::encodeJsVar( $colorURLMsg->isDisabled() ? '002BB8' : $colorURLMsg->text() ) . ';\n</script>\n<script type=\"text/javascript\" src=\"https://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>';\n\t\t}\n\n\t\treturn \"\\n\" . '<!-- Begin small square ad (ShoutWikiAds) -->\n<div id=\"small-square-ad\" class=\"' . $skinName . '-ad noprint\">' . $adHTML . '</div>\n<!-- End small square ad (ShoutWikiAds) -->' . \"\\n\";\n\t}", "public static function getToolBox() {\n }", "public static function getBannerHTML() {\n\t\tglobal $wgAdConfig;\n\n\t\t$skinName = self::determineSkin();\n\n\t\t$adSlot = '';\n\t\tif ( isset( $wgAdConfig[$skinName . '-banner-ad-slot'] ) ) {\n\t\t\t$adSlot = $wgAdConfig[$skinName . '-banner-ad-slot'];\n\t\t}\n\n\t\tif ( isset( $wgAdConfig['debug'] ) && $wgAdConfig['debug'] === true ) {\n\t\t\treturn '<!-- Begin banner ad (ShoutWikiAds) -->\n\t\t<div id=\"' . $skinName . '-banner-ad\" class=\"' . $skinName . '-ad noprint\">\n\t\t\t<img src=\"http://www.google.com/help/hc/images/adsense/adsense_185665_adformat-text_468x60_en.png\" alt=\"\" />\n\t\t</div>\n<!-- End banner ad (ShoutWikiAds) -->' . \"\\n\";\n\t\t}\n\n\t\tif ( isset( $wgAdConfig['mode'] ) && $wgAdConfig['mode'] == 'responsive' ) {\n\t\t\t$adHTML = '<ins class=\"adsbygoogle\"\n\t\t\t\tstyle=\"display:block\"\n\t\t\t\tdata-ad-client=\"ca-pub-' . $wgAdConfig['adsense-client'] . '\"\n\t\t\t\tdata-ad-slot=\"' . $adSlot . '\"\n\t\t\t\tdata-ad-format=\"horizontal\"></ins>\n\t\t\t<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>';\n\t\t} else {\n\t\t\t$borderColorMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-border' )->inContentLanguage();\n\t\t\t$colorBGMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-bg' )->inContentLanguage();\n\t\t\t$colorLinkMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-link' )->inContentLanguage();\n\t\t\t$colorTextMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-text' )->inContentLanguage();\n\t\t\t$colorURLMsg = wfMessage( 'shoutwiki-' . $skinName . '-banner-ad-color-url' )->inContentLanguage();\n\n\t\t\t$colorBorderDefault = 'F6F4C4';\n\t\t\t$colorBGDefault = 'FFFFE0';\n\t\t\t$colorLinkDefault = '000000';\n\t\t\t$colorURLDefault = '002BB8';\n\n\t\t\t// different defaults for Truglass from old Truglass ad code\n\t\t\tif ( $skinName == 'truglass' ) {\n\t\t\t\t$colorBorderDefault = 'CDCDCD';\n\t\t\t\t$colorBGDefault = 'FFFFFF';\n\t\t\t\t$colorLinkDefault = '0066FF';\n\t\t\t\t$colorURLDefault = '00A000';\n\t\t\t}\n\n\t\t\t$adHTML = '<script type=\"text/javascript\">\ngoogle_ad_client = \"pub-' . $wgAdConfig['adsense-client'] . '\";\ngoogle_ad_slot = \"' . $adSlot . '\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\ngoogle_ad_format = \"468x60_as\";\n//google_ad_type = \"\";\ngoogle_ad_channel = \"\";\ngoogle_color_border = ' . Xml::encodeJsVar( $borderColorMsg->isDisabled() ? $colorBorderDefault : $borderColorMsg->text() ) . ';\ngoogle_color_bg = ' . Xml::encodeJsVar( $colorBGMsg->isDisabled() ? $colorBGDefault : $colorBGMsg->text() ) . ';\ngoogle_color_link = ' . Xml::encodeJsVar( $colorLinkMsg->isDisabled() ? $colorLinkDefault : $colorLinkMsg->text() ) . ';\ngoogle_color_text = ' . Xml::encodeJsVar( $colorTextMsg->isDisabled() ? '000000' : $colorTextMsg->text() ) . ';\ngoogle_color_url = ' . Xml::encodeJsVar( $colorURLMsg->isDisabled() ? $colorURLDefault : $colorURLMsg->text() ) . ';\n</script>\n<script type=\"text/javascript\" src=\"https://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>';\n\t\t}\n\n\t\treturn '<!-- Begin banner ad (ShoutWikiAds) -->\n\t\t<div id=\"' . $skinName . '-banner-ad\" class=\"' . $skinName . '-ad noprint\">' .\n\t\t\t$adHTML . '</div>\n\t\t<!-- End banner ad (ShoutWikiAds) -->' . \"\\n\";\n\t}", "function talemy_get_allowed_html_for_ads() {\n\t\treturn apply_filters( 'talemy_allowed_html_for_ads', array(\n\t\t\t'a' => array(\n\t\t\t\t'class' => true,\n\t\t\t\t'href' => true,\n\t\t\t\t'rel' => true,\n\t\t\t\t'title' => true,\n\t\t\t\t'target' => true\n\t\t\t),\n\t\t\t'img' => array(\n\t\t\t\t'alt' => true,\n\t\t\t\t'class' => true,\n\t\t\t\t'height' => true,\n\t\t\t\t'src' => true,\n\t\t\t\t'srcset' => true,\n\t\t\t\t'width' => true\n\t\t\t),\n 'script' => array(\n 'async' => true,\n 'src' => true\n\t\t\t),\n\t\t\t'ins' => array(\n 'style' => true,\n\t\t\t\t'data-ad-client' => true,\n\t\t\t\t'data-ad-slot' => true\n\t\t\t)\n\t\t) );\n\t}", "function get_advert( $res = '729x90' , $type = 'banner' , $network = 'random' )\n{\n\tif( ! is_ad_engine() )\n\t\treturn False;\n\t$CI =& get_instance();\n\n\t$html = $CI->ui->ad_engine->get_advert_html( $res , $type , $network );\n\treturn $html;\n}", "public function getEmbedHTML();", "function getFlagBannerPanel() {\n return '<div class=\"flag-banner\"></div>'; \n}", "public function getToolbarHTML();", "public static function canvasToolRegistration($tool) {\n global $CFG;\n $pieces = parse_url($CFG->wwwroot);\n $domain = isset($pieces['host']) ? $pieces['host'] : false;\n $privacy_level = U::get($tool, 'privacy_level', 'public');\n\n $retval = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<cartridge_basiclti_link xmlns=\"http://www.imsglobal.org/xsd/imslticc_v1p0\" xmlns:blti=\"http://www.imsglobal.org/xsd/imsbasiclti_v1p0\" xmlns:lticm=\"http://www.imsglobal.org/xsd/imslticm_v1p0\" xmlns:lticp=\"http://www.imsglobal.org/xsd/imslticp_v1p0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.imsglobal.org/xsd/imslticc_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticc_v1p0.xsd http://www.imsglobal.org/xsd/imsbasiclti_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imsbasiclti_v1p0p1.xsd http://www.imsglobal.org/xsd/imslticm_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticm_v1p0.xsd http://www.imsglobal.org/xsd/imslticp_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd\">\n <blti:title>'.htmlent_utf8(strip_tags($tool['name'])).'</blti:title>\n <blti:description>'.htmlent_utf8(strip_tags($tool['description'])).'</blti:description>\n <blti:launch_url>'.$tool['url'].'</blti:launch_url>\n <blti:custom>\n <lticm:property name=\"sub_canvas_account_id\">$Canvas.account.id</lticm:property>\n <lticm:property name=\"sub_canvas_account_name\">$Canvas.account.name</lticm:property>\n <lticm:property name=\"sub_canvas_account_sis_sourceId\">$Canvas.account.sisSourceId</lticm:property>\n <lticm:property name=\"sub_canvas_api_domain\">$Canvas.api.domain</lticm:property>\n';\n $messages = U::get($tool, 'messages');\n if ( $messages && in_array('launch_grade', $messages) ) {\n$retval .= ' <lticm:property name=\"sub_canvas_assignment_id\">$Canvas.assignment.id</lticm:property>\n <lticm:property name=\"sub_canvas_assignment_points_possible\">$Canvas.assignment.pointsPossible</lticm:property>\n <lticm:property name=\"sub_canvas_assignment_title\">$Canvas.assignment.title</lticm:property>\n';\n }\n $retval .= ' <lticm:property name=\"sub_canvas_course_id\">$Canvas.course.id</lticm:property>\n <lticm:property name=\"sub_canvas_course_sis_source_id\">$Canvas.course.sisSourceId</lticm:property>\n <lticm:property name=\"sub_canvas_enrollment_enrollment_state\">$Canvas.enrollment.enrollmentState</lticm:property>\n <lticm:property name=\"sub_canvas_membership_concluded_roles\">$Canvas.membership.concludedRoles</lticm:property>\n <lticm:property name=\"sub_canvas_membership_roles\">$Canvas.membership.roles</lticm:property>\n <lticm:property name=\"sub_canvas_root_account.id\">$Canvas.root_account.id</lticm:property>\n <lticm:property name=\"sub_canvas_root_account_sis_source_id\">$Canvas.root_account.sisSourceId</lticm:property>\n <lticm:property name=\"sub_canvas_user_id\">$Canvas.user.id</lticm:property>\n <lticm:property name=\"sub_canvas_user_login_id\">$Canvas.user.loginId</lticm:property>\n <lticm:property name=\"sub_canvas_user_sis_source_id\">$Canvas.user.sisSourceId</lticm:property>\n <lticm:property name=\"sub_canvas_caliper_url\">$Caliper.url</lticm:property>\n <lticm:property name=\"person_address_timezone\">$Person.address.timezone</lticm:property>\n <lticm:property name=\"person_email_primary\">$Person.email.primary</lticm:property>\n <lticm:property name=\"person_name_family\">$Person.name.family</lticm:property>\n <lticm:property name=\"person_name_full\">$Person.name.full</lticm:property>\n <lticm:property name=\"person_name_given\">$Person.name.given</lticm:property>\n <lticm:property name=\"user_image\">$User.image</lticm:property>\n </blti:custom>\n <blti:extensions platform=\"canvas.instructure.com\">\n';\n $retval .= ' <lticm:property name=\"privacy_level\">'.$privacy_level.\"</lticm:property>\\n\";\n if ( $domain ) $retval .= ' <lticm:property name=\"domain\">'.$domain.\"</lticm:property>\\n\";\n\n $retval .= ' <lticm:property name=\"text\">'.htmlent_utf8(strip_tags($tool['name'])).'</lticm:property>\n </blti:extensions>\n <blti:extensions platform=\"tsugi.org\">\n <lticm:property name=\"OAuth.hmac-sha256\">true</lticm:property>\n <lticm:property name=\"OAuth.splitSecret\">true</lticm:property>\n';\n\n if ( $messages && in_array('launch_grade', $messages) ) {\n $retval .= ' <lticm:property name=\"simple_outcomes\">true</lticm:property>'.\"\\n\";\n }\n $privacy_url = U::get($tool, 'privacy_url');\n if ( $privacy_url ) $retval .= ' <lticm:property name=\"privacy_url\">'.$privacy_url.\"</lticm:property>\\n\";\n $sla_url = U::get($tool, 'sla_url');\n if ( $sla_url ) $retval .= ' <lticm:property name=\"sla_url\">'.$sla_url.\"</lticm:property>\\n\";\n $key_url = U::get($tool, 'key_url');\n if ( $key_url ) $retval .= ' <lticm:property name=\"key_url\">'.$key_url.\"</lticm:property>\\n\";\n $retval .= ' <lticm:property name=\"app_store_url\">'.$CFG->wwwroot.\"/lti/store</lticm:property>\\n\";\n $retval .= ' <lticm:property name=\"app_store_canvas_url\">'.$CFG->wwwroot.\"/lti/store/canvas-config.xml</lticm:property>\\n\";\n $retval .=' </blti:extensions>\n</cartridge_basiclti_link>';\n\n return $retval;\n }", "private function HTMLWidget($id){\r\n\t\treturn $this->GC->blocks[$id]->WidgetClass()->Render->Content();\r\n\t}", "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}", "function thn_showads($atts) {\n\n\t//extract short code attr\n\textract(shortcode_atts(array('id' => '3637220125174754', 'slot' => '4668915978', 'width' => '480', 'height' => '60'), $atts));\n\t\n return '<script type=\"text/javascript\"><!--\ngoogle_ad_client = \"pub-'.$id.'\";\ngoogle_ad_slot = \"'.$slot.'\";\ngoogle_ad_width = '.$width.';\ngoogle_ad_height = '.$height.';\n//-->\n</script><script type=\"text/javascript\"src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>\n';\n}", "function print_DNSSECTestHTML() {\n\t$options = get_option(\"widget_DNSSECTest\");\n\toptions_DNSSECTestCheck();\n\n\techo '<div id=\"loopia_dnssec_imagediv\"></div>' . PHP_EOL;\n\techo '<div id=\"loopia_dnssec_status_div\" class=\"init\">' . PHP_EOL;\n\techo '<p id=\"dnssec_info_init\">' . $options[\"dnssectest_info_init\"] . '</p>' . PHP_EOL;\n\techo '<p id=\"dnssec_info_working\" style=\"display: none;\">' . $options[\"dnssectest_info_working\"] . '</p>' . PHP_EOL;\n\techo '<p id=\"dnssec_info_not_working\" style=\"display: none;\">' . $options[\"dnssectest_info_not_working\"] . '</p>' . PHP_EOL;\n\techo '</div>' . PHP_EOL;\n}", "function getToolbarHTML()\n\t{\n\t\t$html = $this->render(\"toolbar\");\n\t\treturn $html;\n\t}", "function getAdUnit3();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[!] Method is generated. Documentation taken from corresponding module. Waits up to $timeout seconds for an element to appear on the page. If the element doesn't appear, a timeout exception is thrown. ``` php waitForElement('agree_button', 30); // secs $I>click('agree_button'); ?> ```
public function waitForElement($element, $timeout = null) { return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElement', func_get_args())); }
[ "public function waitUntilElementVisible( string $element_path ) {\n\t\t$args = [\n\t\t\t'visible' => true,\n\t\t\t'timeout' => 90000,\n\t\t];\n\n\t\t$this->getPage()->waitForSelector( $element_path, $args );\n\t}", "private function waitFormLoading()\n {\n $this->_rootElement->click();\n $this->browser->waitUntil(\n function () {\n return $this->browser->find($this->waitElement)->isVisible() ? null : true;\n }\n );\n }", "function wait($timeout=0.0) {}", "public function iWaitForElementToBeVisibleByXpath($xpath) {\n $this->find('xpath', $xpath);\n }", "public function testWaitReturnTrue()\n {\n $connection = $this->api->getConnection();\n\n $connection\n ->expects($this->any())\n ->method('evaluateJavascript')\n ->with('found-element')\n ->will($this->returnValue(true));\n\n $this->assertTrue($this->api->wait(500, 'found-element'));\n }", "public function testWaitReturnTrue()\n {\n $connection = $this->api->getConnection();\n\n $connection\n ->expects($this->any())\n ->method('evaluateJavascript')\n ->with('found-element')\n ->will($this->returnValue('true'));\n\n $this->assertTrue($this->api->wait(500, 'found-element'));\n }", "public function iWaitForThePageToLoad() {\n $this->getSession()->wait(50000, '(0 === jQuery.active)');\n }", "public function waitForElementVisible($element, int $timeout = 10): void\n {\n $condition = WebDriverExpectedCondition::visibilityOfElementLocated($this->getLocator($element));\n $this->webDriver->wait($timeout)->until($condition);\n }", "public function waitForIPEtoActivate() {\n\n $this->getSession()->wait(5000, 'jQuery(\".panels-ipe-editing\").length > 0');\n }", "public function waitForElement($element, int $timeout = 10): void\n {\n $condition = WebDriverExpectedCondition::presenceOfElementLocated($this->getLocator($element));\n $this->webDriver->wait($timeout)->until($condition);\n }", "public function iWaitToSeeInTheElement($element, $text)\n {\n $this->spin(function($context) use ($element, $text){\n return $context->elementTextContains('css', $element, $context->publicFixStepArgument($text));\n }, 20);\n }", "public function acceptCookieNotice()\n {\n $session = $this->getSession();\n $page = $session->getPage();\n $cookie_notice_button = $page->find('css', '#' . $this->cookie_notice_css_id . ' .wp-gdpr-cookie-notice-button');\n if( null === $cookie_notice_button ) {\n throw new ExpectationException(\n \"Failed to accept the cookie notice. The cookie notice acceptance button was not found.\",\n $session->getDriver()\n );\n }\n $cookie_notice_button->press();\n // Wait for the cookie notice element to be hidden, giving up after 5 seconds.\n $session->wait(\n 5000,\n \"null !== document.getElementById('\" . $this->cookie_notice_css_id . \"') && true === document.getElementById('\" . $this->cookie_notice_css_id . \"').hidden\"\n );\n }", "public function waitWelcomeMessage()\n {\n $this->waitForElementVisible($this->welcomeMessage);\n }", "protected function waitForFormVisible()\n {\n $this->browser->waitUntil(\n function () {\n return $this->_rootElement->find($this->configureForm)->isVisible() ? true : null;\n }\n );\n }", "public function waitUntilElementInteractable( $element, $timeout = null ) {\n\n\t\t$I = $this;\n\n\t\t// Wait until the fields are actually interactive.\n\t\t// Attempting to set a field value immediately after creating the new\n\t\t// reaction will result in an error: \"Element is not currently interactable\n\t\t// and may not be manipulated.\"\n\t\t$I->waitForElementChange(\n\t\t\t$element\n\t\t\t, function ( WebDriverElement $element ) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// It should be OK that we clear this since this is a new\n\t\t\t\t\t// reaction and doesn't have a description yet.\n\t\t\t\t\t$element->clear();\n\n\t\t\t\t} catch ( InvalidElementStateException $e ) {\n\n\t\t\t\t\tcodecept_debug(\n\t\t\t\t\t\t'Error while waiting for element to become interactable:' . $e->getMessage()\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn ! isset( $e );\n\t\t\t}\n\t\t\t, $timeout\n\t\t);\n\t}", "public function clickAndWait( $element, $page_title, $timeout = 30000 ) {\n\t\t// Click on element\n\t\t$element->click();\n\n\t\t// Wait for next page to load (at least the title)\n\t\t$this->waitUntil( function ( $test_case ) use ( $page_title ) {\n\t\t\treturn strpos( $test_case->title(), $page_title ) !== false;\n\t\t}, $timeout );\n\t}", "public function clickDialogBoxConfirm() {\n if ($this->getJeedomVersion() == 3)\n $this->waitElemIsClickable(By::xpath(\"//button[@data-bb-handler='confirm']\"))->click();\n else\n $this->waitElemIsClickable(By::xpath(\"//button[contains(@class,'bootbox-accept')]\"))->click(); \n }", "protected function waitPageToLoad()\n {\n $this->waitForElementNotVisible($this->spinner);\n }", "public function clickDoneButton()\n {\n $this->_webui->clickButton(\".btn.btn-default.btn-xs.pull-right.btn-dismiss\");\n\n sleep(1);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the filename of the background image
public static function getBackgroundImageName() { return "background.jpg"; }
[ "public static function getBackgroundImagePath()\n\t{\n\t\treturn ilObjCertificateSettingsAccess::getBackgroundImageDefaultFolder() . ilObjCertificateSettingsAccess::getBackgroundImageName();\n\t}", "function get_background_image() {}", "protected function getBackgroundPath(): string\n {\n $path = \"{$this->bgDirPath}/{$this->backgroundName}\";\n if (!file_exists($path)) {\n throw new \\Exception('Background image does not exist. Make sure the background directory is set and the image exists.');\n }\n\n return $path;\n }", "public function getBackgroundImageTempfilePath()\n\t{\n\t\treturn $this->getAdapter()->getCertificatePath() . \"background_upload\";\n\t}", "public static function getBackground()\n {\n $background = self::getConfig()->get('steempi', 'background');\n\n if (empty($background)) {\n $background = '/app/images/backgrounds/default-06.jpg';\n }\n\n $realPath = self::getRootPath().$background;\n\n if (!file_exists($realPath)) {\n $background = '/app/images/backgrounds/default-06.jpg';\n }\n\n return $background;\n }", "protected function getTestImageFileFullName() {\n\t\t$fileFullName = YII_PATH . '/cli/views/webapp/css/bg.gif';\n\t\treturn $fileFullName;\n\t}", "public function get_background_image() {\n return $this->background_image;\n }", "public function bgImagePath()\n\t{\n\t\t$storeId = $this->storeId();\n\t\t$imagePath = null;\n\t\t$imagePath = Mage::getStoreConfig(self::XML_PATH_PRELOGIN_BGIMAGE,$storeId);\n\t\tif($imagePath != '')\n\t\t\treturn Mage::getBaseUrl('media').'theme'.DS.$imagePath;\n\t\treturn $imagePath;\n\t}", "static function getBackgroundImageURL() {\n\n if (!empty(\\Idno\\Core\\site()->config()->hugoroy['bg_id'])) {\n return \\Idno\\Core\\site()->config()->getDisplayURL() . 'file/' . \\Idno\\Core\\site()->config()->hugoroy['bg_id'];\n } else {\n return \\Idno\\Core\\site()->config()->getDisplayURL() . 'Themes/Hugoroy/img/hugoroy.jpg';\n }\n\n }", "public function background()\n {\n $this->background = true;\n $this->handleLoggedInUsers();\n $this->prepareSrc(null);\n $this->toJSON();\n\n $format = ' %2$s style=\"background-image: url(\\'%1$s\\');\"';\n\n return sprintf($format, $this->image->getSrc(), $this->_renderAttributes());\n }", "public function getBgImagesPath()\n {\n return $this->_bgImagesPath;\n }", "function get_background_image()\n{\n}", "public function get_background()\r\n\t{\r\n\t\treturn $this->get_attr('background');\r\n\t}", "function get_background_attachment()\n {\n return $this->_props[\"background_attachment\"];\n }", "public function getBackgroundImage()\n {\n return Mage::getStoreConfig(self::XML_PATH_BACKGROUND_IMAGE);\n }", "protected function getBackgroundImage()\n {\n $image = rtrim($this->modx->modxdashboardwidgetpack->config['assets_url'], '/') . '/img/default-welcome-widget-bg.jpg';\n\n $properties = $this->widget->get('properties');\n if (isset($properties['background_image_path']) && !empty($properties['background_image_path'])) {\n $image = str_replace(\n [\n '[[++base_path]]',\n '[[++core_path]]',\n '[[++manager_path]]',\n '[[++assets_path]]',\n '[[++manager_theme]]',\n ], [\n $this->modx->getOption('base_path',null,MODX_BASE_PATH),\n $this->modx->getOption('core_path',null,MODX_CORE_PATH),\n $this->modx->getOption('manager_path',null,MODX_MANAGER_PATH),\n $this->modx->getOption('assets_path',null,MODX_ASSETS_PATH),\n $this->modx->getOption('manager_theme',null,'default'),\n ],\n $properties['background_image_path']\n );\n }\n\n return $image;\n }", "public function getBackgroundImageThumbPath()\n\t{\n\t\treturn $this->getAdapter()->getCertificatePath() . $this->getBackgroundImageName() . \".thumb.jpg\";\n\t}", "function get_background_image() {\n\treturn get_theme_mod('background_image', get_theme_support( 'custom-background', 'default-image' ) );\n}", "public function backgroundLogoImage(): string\n {\n $result = '';\n $path = '/img/login/' . (string)Configure::read('Theme.backgroundImages') . '/';\n $images = (new Folder(WWW_ROOT . $path))->find('.*\\.png|jpg|jpeg', true);\n\n if (! empty($images)) {\n $result = $this->tag('style', sprintf(\n '.login-page {%s}',\n $this->style(['background-image' => 'url(' . $path . '/' . $images[array_rand($images)] . ')'])\n ));\n }\n\n return $result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SumCalculatorOutputter constructor. This will store the supplied areas and the sum of all these areas for use in the outputter. According to SRP this class should NOT concern itself with how the sum is obtained!
public function __construct($areas = []) { $this->areas = $areas; $this->sum = $areas->sum(); }
[ "public function calculateArea(){}", "public function calcArea();", "public function sum() {\n foreach($this->shapes as $shape) {\n if(is_a($shape, 'Square')) {\n $area[] = pow($shape->length, 2);\n } else if(is_a($shape, 'Circle')) {\n $area[] = pi() * pow($shape->radius, 2);\n }\n }\n \n return array_sum($area);\n }", "public function sum()\n {\n $area = [];\n foreach ($this->shapes as $shape) {\n if ($shape instanceof Square) {\n $area[] = pow($shape->length, 2);\n } elseif ($shape instanceof Circle) {\n $area[] = pi() * pow($shape->radius, 2);\n }\n }\n\n return array_sum($area);\n }", "protected function generateAreasOutput() {\n \n $outputString = \"Areas = [\".PHP_EOL;\n \n foreach($this->areas as $a) {\n $summary = $this->getAreaSummary($a[\"id\"]);\n $outputString.= self::tabs().$this->generateOneAreaOutput($a, $summary).\",\".PHP_EOL;\n }\n\n $outputString = substr($outputString, 0, strlen($outputString) - 2).PHP_EOL; // remove the last comma\n $outputString.= \"];\".PHP_EOL.PHP_EOL;\n return $outputString;\n }", "public function sum() {\n return array_sum($this->components);\n }", "private function calculateTotal()\n\t{\n\t\t$this->shots += $this->attackerShipType->getCount();\n\t\t$this->power += $this->getNormalPower();\n\n\t\tif (USE_RF)\n\t\t\t$this->calculateRf();\n\n\t\t\\log_var('$this->shots',$this->shots);\n\t}", "public function getAreaTotal() {\n return $this->nAreaTotal;\n }", "public function calculateTotal() \n\t{\n\t\t\n //Prepare the calculation variables.\n\t\t$sortCodeAccountMerge = $this->getSortCodeAccountMerge();\t\t\t\n\t\t\n\t\t//Calculate the total\n\t\t$total = 0;\n\t\t\n\t\t$total += ($sortCodeAccountMerge->sortCodeU * $this->_multiplier->sortCodeU);\n\t\t$total += ($sortCodeAccountMerge->sortCodeV * $this->_multiplier->sortCodeV);\n\t\t$total += ($sortCodeAccountMerge->sortCodeW * $this->_multiplier->sortCodeW);\n\t\t$total += ($sortCodeAccountMerge->sortCodeX * $this->_multiplier->sortCodeX);\n\t\t$total += ($sortCodeAccountMerge->sortCodeY * $this->_multiplier->sortCodeY);\n\t\t$total += ($sortCodeAccountMerge->sortCodeZ * $this->_multiplier->sortCodeZ);\n\t\t$total += ($sortCodeAccountMerge->accountNumberA * $this->_multiplier->accountNumberA);\n\t\t$total += ($sortCodeAccountMerge->accountNumberB * $this->_multiplier->accountNumberB);\n\t\t$total += ($sortCodeAccountMerge->accountNumberC * $this->_multiplier->accountNumberC);\n\t\t$total += ($sortCodeAccountMerge->accountNumberD * $this->_multiplier->accountNumberD);\n\t\t$total += ($sortCodeAccountMerge->accountNumberE * $this->_multiplier->accountNumberE);\n\t\t$total += ($sortCodeAccountMerge->accountNumberF * $this->_multiplier->accountNumberF);\n\t\t$total += ($sortCodeAccountMerge->accountNumberG * $this->_multiplier->accountNumberG);\n\t\t$total += ($sortCodeAccountMerge->accountNumberH * $this->_multiplier->accountNumberH);\n\n\t\t$this->_total = $total;\n\t}", "function area_export() {\n\t\n\t// check if user is logged in\n\tglobal $user;\n\tif ($user->uid == 0) {\n\t\t$output['success'] = false;\n\t\t$output['type'] = 'error';\n\t\t$output['message'] = t('Please log in first');\n\t\treturn drupal_json_output($output);\n\t}\n\t\n\t$failed = true;\n\t\n\t// get the areas of the request\n\t$param = filter_xss($_REQUEST['areas']);\n\t\n\t$export_id = uniqid();\n\t$base_query = \"SELECT geom FROM naturvielfalt_area_geometry a_g, naturvielfalt_area a WHERE a_g.id = a.area_geometry_id AND a.id in $param AND GeometryType(geom)=\";\n\n\texport_shape_ogr2ogr( \"POINT\", $base_query, $export_id);\n\texport_shape_ogr2ogr( \"LINESTRING\", $base_query, $export_id);\n\texport_shape_ogr2ogr( \"POLYGON\", $base_query, $export_id);\n\n \t// zip\n\t$tempdir = file_directory_temp();\n\n\t// FOR WINDOWS\n\t// \t$cmd = strtr('\"%path7z.exe\" a %archive %shapefile'\n\t// \t\t\t, array(\n\t// \t\t\t\t\t'%path' => variable_get('area_path_zip', AREA_PATH_ZIP),\n\t// \t\t\t\t\t'%archive' => $tempdir .'\\\\'.$export_id .'.zip' ,\n\t// \t\t\t\t\t'%shapefile' => file_directory_temp() .'\\\\'. $export_id.'*.*'\n\t// \t\t\t)\n\t// \t);\n\n\t$cmd = strtr('tar -zcvf %archive %shapefile'\n\t\t\t, array(\n\t\t\t\t\t'%path' => variable_get('area_path_zip', AREA_PATH_ZIP),\n\t\t\t\t\t'%archive' => $tempdir .'/'.$export_id .'.tar' ,\n\t\t\t\t\t'%shapefile' => file_directory_temp() .'/'. $export_id.'*.*'\n\t\t\t)\n\t);\n\t\n\tshell_exec($cmd);\n\t//echo($cmd.'<br>');\n\t\n\t// open for return\n\t$filename = $tempdir .'/'.$export_id .'.tar'; \n\t$handle = fopen($filename, \"r\");\n\t$contents = fread($handle, filesize($filename));\n\tfclose($handle);\n\t\n\t// move to archive\n\t// TODO use drupal function\n\t$cmd = strtr('mv %file %archive '\n\t\t\t, array(\n\t\t\t\t\t'%file' => $tempdir .\"/\".$export_id .'.tar' ,\n\t\t\t\t\t'%archive' => file_directory_temp() .'/export_archive/'\n\t\t\t)\n\t);\n\t\n\tshell_exec($cmd);\n\t//echo($cmd.'<br>');\n\n\t// delete \n\t// TODO use drupal function\n\t$cmd = strtr('rm %files'\n\t\t\t, array(\n\t\t\t\t\t'%files' => file_directory_temp() .\"/\". $export_id.'*.*'\n\t\t\t)\n\t);\n\tshell_exec($cmd);\n\t//echo($cmd.'<br>');\n\t\n\t// set header information\n\theader('Content-Type: application/octet-stream');\n\theader('Content-Disposition: attachment; filename=\"export.tar\"');\n\techo $contents;\n}", "public static function summingNumbers()\n {\n return new SumCollector();\n }", "public function providerSum()\n {\n return [\n [[1, 2, 3], 6],\n [['one', 'two', 'three'], 0],\n [['a' => 1.27, 'b' => '5.83'], 7.0999999999999996]\n ];\n }", "public function msumSumProvider() : array\n {\n return [\n [0.01, '0.00001000'],\n [0.025, '0.00002500'],\n [-0.01, '-0.00001000'],\n [1000, '1.00000000'],\n [1500, '1.50000000'],\n ];\n }", "public function __construct($_areaValue,$_fromAreaUnit,$_toAreaUnit)\r\n\t{\r\n\t\tparent::__construct(array('AreaValue'=>$_areaValue,'fromAreaUnit'=>$_fromAreaUnit,'toAreaUnit'=>$_toAreaUnit));\r\n\t}", "public function sum() {\n\t\treturn new PSU_Student_Finaid_Award_Sum( $this->termIterator() );\n\t}", "function area_add_to_area_data() {\n\t$areas = array();\n\tif(isset($_POST['areas']) && is_array($_POST['areas'])) {\n\t\t$areas = $_POST['areas'];\n\t}\n\treturn area_get_red_writeable_areas($areas);\n}", "public function getAreaPoints($params);", "public function calcArea()\n {\n return $this -> radius * $this -> radius * pi();\n }", "public function calcArea()\n {\n return $this -> radius * $this -> radius * pi();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Visits a code element containing a unary operator type. Unary operators take one parameter and consist of a symbol.
public function visitUnaryOperatorAstNode( ezcTemplateOperatorAstNode $operator ) { $parameters = $operator->getParameters(); if ( count( $parameters ) < $operator->minParameterCount ) { throw new ezcTemplateInternalException( "The operator <" . get_class( $operator ) . " contains only " . count( $parameters ) . " parameters but should at least have {$operator->minParameterCount} parameters." ); } if ( $operator->preOperator ) { // Generate the operator symbol in between parameters. $this->write( " " . $operator->getOperatorPHPSymbol() ); // Generate code for first operand $parameters[0]->accept( $this ); } else { // Generate code for first operand $parameters[0]->accept( $this ); // Generate the operator symbol in between parameters. $this->write( $operator->getOperatorPHPSymbol() . " " ); } }
[ "public function getUnaryOperator() {\r\n\t\treturn $this->unaryOperator;\r\n\t}", "private function createUnaryOperatorAstNode( $type, ezcTemplateOperatorAstNode $astNode, $addParenthesis = true )\n {\n $astNode->appendParameter( $type->parameters[0]->accept( $this ) );\n\n return ( $addParenthesis ? new ezcTemplateParenthesisAstNode( $astNode ) : $astNode );\n }", "public function unaryExpression(){\n try {\n // Sparql11query.g:449:3: ( NOT_SIGN primaryExpression | PLUS primaryExpression | MINUS primaryExpression | primaryExpression ) \n $alt53=4;\n $LA53 = $this->input->LA(1);\n if($this->getToken('NOT_SIGN')== $LA53)\n {\n $alt53=1;\n }\n else if($this->getToken('PLUS')== $LA53)\n {\n $alt53=2;\n }\n else if($this->getToken('MINUS')== $LA53)\n {\n $alt53=3;\n }\n else if($this->getToken('COALESCE')== $LA53||$this->getToken('IF')== $LA53||$this->getToken('STR')== $LA53||$this->getToken('LANG')== $LA53||$this->getToken('LANGMATCHES')== $LA53||$this->getToken('DATATYPE')== $LA53||$this->getToken('BOUND')== $LA53||$this->getToken('SAMETERM')== $LA53||$this->getToken('ISIRI')== $LA53||$this->getToken('ISURI')== $LA53||$this->getToken('ISBLANK')== $LA53||$this->getToken('ISLITERAL')== $LA53||$this->getToken('REGEX')== $LA53||$this->getToken('TRUE')== $LA53||$this->getToken('FALSE')== $LA53||$this->getToken('IRI_REF')== $LA53||$this->getToken('PNAME_NS')== $LA53||$this->getToken('PNAME_LN')== $LA53||$this->getToken('VAR1')== $LA53||$this->getToken('VAR2')== $LA53||$this->getToken('INTEGER')== $LA53||$this->getToken('DECIMAL')== $LA53||$this->getToken('DOUBLE')== $LA53||$this->getToken('INTEGER_POSITIVE')== $LA53||$this->getToken('DECIMAL_POSITIVE')== $LA53||$this->getToken('DOUBLE_POSITIVE')== $LA53||$this->getToken('INTEGER_NEGATIVE')== $LA53||$this->getToken('DECIMAL_NEGATIVE')== $LA53||$this->getToken('DOUBLE_NEGATIVE')== $LA53||$this->getToken('STRING_LITERAL1')== $LA53||$this->getToken('STRING_LITERAL2')== $LA53||$this->getToken('STRING_LITERAL_LONG1')== $LA53||$this->getToken('STRING_LITERAL_LONG2')== $LA53||$this->getToken('OPEN_BRACE')== $LA53)\n {\n $alt53=4;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 53, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt53) {\n case 1 :\n // Sparql11query.g:450:3: NOT_SIGN primaryExpression \n {\n $this->match($this->input,$this->getToken('NOT_SIGN'),self::$FOLLOW_NOT_SIGN_in_unaryExpression1578); \n $this->pushFollow(self::$FOLLOW_primaryExpression_in_unaryExpression1580);\n $this->primaryExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:451:5: PLUS primaryExpression \n {\n $this->match($this->input,$this->getToken('PLUS'),self::$FOLLOW_PLUS_in_unaryExpression1586); \n $this->pushFollow(self::$FOLLOW_primaryExpression_in_unaryExpression1588);\n $this->primaryExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11query.g:452:5: MINUS primaryExpression \n {\n $this->match($this->input,$this->getToken('MINUS'),self::$FOLLOW_MINUS_in_unaryExpression1594); \n $this->pushFollow(self::$FOLLOW_primaryExpression_in_unaryExpression1596);\n $this->primaryExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 4 :\n // Sparql11query.g:453:5: primaryExpression \n {\n $this->pushFollow(self::$FOLLOW_primaryExpression_in_unaryExpression1602);\n $this->primaryExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "private function _compileUnary() {\n // unary -\n if ($this->_tokens->accept('-')) {\n $expr = new Sugar_Node_Expr($this->_sugar);\n $expr->operator = Sugar_Runtime::OP_NEGATE;\n $expr->operands []= $this->_compileUnary();\n\n // unary !\n } elseif ($this->_tokens->accept('!')) {\n $expr = new Sugar_Node_Expr($this->_sugar);\n $expr->operator = Sugar_Runtime::OP_NOT;\n $expr->operands []= $this->_compileUnary();\n\n // no unary operator\n } else {\n $expr = $this->_compileValue();\n }\n\n return $expr;\n }", "public function isUnaryOperator(){\n\t\tswitch ($this->type) {\n\t\t\tcase self::T_NOT:\n\t\t\tcase self::T_UNARY_PLUS:\n\t\t\tcase self::T_UNARY_MINUS:\n\t\t\tcase self::T_TERNARY_ELSE:\n\t\t\tcase self::T_DEGRE:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function parseUnaryExpression()\n {\n $operators = $this->unaryOperators;\n if ($this->context->allowAwait) {\n $operators[] = \"await\";\n }\n if ($expr = $this->parsePostfixExpression()) {\n return $expr;\n } elseif ($token = $this->scanner->consumeOneOf($operators)) {\n if ($argument = $this->parseUnaryExpression()) {\n \n $op = $token->getValue();\n \n //Deleting a variable without accessing its properties is a\n //syntax error in strict mode\n if ($op === \"delete\" &&\n $this->scanner->getStrictMode() &&\n $argument instanceof Node\\Identifier) {\n return $this->error(\n \"Deleting an unqualified identifier is not allowed in strict mode\"\n );\n }\n \n if ($op === \"await\") {\n $node = $this->createNode(\"AwaitExpression\", $token);\n } else {\n if ($op === \"++\" || $op === \"--\") {\n $node = $this->createNode(\"UpdateExpression\", $token);\n $node->setPrefix(true);\n } else {\n $node = $this->createNode(\"UnaryExpression\", $token);\n }\n $node->setOperator($op);\n }\n $node->setArgument($argument);\n return $this->completeNode($node);\n }\n\n return $this->error();\n }\n return null;\n }", "private function _parseUnary()\n {\n $this->_recurseEnter();\n \n if ($this->_getCurrentToken()->Id == ExpressionTokenId::MINUS \n || $this->_getCurrentToken()->identifierIs(ODataConstants::KEYWORD_NOT)\n ) {\n $op = clone $this->_getCurrentToken();\n $this->_lexer->nextToken(); \n if ($op->Id == ExpressionTokenId::MINUS \n && (ExpressionLexer::isNumeric($this->_getCurrentToken()->Id))\n ) {\n $numberLiteral = $this->_getCurrentToken();\n $numberLiteral->Text = '-' . $numberLiteral->Text;\n $numberLiteral->Position = $op->Position;\n $v = $this->_getCurrentToken();\n $this->_setCurrentToken($numberLiteral);\n $this->_recurseLeave();\n return $this->_parsePrimary();\n }\n\n $expr = $this->_parsePrimary();\n FunctionDescription::validateUnaryOpArguments($op, $expr);\n if ($op->Id == ExpressionTokenId::MINUS) {\n $expr = new UnaryExpression(\n $expr, ExpressionType::NEGATE, $expr->getType()\n );\n } else {\n $expr = new UnaryExpression(\n $expr, ExpressionType::NOT_LOGICAL, new Boolean()\n );\n }\n\n $this->_recurseLeave();\n return $expr;\n }\n\n $this->_recurseLeave();\n return $this->_parsePrimary();\n }", "public function getUnaryOperators()\n {\n if (!$this->extensionInitialized) {\n $this->initExtensions();\n }\n\n return $this->unaryOperators;\n }", "public function testUnaryOperators()\n {\n // Create with valid parameter count.\n foreach ( $this->unaryOperators as $operator )\n {\n $className = 'ezcTemplate' . $operator . 'OperatorAstNode';\n try\n {\n $operator = new $className();\n $operator->appendParameter( new ezcTemplateVariableAstNode( \"a\" ) );\n $operator->validate();\n }\n catch ( Exception $e )\n {\n self::fail( \"Unary operator <{$className}> with one parameter should not throw an exception.\" );\n }\n }\n\n // Create with invalid parameter count.\n foreach ( $this->unaryOperators as $operator )\n {\n $className = 'ezcTemplate' . $operator . 'OperatorAstNode';\n\n $operator = new $className();\n $failed = false;\n try\n {\n $operator->appendParameter( new ezcTemplateVariableAstNode( \"a\" ) );\n $operator->appendParameter( new ezcTemplateVariableAstNode( \"b\" ) );\n $operator->validate();\n $failed = true;\n }\n catch ( Exception $e )\n {\n }\n if ( $failed )\n {\n self::fail( \"Using two parameters only for unary operator <{$className}> does not throw an exception.\" );\n }\n\n $operator = new $className();\n $failed = false;\n try\n {\n $operator->validate();\n $failed = true;\n }\n catch ( Exception $e )\n {\n }\n if ( $failed )\n {\n self::fail( \"Using no parameters for unary operator <{$className}> does not throw an exception.\" );\n }\n }\n }", "public function __construct(){\n $this->unary_minus_symbol = \"<!\".uniqid().\"!>\"; // replace by something that is not used yet so that it won't be seen as operator\n }", "public static function makeFromSymbol(string $symbol): OperatorInterface;", "function visitBinaryOperator($operator, $lhs, $rhs);", "public static function doUnaryOperation($operator, &$value)\n {\n if (self::$unaryOperations === null) {\n self::$unaryOperations = [\n self::BITWISE_NOT => function (&$i) { return ~$i; },\n self::NOT => function (&$i) { return !$i; },\n self::INCREMENT => function (&$i) { return $i++; },\n self::DECREMENT => function (&$i) { return $i--; },\n self::PRE_INCREMENT => function (&$i) { return ++$i; },\n self::PRE_DECREMENT => function (&$i) { return --$i; },\n self::NEGATION => function (&$i) { return -$i; },\n self::PLUS => function (&$i) { return +$i; },\n ];\n }\n\n if (!isset(self::$unaryOperations[$operator])) {\n throw new PinqException('Unary operator \\'%s\\' is not supported', $operator);\n }\n\n $operation = self::$unaryOperations[$operator];\n\n return $operation($value);\n }", "public function tokenizeUnaryOperation(UnaryOperation $expression,\n\t\tTokenStream $stream, TokenStreamContextInterface $context)\n\t{\n\t\t$stream->text($expression->getOperator());\n\t\tif (\\preg_match('/[a-z][0-9]/i', $expression->getOperator(),\n\t\t\t$this))\n\t\t\t$stream->space();\n\n\t\treturn $stream->expression($expression->getOperand(), $context);\n\t}", "protected function parseUnary($precedence = 0) {\r\n\t\t$ops = self::$unaryPrecedence[$precedence];\r\n\t\tif ($this->token->token == ExprTokenizer::Operator && in_array($this->token->value, $ops)) {\r\n\t\t\t$op = $this->token->value;\r\n\t\t\t$this->token->nextToken();\r\n\t\t} else\r\n\t\t\t$op = false;\r\n\r\n\t\tif ($op)\r\n\t\t\t$ex = $this->parseUnary($precedence);\r\n\t\telse if ($precedence == count(self::$unaryPrecedence)-1)\r\n\t\t\t$ex = $this->parseFactor();\r\n\t\telse\r\n\t\t\t$ex = $this->parseUnary($precedence+1);\r\n\r\n\t\tif ($op)\r\n\t\t\t$ex = new UnaryExpr($op, $ex);\r\n\t\treturn $ex;\r\n\t}", "private function _compileUnaryWithModifiers()\n {\n // compile the base unary expression\n $expr = $this->_compileUnary();\n\n // check for a modifier chain\n if ($this->_tokens->accept('|')) {\n $pexpr = new Sugar_Node_Pipe($this->_sugar);\n $pexpr->node = $expr;\n $pexpr->modifiers = $this->_compileModifiers();\n return $pexpr;\n } else {\n return $expr;\n }\n }", "public function getInfixOperator(string $symbol, ?string $pregId): MetaOperator;", "function operator($op) {\n static $bin = array('+', '-', '*', '/', '%', '&', '|', '^', '>>', '<<', '&&', '||', 'and', 'or', 'xor');\n static $uno = array('_', '~', '!', 'not');\n static $fns = array();\n\n if(isset($fns[$op]))\n return $fns[$op];\n\n if(in_array($op, $bin)) {\n return $fns[$op] = create_function('$a,$b', \"return \\$a $op \\$b;\");\n }\n\n if(in_array($op, $uno)) {\n $fop = $op;\n if($op == '_') $fop = '-';\n if($op == 'not') $fop = '!';\n\n return $fns[$op] = create_function('$a', \"return $fop \\$a;\");\n }\n\n throw new ValueError('invalid operator', $op);\n\n}", "public function walkOperatorExpression(nodes\\expressions\\OperatorExpression $expression);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Should register the service provider and make the media manager available on container.
public function testRegisterWillResolveMediaManagerSingleton() { $this->setDisk('s3'); $this->provider->register(); $container = Container::getInstance(); $this->assertInstanceOf(MediaManager::class, $container->make(MediaManager::class)); }
[ "public function getMediaProviderManager();", "protected function getSonata_Media_Admin_Media_ManagerService()\n {\n return $this->services['sonata.media.admin.media.manager'] = new \\Sonata\\DoctrineORMAdminBundle\\Model\\ModelManager(${($_ = isset($this->services['doctrine']) ? $this->services['doctrine'] : $this->get('doctrine')) && false ?: '_'});\n }", "protected function registerManager()\n {\n $this->app->singleton('upload', function ($app) {\n return tap(new UploadManager($app), function ($manager) {\n $this->registerHandlers($manager);\n });\n });\n }", "private function getMediaFeedService() {\n return $this->container->get('post_feeds.MediaFeeds'); //call media feed service\n }", "protected function getSonata_Media_Serializer_Handler_MediaService()\n {\n return $this->services['sonata.media.serializer.handler.media'] = new \\Sonata\\MediaBundle\\Serializer\\MediaSerializerHandler($this->get('sonata.media.manager.media'));\n }", "protected function registerManager()\n {\n $this->getContainer()->share('filesystem', function () {\n $app = $this->getContainer()->has('app') ? $this->getContainer()->get('app') : null;\n\n return new FilesystemManager($app);\n });\n }", "protected function getMediaManager()\n {\n return $this->get('arnm_media.manager');\n }", "protected function registerManager()\n {\n $this->app->singleton('httpQueue', function($app) {\n return tap(new HttpQueueManager($app), function($manager) {\n $this->registerParsers($manager);\n });\n });\n\n // Register the manager alias as the class name.\n $this->app->alias('httpQueue', HttpQueueManager::class);\n }", "protected function getSonata_Media_Serializer_Handler_MediaService()\n {\n return $this->services['sonata.media.serializer.handler.media'] = new \\Sonata\\MediaBundle\\Serializer\\MediaSerializerHandler(${($_ = isset($this->services['sonata.media.manager.media']) ? $this->services['sonata.media.manager.media'] : $this->get('sonata.media.manager.media')) && false ?: '_'});\n }", "protected function getSonata_Media_Block_MediaService()\n {\n return $this->services['sonata.media.block.media'] = new \\Sonata\\MediaBundle\\Block\\MediaBlockService('sonata.media.block.media', $this->get('templating'), $this, $this->get('sonata.media.manager.media'));\n }", "public function registerMediaCollections(): void\n {\n $this\n ->addMediaCollection('healthworker_images')\n ->singleFile();\n }", "protected function getSonata_Media_Controller_Api_MediaService()\n {\n return $this->services['sonata.media.controller.api.media'] = new \\Sonata\\MediaBundle\\Controller\\Api\\MediaController(${($_ = isset($this->services['sonata.media.manager.media']) ? $this->services['sonata.media.manager.media'] : $this->get('sonata.media.manager.media')) && false ?: '_'}, ${($_ = isset($this->services['sonata.media.pool']) ? $this->services['sonata.media.pool'] : $this->get('sonata.media.pool')) && false ?: '_'}, ${($_ = isset($this->services['form.factory']) ? $this->services['form.factory'] : $this->get('form.factory')) && false ?: '_'});\n }", "public function registerManager(): void\n {\n $this->app->singleton('whmcs', function (Container $app) {\n $config = $app['config'];\n $factory = $app['whmcs.factory'];\n\n return new WhmcsManager($config, $factory);\n });\n\n $this->app->alias('whmcs', WhmcsManager::class);\n }", "protected function registerManager()\n {\n $this->app->singleton('filesystem', function () {\n return new FlysystemOtherManager($this->app);\n });\n }", "protected function registerManager()\n {\n $this->app->singleton('queue', function ($app) {\n // Once we have an instance of the queue manager, we will register the various\n // resolvers for the queue connectors. These connectors are responsible for\n // creating the classes that accept queue configs and instantiate queues.\n return tap(new QueueManager($app), function ($manager) {\n $this->registerConnectors($manager);\n });\n });\n }", "public function exposeManager()\n {\n AspectPHP_Container::setManager($this->getManager());\n }", "protected function getSonata_Media_PoolService()\n {\n $this->services['sonata.media.pool'] = $instance = new \\Sonata\\MediaBundle\\Provider\\Pool('default');\n\n $instance->addContext('default', array(0 => 'sonata.media.provider.dailymotion', 1 => 'sonata.media.provider.youtube', 2 => 'sonata.media.provider.image', 3 => 'sonata.media.provider.file', 4 => 'sonata.media.provider.vimeo'), array('default_small' => array('width' => 100, 'quality' => 70, 'height' => false, 'format' => 'jpg', 'constraint' => true), 'default_big' => array('width' => 500, 'quality' => 70, 'height' => false, 'format' => 'jpg', 'constraint' => true)), array('strategy' => 'sonata.media.security.superadmin_strategy', 'mode' => 'http'));\n $instance->addDownloadStrategy('sonata.media.security.superadmin_strategy', new \\Sonata\\MediaBundle\\Security\\RolesDownloadStrategy(($this->services['translator'] ?? $this->getTranslatorService()), new \\Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationChecker(($this->services['security.token_storage'] ?? $this->services['security.token_storage'] = new \\Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage()), ($this->privates['security.authentication.manager'] ?? $this->getSecurity_Authentication_ManagerService()), ($this->privates['debug.security.access.decision_manager'] ?? $this->getDebug_Security_Access_DecisionManagerService()), false), array(0 => 'ROLE_ADMIN', 1 => 'ROLE_SUPER_ADMIN')));\n $instance->addProvider('sonata.media.provider.image', ($this->services['sonata.media.provider.image'] ?? $this->getSonata_Media_Provider_ImageService()));\n $instance->addProvider('sonata.media.provider.file', ($this->services['sonata.media.provider.file'] ?? $this->getSonata_Media_Provider_FileService()));\n $instance->addProvider('sonata.media.provider.youtube', ($this->services['sonata.media.provider.youtube'] ?? $this->getSonata_Media_Provider_YoutubeService()));\n $instance->addProvider('sonata.media.provider.dailymotion', ($this->services['sonata.media.provider.dailymotion'] ?? $this->getSonata_Media_Provider_DailymotionService()));\n $instance->addProvider('sonata.media.provider.vimeo', ($this->services['sonata.media.provider.vimeo'] ?? $this->getSonata_Media_Provider_VimeoService()));\n\n return $instance;\n }", "protected function getSonata_Media_Block_MediaService()\n {\n return $this->services['sonata.media.block.media'] = new \\Sonata\\MediaBundle\\Block\\MediaBlockService('sonata.media.block.media', ${($_ = isset($this->services['sonata.templating']) ? $this->services['sonata.templating'] : $this->get('sonata.templating')) && false ?: '_'}, $this, ${($_ = isset($this->services['sonata.media.manager.media']) ? $this->services['sonata.media.manager.media'] : $this->get('sonata.media.manager.media')) && false ?: '_'});\n }", "protected function registerManager()\n {\n $this->app->singleton('filesystem', function () {\n return new FlysystemManager($this->app);\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve protocolrelative assets via wp_get_attachment_url
function protocol_relative_attachment_url($url) { if (is_ssl()) { $url = str_replace('http://', 'https://', $url); } return $url; }
[ "public function url() {\n return wp_get_attachment_url($this->id);\n }", "public function getUrl() {\n return \\wp_get_attachment_url($this->WP_Post->ID);\n }", "function otm_document_get_attachment_url() {\n\tif ( $attachment_url = otm_documents_get_attachments_attachment_url() ) {\n\t\treturn $attachment_url;\n\t} else {\n\t\treturn otm_documents_get_wp_attachment_url();\n\t}\n}", "function wp_get_attachment_url( $url ) {\n\t\tif ( defined( 'WP_ADMIN' ) ) {\n\t\t\t$url = trim( $url );\n\n\t\t\tif ( !empty( $url ) ) {\n\t\t\t\t$parsed = parse_url( $url );\n\t\t\t\t$uri = ( isset( $parsed['path'] ) ? $parsed['path'] : '/' ) .\n\t\t\t\t\t\t ( isset( $parsed['query'] ) ? '?' . $parsed['query'] : '' );\n\n\t\t\t\t$wp_upload_dir = wp_upload_dir();\n\t\t\t\t$upload_base_url = $wp_upload_dir['baseurl'];\n\n\t\t\t\tif ( substr($url, 0, strlen( $upload_base_url ) ) == $upload_base_url ) {\n\t\t\t\t\t$common = Dispatcher::component( 'Cdn_Core' );\n\t\t\t\t\t$new_url = $common->url_to_cdn_url( $url, $uri );\n\t\t\t\t\tif ( !is_null( $new_url ) ) {\n\t\t\t\t\t\t$url = $new_url;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n return $url;\n }", "public function get_attachment_url_media_library(){\n\t\t\n\t\t$url = '';\n\t\t$attachmentID = isset($_REQUEST['attachmentID']) ? $_REQUEST['attachmentID'] : '';\n\t\tif($attachmentID){\n\t\t\t$url = wp_get_attachment_url($attachmentID);\n\t\t}\n\t\t\n\t\techo $url;\n\t\t\n\t\tdie();\n\t}", "function otm_documents_get_wp_attachment_url() {\n\t$attachments = get_children( array(\n\t\t'post_parent' => get_the_ID(),\n\t\t'post_type' => 'attachment',\n\t\t'numberposts' => 1,\n\t\t'post_status' => 'any'\n\t) );\n\n\tif ( $attachments ) {\n\t\t$attachment = array_pop( $attachments );\n\t\treturn wp_get_attachment_url( $attachment->ID );\n\t} else {\n\t\treturn '';\n\t}\n}", "protected function getUrl() {\n if ($this->_url != null) {\n return $this->_url;\n }\n\n if (empty($this->id)) {\n return null;\n }\n\n $this->_url = wp_get_attachment_url($this->id);\n return $this->_url;\n }", "function remote_asset_url()\n\t{\n\t\t$remote_url = $this->_remote_url('assets');\n\t\treturn $remote_url;\n\t}", "function use_cdn_attachment_url($url) {\n\treturn str_replace(wp_upload_dir()['baseurl'], UPLOAD_URL_PATH, $url);\n}", "public function getAttachmentBaseUrl()\r\n {\r\n return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . $this->getAttachmentBase();\r\n }", "function fs_asset_url( $asset_abs_path ) {\n $wp_content_dir = fs_normalize_path( WP_CONTENT_DIR );\n $asset_abs_path = fs_normalize_path( $asset_abs_path );\n\n if ( 0 === strpos( $asset_abs_path, $wp_content_dir ) ) {\n // Handle both theme and plugin assets located in the standard directories.\n $asset_rel_path = str_replace( $wp_content_dir, '', $asset_abs_path );\n $asset_url = content_url( fs_normalize_path( $asset_rel_path ) );\n } else {\n $wp_plugins_dir = fs_normalize_path( WP_PLUGIN_DIR );\n if ( 0 === strpos( $asset_abs_path, $wp_plugins_dir ) ) {\n // Try to handle plugin assets that may be located in a non-standard plugins directory.\n $asset_rel_path = str_replace( $wp_plugins_dir, '', $asset_abs_path );\n $asset_url = plugins_url( fs_normalize_path( $asset_rel_path ) );\n } else {\n // Try to handle theme assets that may be located in a non-standard themes directory.\n $active_theme_stylesheet = get_stylesheet();\n $wp_themes_dir = fs_normalize_path( trailingslashit( get_theme_root( $active_theme_stylesheet ) ) );\n $asset_rel_path = str_replace( $wp_themes_dir, '', fs_normalize_path( $asset_abs_path ) );\n $asset_url = trailingslashit( get_theme_root_uri( $active_theme_stylesheet ) ) . fs_normalize_path( $asset_rel_path );\n }\n }\n\n return $asset_url;\n }", "function wp_get_original_image_url($attachment_id)\n {\n }", "function thesaasx_get_img_uri( $path ) {\n\treturn THE_PLUGIN_URL . '/assets/img/'. $path ;\n}", "public function getAbsoluteSrc();", "public function getUrl()\n {\n return phpb_full_url(phpb_config('general.uploads_url') . '/' . $this->public_id . '/' . $this->original_file);\n }", "function get_assets_url() {\n\treturn URL . 'assets/';\n}", "function getExternalUrl() {\n $path = str_replace('\\\\', '/', $this->getTarget());\n return url('shoov/images/' . $path, array('absolute' => TRUE));\n }", "public static function get_asset($ref)\n {\n if('images'==substr($ref,0,6)) {\n $override = 'overrides/' . $ref;\n if (file_exists(PeepSo::get_peepso_dir() . $override)) {\n return (PeepSo::get_peepso_uri() . $override);\n }\n }\n\n $ret = plugin_dir_url(__FILE__) . 'assets/' . $ref;\n\n return ($ret);\n }", "public function wp_get_attachment_url( $url, $attachment_id ) {\n\t\tif ( get_post_meta( $attachment_id, '_rsrgroup_media', true ) ) {\n\t\t\t$url = get_post_meta( $attachment_id, '_wp_attached_file', true );\n\t\t}\n\t\treturn $url;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check all strings within a query were properly escaped (by checking log of what we escaped).
function has_escaped_dynamic_sql($query) { if (substr(get_db_type(), 0, 5) != 'mysql') { // Our scanning may not work right on non-MySQL return true; } $query_call_strings = array('query(', 'query_value_if_there('); $strings = _get_quoted_substrings($query); foreach ($strings as $str) { if (!array_key_exists($str, $GLOBALS['DB_ESCAPE_STRING_LIST'])) { // Not explicitly escaped, so we scan the code to see if it was hard-coded in there foreach (debug_backtrace() as $backtrace_depth => $backtrace) { if ((isset($backtrace['file'])) && (file_exists($backtrace['file']))) { $file = file($backtrace['file']); $ok = false; $found_query_line = false; foreach ($query_call_strings as $query_call_string) { $loc = $file[$backtrace['line'] - 1]; $offset = strpos($loc, $query_call_string); if ($offset !== false) { // First do a fast check on the line itself $found_query_line = true; $_strings = _get_quoted_substrings(substr($loc, $offset), true); if (in_array($str, $_strings)) { $ok = true; } else { // Oh, maybe the string was somewhere escaped in the same file at least $_strings = array(); foreach ($file as $line) { $_strings = array_merge($_strings, _get_quoted_substrings($line, true)); } if (in_array($str, $_strings)) { $ok = true; } } if ($ok) { break 2; } } } if ((!$ok) && ($found_query_line)) { //@var_dump($_strings);@var_dump($GLOBALS['DB_ESCAPE_STRING_LIST']);@exit($str); // Useful for debugging return false; // :-(. } } } } } return true; // :-) }
[ "public function shouldEscape();", "function _sql_escape() { }", "public function sanitize_sql_string()\n\t{\n\t\t$pattern[0] = '/(\\\\\\\\)/';\n\t\t$pattern[1] = \"/\\\"/\";\n\t\t$pattern[2] = \"/'/\";\n\t\t$replacement[0] = '\\\\\\\\\\\\';\n\t\t$replacement[1] = '\\\"';\n\t\t$replacement[2] = \"\\\\'\";\n\t\t$len = strlen($this->_ARGS);\n\t\tif((($this->_MIN != '') && ($len < $this->_MIN)) || (($this->_MAX != '') && ($len > $this->_MAX)))\n\t\t return FALSE;\n\t\treturn preg_replace($pattern, $replacement, $this->_ARGS);\n\t}", "function checkQueryIsOK($query)\n{\n//\techo strpos($query,'%');\n\tif(strpos($query,'%')!==false)\n\t\treturn -1;\n\tif(strpos($query,'_')!==false)\n\t\treturn -1;\n\tif(strpos($query,'<')!==false)\n\t\treturn -1;\n\tif(strpos($query,'>')!==false)\n\t\treturn -1;\n\tif(strpos($query,'*')!==false)\n\t\treturn -1;\n\tif(strpos($query,'(')!==false)\n\t\treturn -1;\n\tif(strpos($query,')')!==false)\n\t\treturn -1;\n\tif(strpos($query,'$')!==false)\n\t\treturn -1;\n\tif(strpos($query,'!')!==false)\n\t\treturn -1;\n\tif(strpos($query,'@')!==false)\n\t\treturn -1;\n\tif(strpos($query,'#')!==false)\n\t\treturn -1;\n\tif(strpos($query,'^')!==false)\n\t\treturn -1;\n\tif(strpos($query,'=')!==false)\n\t\treturn -1;\n\tif(strpos($query,'+')!==false)\n\t\treturn -1;\n\tif(strpos($query,'\"')!==false)\n\t\treturn -1;\n\tif(strpos($query,'`')!==false)\n\t\treturn -1;\n\tif(strpos($query,'{')!==false)\n\t\treturn -1;\n\tif(strpos($query,'}')!==false)\n\t\treturn -1;\n\tif(strpos($query,'[')!==false)\n\t\treturn -1;\n\tif(strpos($query,']')!==false)\n\t\treturn -1;\n\tif(strpos($query,'/')!==false)\n\t\treturn -1;\n\tif(strpos($query,'\\\\')!==false)\n\t\treturn -1;\n\tif(strpos($query,'?')!==false)\n\t\treturn -1;\n\tif(strpos($query,';')!==false)\n\t\treturn -1;\n\tif(strpos($query,':')!==false)\n\t\treturn -1;\n\telse\n\t\treturn 1;\n}", "function checkSQLInjectionURI($uri)\n\t{\n\t\t$sql_injections = RSFirewallHelper::getSQLInjectionWords();\n\t\t$jconfig = new JConfig();\n\t\t$db_prefix = $jconfig->dbprefix;\n\t\t\n\t\t// Check for UNION without any other table name\n\t\tif (preg_match('#[\\d\\W](union select|union join|union distinct)[\\d\\W]#is',$uri)) return true;\n\t\t\n\t\t// Check for an SQL query in the full string\n\t\tif (preg_match('#[\\d\\W]('.implode('|', $sql_injections).')[\\d\\W]#is',$uri) && preg_match('#'.$db_prefix.'(\\w+)#s',$uri) && !preg_match('#\\Wsearchphrase\\b#is',$uri)) return true;\n\t\t\n\t\treturn false;\n\t}", "protected function check_string()\n {\n $string_regex = \"/^string@.*/\";\n $backslash_regex = \"/\\\\\\/\";\n $escape_regex = \"/\\\\\\[0-9]{3}/\";\n $test = preg_match($escape_regex, $this->token);\n $result = preg_match($string_regex, $this->token);\n // checks if token is string\n if($result)\n {\n $backslashes = preg_match_all($backslash_regex, $this->token);\n // if token has backslashes\n if($backslashes > 0)\n {\n // get count of sequences\n $escapes = preg_match_all($escape_regex, $this->token);\n // if there is not same number of escapes and sequences = error\n if($escapes != $backslashes)\n {\n fwrite(STDERR, \"Error, wrong escape sequence!\\n\");\n exit(23);\n }\n }\n }\n }", "function mysql_escape_string ($unescaped_string) {}", "function makeQuerySafe($str)\n{\n $str = str_replace(';', '', $str);\n $str = str_replace('\"', '', $str);\n $str = str_replace('<', '', $str);\n $str = str_replace('>', '', $str);\n return $str;\n}", "function sqlsafe ($str) {\n //$str = str_replace(\"'\", \"''\", $str);\n //$str = stripslashes($str);\n $str = addslashes($str);\n return $str;\n}", "public function supportsQuoting(): bool;", "public function testEscapeLikeWildcards()\n {\n $database = Database::create(['driver' => 'sqlite', 'dsn' => 'sqlite::memory:', 'prefix' => 'prefix_']);\n $database->statement('CREATE TABLE '.$database->addTablePrefix('items').'(id INTEGER PRIMARY KEY ASC, name TEXT)');\n $database->table('items')->insert([\n ['name' => 'foo_bar'],\n ['name' => 'foo%bar'],\n ['name' => 'foo\\\\n\\\\bar']\n ]);\n\n $this->assertEquals(3, $database\n ->table('items')\n ->where('name', 'like', 'foo%bar')\n ->count());\n\n $this->assertEquals([['name' => 'foo%bar']], $database\n ->table('items')\n ->addSelect('name')\n ->where('name', 'like', $database->escapeLikeWildcards('foo%bar'))\n ->get());\n\n $query = $database->table('items')->addSelect('name');\n $query->where('name', 'like', $query->escapeLikeWildcards('foo_bar'));\n $this->assertEquals([['name' => 'foo_bar']], $query->get());\n\n $this->assertEquals([['name' => 'foo\\\\n\\\\bar']], $database\n ->table('items')\n ->addSelect('name')\n ->where('name', 'like', $database->escapeLikeWildcards('foo\\\\n').'%')\n ->get());\n }", "public function testQuotingExpressions(): void\n {\n $this->connection->getDriver()->enableAutoQuoting(true);\n $query = new SelectQuery($this->connection);\n $sql = $query->select('*')\n ->where(['something' => 'value'])\n ->sql();\n $this->assertQuotedQuery('WHERE <something> = :c0', $sql);\n\n $query = new SelectQuery($this->connection);\n $sql = $query->select('*')\n ->where([\n 'something' => 'value',\n 'OR' => ['foo' => 'bar', 'baz' => 'cake'],\n ])\n ->sql();\n $this->assertQuotedQuery('<something> = :c0 AND', $sql);\n $this->assertQuotedQuery('\\(<foo> = :c1 OR <baz> = :c2\\)', $sql);\n }", "function safeQuery($element) {\r\n\treturn !preg_match (\"/[^A-z0-9.')(*#,<>=\\- ]/\", $element);\r\n}", "public function assertEscaped($raw) {\n $this->responseContains($this->escapeHtml($raw));\n }", "public function sql_escape_string($str);", "public function escapeString($connection, $escape_string){}", "public function testEscape()\n\t{\n\t\t$this->assertEquals('foo', $this->_instance->escape('foo'));\n\t}", "public static function isValidQuery(string $query): bool\n {\n return (\n self::isPercentEncodingValid($query) &&\n boolval(preg_match(\"/^[%a-zA-Z0-9\\-._~!$&'()*+,;=:@\\/?]*$/\", $query))\n );\n }", "function sanitize_search_query($query)\n{\n\t$qu_find = array(\n\t\t'/\\s+(\\s*OR\\s+)+/si',\t// remove multiple OR strings\n\t\t'/^\\s*(OR|AND|NOT|-)\\s+/siU', \t\t// remove 'OR/AND/NOT/-' from beginning of query\n\t\t'/\\s+(OR|AND|NOT|-)\\s*$/siU', \t\t// remove 'OR/AND/NOT/-' from end of query\n\t\t'/\\s+(-|NOT)\\s+/si',\t// remove trailing whitespace on '-' controls and translate 'not'\n\t\t'/\\s+OR\\s+/siU',\t\t// capitalize ' or '\n\t\t'/\\s+AND\\s+/siU',\t\t// remove ' and '\n\t\t'/\\s+(-)+/s',\t\t\t// remove ----word\n\t\t'/\\s+/s',\t\t\t\t// whitespace to single space\n\t);\n\t$qu_replace = array(\n\t\t' OR ',\t\t\t// remove multiple OR strings\n\t\t'', \t\t\t// remove 'OR/AND/NOT/-' from beginning of query\n\t\t'',\t\t\t\t// remove 'OR/AND/NOT/-' from end of query\n\t\t' -',\t\t\t// remove trailing whitespace on '-' controls and translate 'not'\n\t\t' OR ',\t\t\t// capitalize 'or '\n\t\t' ',\t\t\t// remove ' and '\n\t\t' -',\t\t\t// remove ----word\n\t\t' ',\t\t\t// whitespace to single space\n\t);\n\t$query = trim(preg_replace($qu_find, $qu_replace, \" $query \"));\n\n\t// show error if query logic contains (apple OR -pear) or (-apple OR pear)\n\tif (strpos($query, ' OR -') !== false OR preg_match('/ -\\w+ OR /siU', $query, $syntaxcheck))\n\t{\n\t\teval(standard_error('Search terms contain invalid syntax: <b>-word1 OR word2</b> / <b>word1 OR -word2</b>'));\n\t}\n\n\t// check that after all our syntax correction we still have a query to work with\n\tif ($query == '')\n\t{\n\t\teval(standard_error(fetch_error('searchspecifyterms')));\n\t}\n\n\t// check that we have some words that are NOT boolean controls\n\t$boolwords = array('AND', 'OR', 'NOT', '-AND', '-OR', '-NOT');\n\tforeach (explode(' ', strtoupper($query)) AS $key => $word)\n\t{\n\t\tif (! in_array($word, $boolwords))\n\t\t{\n\t\t\t// word is good - return the query\n\t\t\treturn $query;\n\t\t}\n\t}\n\n\t// no good words found - show no search terms error\n\teval(standard_error(fetch_error('searchspecifyterms')));\n\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set inherited properties in this style using values in $parent
function inherit(Style $parent) { // Set parent font size $this->_parent_font_size = $parent->get_font_size(); foreach (self::$_inherited as $prop) { //inherit the !important property also. //if local property is also !important, don't inherit. if (isset($parent->_props[$prop]) && (!isset($this->_props[$prop]) || (isset($parent->_important_props[$prop]) && !isset($this->_important_props[$prop])) ) ) { if (isset($parent->_important_props[$prop])) { $this->_important_props[$prop] = true; } //see __set and __get, on all assignments clear cache! $this->_prop_cache[$prop] = null; $this->_props[$prop] = $parent->_props[$prop]; } } foreach ($this->_props as $prop => $value) { if ($value === "inherit") { if (isset($parent->_important_props[$prop])) { $this->_important_props[$prop] = true; } //do not assign direct, but //implicite assignment through __set, redirect to specialized, get value with __get //This is for computing defaults if the parent setting is also missing. //Therefore do not directly assign the value without __set //set _important_props before that to be able to propagate. //see __set and __get, on all assignments clear cache! //$this->_prop_cache[$prop] = null; //$this->_props[$prop] = $parent->_props[$prop]; //props_set for more obvious explicite assignment not implemented, because //too many implicite uses. // $this->props_set($prop, $parent->$prop); $this->__set($prop, $parent->__get($prop)); } } return $this; }
[ "function inherit(StyleParser $parent) {\n\n\n // Set parent font size\n $this->_parent_font_size = $parent->get_font_size();\n\n foreach (self::$_inherited as $prop) {\n //inherit the !important property also.\n //if local property is also !important, don't inherit.\n if ( isset($parent->_props[$prop]) &&\n ( !isset($this->_props[$prop]) ||\n ( isset($parent->_important_props[$prop]) && !isset($this->_important_props[$prop]) )\n )\n ) {\n if ( isset($parent->_important_props[$prop]) ) {\n $this->_important_props[$prop] = true;\n }\n //see __set and __get, on all assignments clear cache!\n\n $this->_props[$prop] = $parent->_props[$prop];\n }\n }\n\n foreach (array_keys($this->_props) as $prop) {\n if ( $this->_props[$prop] === \"inherit\" ) {\n if ( isset($parent->_important_props[$prop]) ) {\n $this->_important_props[$prop] = true;\n }\n //do not assign direct, but\n //implicite assignment through __set, redirect to specialized, get value with __get\n //This is for computing defaults if the parent setting is also missing.\n //Therefore do not directly assign the value without __set\n //set _important_props before that to be able to propagate.\n //see __set and __get, on all assignments clear cache!\n //$this->_prop_cache[$prop] = null;\n //$this->_props[$prop] = $parent->_props[$prop];\n //props_set for more obvious explicite assignment not implemented, because\n //too many implicite uses.\n // $this->props_set($prop, $parent->$prop);\n $this->$prop = $parent->$prop;\n }\n }\n\n return $this;\n }", "public function inheritFromParent(){\n\n if($this->_element->hasParent()) {\n $parentStyle = $this->_element->getParent()->getStyle();\n if($parentStyle){\n foreach (self::INHERITED_VALUES as $key) {\n if (!isset($this->_data[$key])) {\n $parentValue = $parentStyle->get($key);\n if(!empty($parentValue)){\n $this->set($key, $parentValue);\n }\n\n }\n }\n }\n }\n }", "public function inheritProperties($parent)\n {\n foreach ((new ReflectionClass($parent))->getProperties() as $property) {\n\n if($property->isStatic()) {\n continue;\n }\n\n $property->setAccessible(true);\n\n \t$this->{$property->getName()} = $property->getValue($parent);\n\n }\n\n return $this;\n }", "public function propertyPrepareBind($parent, $parentPropertyName)\n\t{\n\t\t// Initialize parent PHPExcel_Style for late binding. This relationship purposely ends immediately when this object\n\t\t// is bound to the PHPExcel_Style object pointed to so as to prevent circular references.\n\t\t$this->_parent\t\t \t\t= $parent;\n\t\t$this->_parentPropertyName\t= $parentPropertyName;\n\t}", "final public function inheritFromStyles(self $styles)/*: self*/\n {\n foreach (['ml', 'mr', 'pl', 'pr', 'width', 'minWidth', 'maxWidth', 'spaceY', 'spaceX'] as $style) {\n $this->properties['parentStyles'][$style] = array_merge(\n isset($this->properties['parentStyles']) && isset($this->properties['parentStyles'][$style]) ? $this->properties['parentStyles'][$style] : [],\n isset($styles->properties['parentStyles']) && isset($styles->properties['parentStyles'][$style]) ? $styles->properties['parentStyles'][$style] : []\n );\n\n $this->properties['parentStyles'][$style][] = isset($styles->properties['styles']) && isset($styles->properties['styles'][$style]) ? $styles->properties['styles'][$style] : 0;\n }\n\n $this->properties['parentStyles']['justifyContent'] = isset($styles->properties['styles']) && isset($styles->properties[' styles']['justifyContent']) ? $styles->properties['styles']['justifyContent'] : false;\n\n foreach (['bg', 'fg'] as $colorType) {\n $value = (array) (isset($this->properties['colors']) && isset($this->properties['colors'][$colorType]) ? $this->properties['colors'][$colorType] : []);\n $parentValue = (array) (isset($styles->properties['colors']) && isset($styles->properties['colors'][$colorType]) ? $styles->properties['colors'][$colorType] : []);\n\n if ($value === [] && $parentValue !== []) {\n $this->properties['colors'][$colorType] = $styles->properties['colors'][$colorType];\n }\n }\n\n if (! is_null(isset($this->properties['options']) && isset($this->properties['options']['bold']) ? $this->properties['options']['bold'] : null) ||\n ! is_null(isset($styles->properties['options']) && isset($styles->properties['options']['bold']) ? $styles->properties['options']['bold'] : null)) {\n $this->properties['options']['bold'] = isset($this->properties['options']) && isset($this->properties['options']['bold']) \n ? $this->properties['options']['bold']\n : (isset($styles->properties['options']) && isset($styles->properties['options']['bold']) ? $styles->properties['options']['bold'] : false);\n }\n\n return $this;\n }", "function updateParentProperties()\r\n {\r\n if (($this->_controlstate & csLoading) != csLoading)\r\n {\r\n $this->updateParentFont();\r\n $this->updateParentColor();\r\n $this->updateParentShowHint();\r\n }\r\n }", "function override($style) {\n $ids = $style->getPropertyIds();\n for($i = 0; $i < count($ids); $i++) {\n $id = $ids[$i];\n $this->setProperty($id[0], $id[1], $style->getProperty($id[0], $id[1]));\n }\n }", "private function _mergeParentStyles()\n {\n $num = \\count($this->_parentStyle);\n if ($num > 0) {\n foreach ($this->_parentStyle as $key => $value) {\n if (!isset($this->_parentStyle[$value])) {\n //the parent style has not itself a parent style\n if (isset($this->_style[$value])) {\n if (isset($this->_style[$key])) {\n $this->_style[$key] = $this->_style[$value] \n . $this->_style[$key];\n } else {\n $this->_style[$key] = $this->_style[$value];\n }\n }\n //we have to take care of the case that there is no span\n //but the parent has an span style\n if (!isset($this->_style[$key . ' span'])\n && isset($this->_style[$value . ' span'])) {\n $this->_style[$key . ' span'] = \n $this->_style[$value . ' span'];\n }\n unset($this->_parentStyle[$key]);\n }\n }\n $this->_mergeParentStyles();\n }\n }", "private function overrideProperties() { \n foreach(array_keys($this->properties) as $i) {\n $p = $this->properties[$i];\n $p->setProject($this->newProject);\n $p->main();\n }\n $this->project->copyInheritedProperties($this->newProject);\n }", "public function setParent($parent);", "public function __clone() {\n $this->style = clone $this->style;\n }", "function inherit() { \n // Determine parent 'display' value\n $handler =& get_css_handler('display');\n\n // 'display' CSS property processed AFTER this; so parent display value will be\n // on the top of the stack\n //\n $parent_display = $handler->get();\n\n // Inherit vertical-align from table-rows \n if ($parent_display === \"table-row\" || $parent_display === \"table\") {\n $this->push($this->get());\n return;\n }\n\n $this->push(is_inline_element($parent_display) ? $this->get() : $this->default_value());\n }", "public function inherit($parent)\n {\n $this->inheritShortDescription($parent);\n $this->inheritLongDescription($parent);\n $this->inheritTags($parent, $this->inherited_tags);\n }", "protected function __construct( &$_parent ) {\n\t\t$this -> parent\t=&\t$_parent;\n\t}", "function setProperties() {\r\n $spacer = str_repeat( \"&nbsp;\", 6);\r\n\r\n printf( \"%s Inside method %s()<br>\", $spacer, __METHOD__ );\r\n $this->public = 'Sub Sub Public';\r\n $this->protected = 'Sub Sub Protected';\r\n $this->private = 'Sub Sub Private'; // sub-class can't overwrite property\r\n }", "public function setParent($parentObject) {}", "public function set_parent($parent)\n {\n // TODO: should be moved to an additional parent layer \"complex_question\" which offers this implementation to\n // EACH\n // complex question object.\n parent::set_parent($parent);\n $this->set_weight($this->get_default_question_weight());\n }", "public function setParent(Klass $parent) {\r\n $this->_parent = $parent;\r\n }", "public function setParent( Restful $parent ) {\n\t\t\t$this->_parent = $parent;\n\t\t\t$this->_isSummary = array_key_exists(\"summary\", $this->_parent->getRequest()->getParams());\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the built entity list
public function getEntityList();
[ "public function getEntities()\n {\n return $this->makeRequest('GET', 'entities');\n }", "public function getEntities() \n {\n $result = array();\n \n foreach ($this->keys as $key => $params) {\n if(isset($params['class'])){\n $rep = $this->em->getRepository($params['class']); \n $result[$key] = $rep->findAll();\n }\n else if(isset($params['list'])) {\n $rep = $this->em->getRepository($this->repository);\n \n $result[$key] = $rep->findParamValues($key);\n }\n }\n \n return $result;\n }", "private function buildEntityNameList()\n {\n $classNameList = array(\n 'IC\\Bundle\\Core\\FieldBundle\\Entity\\Field',\n 'IC\\Bundle\\Core\\FieldBundle\\Entity\\FieldChoice',\n );\n\n $entityNameList = new ArrayCollection($classNameList);\n\n return $entityNameList;\n }", "public function toList() {\r\n if (!count($this->list) && !$this->loaded) {\r\n $this->loaded = true;\r\n\r\n foreach ($this->getData() as $entity) {\r\n $this->treeToList($entity);\r\n }\r\n }\r\n\r\n return $this->list;\r\n }", "public function getEntities() {\n return $this->entities;\n }", "public function getEntities()\n {\n return [\n 'method' => 'GET',\n 'path' => 'entities',\n 'params' => [],\n ];\n }", "public function getList() {\n $result = parent::getList([], sprintf('customers/%s/contactpersons', $this['customer_id']));\n return $this->buildEntitiesFromArray($result);\n }", "public function getAllEntities()\n {\n return $this->getRepository()->findAll();\n }", "protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }", "protected function createNewList() {\n\t\treturn new SimpleEntityList();\n\t}", "public static function loadAll() {\n $query = new EntityFieldQuery();\n $result = $query\n ->entityCondition('entity_type', static::ENTITY_TYPE)\n ->entityCondition('bundle', static::BUNDLE)\n ->execute();\n\n $ids = !empty($result[static::ENTITY_TYPE]) ? array_keys($result[static::ENTITY_TYPE]) : [];\n return static::getWrappers($ids);\n }", "protected function getChildEntities(): array\n {\n return [];\n }", "public function getObjectList() {}", "function ccdev_transactions_list_entities() {\n\tmodule_load_include('inc', 'ccTrans', 'includes/entity_load');\n global $user;\n\n $content = array();\n $rows = array();\n $header = array();\n //'#header' => array(t('ID'), t('userid'), t('coin_id'), t('amount'), t('sender'), t('receiver'), t('tranid'), t('status'), t('timestamp'),),\n\n $header = array(\n 'timestamp' => array(\n 'data' => t('Date + Time'),\n 'type' => 'property',\n 'specifier' => 'timestamp',\n 'field' => 'timestamp'\n ),\n 'receiver' => array(\n 'data' => t('Receiving Address'),\n 'type' => 'property',\n 'specifier' => 'receiver',\n 'field' => 'receiver'\n ),\n 'tranid' => array(\n 'data' => t('Transaction ID'),\n 'type' => 'property',\n 'specifier' => 'tranid',\n 'field' => 'tranid'\n ),\n 'amount' => array(\n 'data' => t('Amount'),\n 'type' => 'property',\n 'specifier' => 'amount',\n 'field' => 'amount'\n ), \n 'fee' => array(\n 'data' => t('Fee'),\n 'type' => 'property',\n 'specifier' => 'amount',\n 'field' => 'amount'\n ), \n 'coin_code' => array(\n 'data' => t('Coin'),\n 'type' => 'property',\n 'specifier' => 'coin_code',\n 'field' => 'coin_code'\n ), \n\t'status' => array(\n 'data' => t('Status'),\n 'type' => 'property',\n 'specifier' => 'status',\n 'field' => 'status'\n ),\n\n );\n //Load entities\n $entities = ccdev_transactions_load_multiple(FALSE, array(), FALSE, $header);\n if (!empty($entities)) {\n foreach ($entities as $entity) {\n\tif($user->uid == $entity->uid || user_access('administer ccdev_trans entities')) {\n\t // Create tabular rows for our entities.\n\t\t$rows[] = array(\n\t\t 'data' => array(\n\t\t\t'timestamp' => $entity->timestamp,\t\t\n\t\t\t'receiver' => $entity->receiver,\n\t\t 'tranid' => $entity->tranid,\n\t\t\t'amount' => $entity->amount,\n \t\t\t'fee' => $entity->fee,\n\t\t\t'coin_code' => $entity->coin_code,\n\t\t\t'status' => $entity->status,\n\t\t\t),\n\t );\n\t\n\t}\n }\n\n // Put our entities into a themed table. See theme_table() for details.\n $content['entity_table'] = array(\n '#theme' => 'table',\n '#rows' => $rows,\n '#header' => $header,\n '#attributes' => array(\n 'id' => 'sort-table')\n );\n\n\n //Add pagination to table\n $content['pager'] = array(\n '#theme' => 'pager');\n\n/*\n // Put our entities into a themed table. See theme_table() for details.\n $content['entity_table'] = array(\n '#theme' => 'table',\n '#rows' => $rows,\n '#header' => array(t('ID'), t('userid'), t('coin_id'), t('amount'), t('sender'), t('receiver'), t('tranid'), t('status'), t('timestamp'),),\n );\n*/\n }\n else {\n // There were no entities. Tell the user.\n $content[] = array(\n '#type' => 'item',\n '#markup' => t('No ccdev_transactions entities currently exist.'),\n );\n }\n return $content;\n}", "function ccdev_wallets_list_entities() {\r\n \tmodule_load_include('inc', 'ccWallets', 'includes/entity_load');\r\n global $user;\r\n\r\n $content = array();\r\n $rows = array();\r\n\r\n $header = array(\r\n 'coins_enabled' => array(\r\n 'data' => t('Coin'),\r\n 'type' => 'property',\r\n 'specifier' => 'coins_enabled',\r\n 'field' => 'coins_enabled'\r\n ),\r\n 'balance_total' => array(\r\n 'data' => t('Balance'),\r\n 'type' => 'property',\r\n 'specifier' => 'basic_id',\r\n 'field' => 'balance_total'\r\n ),\r\n 'pending_total' => array(\r\n 'data' => t('Pending'),\r\n 'type' => 'property',\r\n 'specifier' => 'basic_id',\r\n 'field' => 'pending_total'\r\n ),\r\n 'fee_total' => array(\r\n 'data' => t('Total fees'),\r\n 'type' => 'property',\r\n 'specifier' => 'basic_id',\r\n 'field' => 'fee_total'\r\n ),\r\n 'walletaddress' => array(\r\n 'data' => t('Address'),\r\n 'type' => 'property',\r\n 'specifier' => 'basic_id',\r\n 'field' => 'walletaddress'\r\n ),\r\n 'confirm' => array(\r\n 'data' => t('Confirms'),\r\n 'type' => 'property',\r\n 'specifier' => 'basic_id',\r\n 'field' => 'confirm'\r\n ),\r\n 'timestamp' => array(\r\n 'data' => t('Timestamp'),\r\n 'type' => 'property',\r\n 'specifier' => 'basic_id',\r\n 'field' => 'timestamp'\r\n ),\r\n );\r\n\r\n // Load entities\r\n $entities = ccdev_wallets_load_multiple(FALSE, array(), FALSE, $header);\r\n if (!empty($entities)) {\r\n foreach ($entities as $entity) {\r\n\r\n\t if($user->uid == $entity->uid || user_access('administer ccdev_wallets entities')) {\r\n\t // Create tabular rows for our entities.\r\n\t $rows[] = array(\r\n\t\t'data' => array(\r\n\t\t'coins_enabled' => $entity->coins_enabled,\r\n\t\t'balance_total' => $entity->balance_total,\r\n\t\t'pending_total' => $entity->pending_total,\r\n\t\t'fee_total' => $entity->fee_total,\r\n\t\t'walletaddress' => $entity->walletaddress,\r\n\t\t'confirm' => $entity->confirm,\r\n\t\t'timestamp' => $entity->timestamp, \r\n\t\t),\r\n \t);\r\n }\r\n }\r\n\r\n // Put our entities into a themed table. See theme_table() for details.\r\n $content['entity_table'] = array(\r\n '#theme' => 'table',\r\n '#rows' => $rows,\r\n '#header' => $header,\r\n '#attributes' => array(\r\n 'id' => 'sort-table')\r\n );\r\n\r\n //Add pagination to table\r\n $content['pager'] = array(\r\n '#theme' => 'pager');\r\n \r\n }\r\n else {\r\n // There were no entities. Tell the user.\r\n $content[] = array(\r\n '#type' => 'item',\r\n '#markup' => t('No ccdev_wallets entities currently exist.'),\r\n );\r\n }\r\n return $content;\r\n}", "public function getEntityListName(){\n return $this->getEntityName().\"List\";\n }", "public function all() {\n return $this->app->entityManager->getRepository($this->model_name)->findAll();\n }", "public function all()\n {\n \treturn $this->enterpriseRepo->all();\n }", "public function buildGroupModelEntities();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create request for operation 'entitlementsGetEntitlements'
public function entitlementsGetEntitlementsRequest($business_id, string $contentType = self::contentTypes['entitlementsGetEntitlements'][0]) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $business_id when calling entitlementsGetEntitlements' ); } $resourcePath = '/api/v2/business/{businessId}/entitlements'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // path params if ($business_id !== null) { $resourcePath = str_replace( '{' . 'businessId' . '}', ObjectSerializer::toPathValue($business_id), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( ['application/json', 'text/json', 'application/xml', 'text/xml', ], $contentType, $multipart ); // for model (json/xml) if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; foreach ($formParamValueItems as $formParamValueItem) { $multipartContents[] = [ 'name' => $formParamName, 'contents' => $formParamValueItem ]; } } // for HTTP post (form) $httpBody = new MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); } } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); if ($apiKey !== null) { $headers['apiKey'] = $apiKey; } $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } $headers = array_merge( $defaultHeaders, $headerParams, $headers ); $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); }
[ "public function entitlement()\n {\n return $this->request('POST', 'https://entitlements.auth.riotgames.com/api/token/v1');\n }", "public static function get_entitlements() {\n\t\tRest::verify_request_origin();\n\n\t\t$access_token = self::fetch_access_token();\n\t\t$publication_id = get_option( Plugin::key( 'publication_id' ) );\n\n\t\t// Get entitlements.\n\t\t$entitlements_url = 'https://subscribewithgoogle.googleapis.com/v1/publications/' . $publication_id . '/entitlements?access_token=' . $access_token;\n\t\t$response = wp_remote_get( $entitlements_url );\n\t\treturn json_decode( $response['body'] );\n\t}", "public function getEntitlementsResponse()\n {\n $currentServiceContext = $this->getServiceContext();\n if (!isset($currentServiceContext) || empty($currentServiceContext->realmId)) {\n throw new SdkException(\"Please Setup Service Context before making get entitlements response call.\");\n }\n //The Preferences URL\n $uri = $this->getServiceContext()->IppConfiguration->BaseUrl->Qbo;\n $requestParameters = new RequestParameters($uri, 'GET', CoreConstants::CONTENTTYPE_APPLICATIONXML, null);\n $restRequestHandler = $this->getRestHandler();\n $entitlementsUri = $this->getServiceContext()->IppConfiguration->BaseUrl->Qbo . \"manage/entitlements/v3/\" . $this->serviceContext->realmId;\n list($responseCode, $responseBody) = $restRequestHandler->sendRequest($requestParameters, null, $entitlementsUri, $this->isThrownExceptionOnError());\n $faultHandler = $restRequestHandler->getFaultHandler();\n //$faultHandler now is true or false\n if ($faultHandler) {\n $this->lastError = $faultHandler;\n return null;\n } else {\n $this->lastError = false;\n return simplexml_load_string($responseBody);\n }\n }", "public function setEntitlements($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->entitlements = $arr;\n\n return $this;\n }", "public function getEntitlements()\n {\n return $this->entitlements;\n }", "public function actionEntitlements() {\n\n $token = TWXParam::any('token');\n\n $productIdentifiers = json_decode(TWXParam::any('product_identifiers'), true);\n $appId = TWXParam::any('app_id');\n $appVersion = TWXParam::any('app_version');\n\n if (empty($token)) {\n $this->outputJson([\n 'entitled_products' => [],\n 'mode' => TWX_MODE_HIDE_UNENTITLED,\n 'token' => $token,\n ]);\n } else if ($token == $this->defaultToken) {\n $this->outputJson([\n 'entitled_products' => [TWX_ENTITLE_ALL],\n 'mode' => TWX_MODE_HIDE_UNENTITLED,\n 'token' => $token,\n ]);\n } else {\n $this->outputJsonError('Invalid credentials');\n }\n\n }", "protected function groupEntitlementsListRequest($organization, $apiVersion)\n {\n // verify the required parameter 'organization' is set\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization when calling groupEntitlementsList'\n );\n }\n // verify the required parameter 'apiVersion' is set\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $apiVersion when calling groupEntitlementsList'\n );\n }\n\n $resourcePath = '/{organization}/_apis/groupentitlements';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($apiVersion !== null) {\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\n }\n\n // path params\n if ($organization !== null) {\n $resourcePath = str_replace(\n '{' . 'organization' . '}',\n ObjectSerializer::toPathValue($organization),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token) OR HTTP Basic Authentication with personal access token\n if ($this->config->getAccessToken() !== null) {\n\t\t\t$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n\t\t}\n\n\t\tif ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n\t\t\t$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n\t\t}\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function entitlements()\n {\n return $this->hasMany('Kolab\\Entitlement');\n }", "public function getRequestEntity();", "public static function emailGetListRequest()\n {\n return new EmailGetListRequestBuilder(new EmailGetListRequest());\n }", "public function gETAuthorizationsRequest()\n {\n\n $resourcePath = '/authorizations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function listOptionsAccountRequest()\n {\n\n $resourcePath = '/options/accounts';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires Gate APIv4 authentication\n $signHeaders = $this->config->buildSignHeaders('GET', $resourcePath, $queryParams, $httpBody);\n $headers = array_merge($headers, $signHeaders);\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function build(): RetrieveInventoryChangesRequest\n {\n return CoreHelper::clone($this->instance);\n }", "protected function getAccountRequest()\n {\n\n $resourcePath = '/account';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('partner-key');\n if ($apiKey !== null) {\n $headers['partner-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getIncidentsRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling getIncidents'\n );\n }\n\n $resourcePath = '/incidents/entities/incidents/GET/v1';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function build(): BatchRetrieveInventoryChangesRequest\n {\n return CoreHelper::clone($this->instance);\n }", "public function availableOperationsRequest()\n {\n\n $resourcePath = '/user';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'OPTIONS',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function getPrivateKeysRequest()\n {\n\n $resourcePath = '/v1/account/privkey';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function _getRequest()\r\n {\r\n $request = Mage::getModel('paygate/authorizenet_request')\r\n ->setTerms('Y')\r\n ->setUn($this->getConfigData('login'))\r\n ->setPswd($this->getConfigData('trans_key'));\r\n\r\n return $request;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation getCustomerVouchersWithHttpInfo Get vouchers assigned to a customer
public function getCustomerVouchersWithHttpInfo($identifier) { $request = $this->getCustomerVouchersRequest($identifier); try { $options = $this->createHttpClientOption(); try { $response = $this->client->send($request, $options); } catch (RequestException $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null ); } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } $responseBody = $response->getBody(); switch($statusCode) { case 200: if ('\Vouchery\Model\Voucher[]' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ ObjectSerializer::deserialize($content, '\Vouchery\Model\Voucher[]', []), $response->getStatusCode(), $response->getHeaders() ]; } $returnType = '\Vouchery\Model\Voucher[]'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Vouchery\Model\Voucher[]', $e->getResponseHeaders() ); $e->setResponseObject($data); break; } throw $e; } }
[ "public function getCustomerVouchers($identifier)\n {\n list($response) = $this->getCustomerVouchersWithHttpInfo($identifier);\n return $response;\n }", "public function getSubRewardVouchersWithHttpInfo($reward_id, $accept_language = 'cs, en-gb;q=0.8', $count = '100', $offset = '0', $sort_field = null, $sort_direction = null, $customer_id = null, $store_id = null)\n {\n $returnType = '\\CrmCareCloud\\Webservice\\RestApi\\Client\\Model\\InlineResponse200127';\n $request = $this->getSubRewardVouchersRequest($reward_id, $accept_language, $count, $offset, $sort_field, $sort_direction, $customer_id, $store_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\CrmCareCloud\\Webservice\\RestApi\\Client\\Model\\InlineResponse200127',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\CrmCareCloud\\Webservice\\RestApi\\Client\\Model\\InlineResponse400',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\CrmCareCloud\\Webservice\\RestApi\\Client\\Model\\InlineResponse401',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\CrmCareCloud\\Webservice\\RestApi\\Client\\Model\\InlineResponse403',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\CrmCareCloud\\Webservice\\RestApi\\Client\\Model\\InlineResponse404',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 405:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\CrmCareCloud\\Webservice\\RestApi\\Client\\Model\\InlineResponse405',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\CrmCareCloud\\Webservice\\RestApi\\Client\\Model\\InlineResponse500',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getCustomersByQueryWithHttpInfo($customer_query, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n return $this->getCustomersByQueryWithHttpInfoRetry(true , $customer_query, $_limit, $_offset, $_since, $_sort, $_expand);\n }", "public function getCustomersWithHttpInfo($email = null, $qb_class = null, $quickbooks_code = null, $last_modified_dts_start = null, $last_modified_dts_end = null, $signup_dts_start = null, $signup_dts_end = null, $billing_first_name = null, $billing_last_name = null, $billing_company = null, $billing_city = null, $billing_state = null, $billing_postal_code = null, $billing_country_code = null, $billing_day_phone = null, $billing_evening_phone = null, $shipping_first_name = null, $shipping_last_name = null, $shipping_company = null, $shipping_city = null, $shipping_state = null, $shipping_postal_code = null, $shipping_country_code = null, $shipping_day_phone = null, $shipping_evening_phone = null, $pricing_tier_oid = null, $pricing_tier_name = null, $_limit = '100', $_offset = '0', $_since = null, $_sort = null, $_expand = null)\n {\n return $this->getCustomersWithHttpInfoRetry(true , $email, $qb_class, $quickbooks_code, $last_modified_dts_start, $last_modified_dts_end, $signup_dts_start, $signup_dts_end, $billing_first_name, $billing_last_name, $billing_company, $billing_city, $billing_state, $billing_postal_code, $billing_country_code, $billing_day_phone, $billing_evening_phone, $shipping_first_name, $shipping_last_name, $shipping_company, $shipping_city, $shipping_state, $shipping_postal_code, $shipping_country_code, $shipping_day_phone, $shipping_evening_phone, $pricing_tier_oid, $pricing_tier_name, $_limit, $_offset, $_since, $_sort, $_expand);\n }", "public function getCustomers()\n {\n try {\n $response = $this->api->rest(\n 'GET',\n self::CUSTOMERS_PATH\n );\n if (!empty($response) && $response->response->getstatusCode() == 200) {\n $customers = $response->body->customers;\n if (!empty($customers)) {\n $customers = json_decode(json_encode($customers), true);\n }\n }\n return $customers;\n } catch(\\Exception $e) {\n return [];\n }\n }", "function get_customers()\n\t{\n\t\t$this->path = \"/api/customers/get\";\n\t\treturn $this->_send_request();\n\t}", "public function listCustomers()\n {\n return $this->request('GET', '/customers');\n }", "public function getVouchersAction()\n {\n $vouchers = $this->getRepository()->getVoucherQuery()->getArrayResult();\n $this->View()->assign(['success' => true, 'data' => $vouchers]);\n }", "public function customerSearchWithHttpInfo($virtual_operator, $company_id, $search_criteria_dto_id = null, $search_criteria_dto_owner_company_id = null, $search_criteria_dto_country_code = null, $search_criteria_dto_vat_number = null, $search_criteria_dto_code = null, $search_criteria_dto_name = null, $search_criteria_dto_identification_document_number = null, $search_criteria_dto_offset = null, $search_criteria_dto_number_of_records = null, $search_criteria_dto_sort_field = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\CustomerSummaryDTO[]';\n $request = $this->customerSearchRequest($virtual_operator, $company_id, $search_criteria_dto_id, $search_criteria_dto_owner_company_id, $search_criteria_dto_country_code, $search_criteria_dto_vat_number, $search_criteria_dto_code, $search_criteria_dto_name, $search_criteria_dto_identification_document_number, $search_criteria_dto_offset, $search_criteria_dto_number_of_records, $search_criteria_dto_sort_field);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\CustomerSummaryDTO[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function customersCustomerIdGetWithHttpInfo($customerId)\n {\n $returnType = '\\HappyCog\\OsborneApi\\ErpService\\Model\\Customer';\n $request = $this->customersCustomerIdGetRequest($customerId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\HappyCog\\OsborneApi\\ErpService\\Model\\Customer',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getAllVouchersList()\n {\n try {\n $vouchersList = Voucher::getAllVouchersList();\n return response()->json([\"message\" => \"There are \".count($vouchersList).\" available voucher(s).\", \n \"data\"=>$vouchersList]);\n } catch (NotFoundException $e) {\n return response()->json([\"message\" => $e->getMessage()]);\n }\n }", "public function getCustomersAsyncWithHttpInfo()\n {\n $returnType = '\\Vouchery\\Model\\Customer[]';\n $request = $this->getCustomersRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function vouchers()\n {\n return $this->json_success(self::get_company_statistics(Auth::user()));\n }", "public function getVouchers() {\n $sql = query_Select_Vouchers;\n $stmt = $this->con->prepare($sql);\n $stmt->execute();\n $vouchers = $stmt->get_result();\n $stmt->close();\n\n return $vouchers;\n }", "public function getActiveVouchers() {\n $vouchers = $this->request('GET', \"/vouchers/\");\n return $this->normalizeVoucherList($vouchers);\n }", "public function getPersonalCustomers(): array\n {\n $params = [\n 'verb' => 'listcustomers',\n ];\n\n $response = $this->requester->request($params);\n $json = $this->getJson($response->body);\n\n $result = [];\n\n foreach ($json['data'] as $data) {\n $customer = new Customer($data);\n if (null !== $customer->getIdentifier()) {\n $result[] = $customer;\n }\n }\n\n return $result;\n }", "public function indexCustomersWithHttpInfo($company_name = null, $search = null)\n {\n $returnType = '\\RackbeatApp\\Client\\Model\\CustomersList';\n $request = $this->indexCustomersRequest($company_name, $search);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse()->getBody()->getContents()\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\RackbeatApp\\Client\\Model\\CustomersList',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function customerDetailsWithHttpInfo($virtual_operator, $company_id, $id)\n {\n $returnType = '\\Swagger\\Client\\Model\\CustomerDTO';\n $request = $this->customerDetailsRequest($virtual_operator, $company_id, $id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\CustomerDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function customerGetAllDocumentsForCustomerBycustomerNumberWithHttpInfo($customer_number, $document_type = null, $released = null, $dunning_level = null, $closed_financial_period = null, $dunning_letter_date_time = null, $dunning_letter_date_time_condition = null, $project = null, $expand_applications = null, $expand_dunning_information = null, $expand_attachments = null, $expand_tax_details = null, $expand_invoice_address = null, $financial_period = null, $document_due_date = null, $status = null, $number_to_read = null, $skip_records = null, $external_reference = null, $payment_reference = null, $customer_ref_number = null, $greater_than_value = null, $last_modified_date_time = null, $last_modified_date_time_condition = null, $created_date_time = null, $created_date_time_condition = null, $page_number = null, $page_size = null)\n {\n $returnType = '\\Ekstralys\\VismaNetApi\\Model\\CustomerDocumentDto[]';\n $request = $this->customerGetAllDocumentsForCustomerBycustomerNumberRequest($customer_number, $document_type, $released, $dunning_level, $closed_financial_period, $dunning_letter_date_time, $dunning_letter_date_time_condition, $project, $expand_applications, $expand_dunning_information, $expand_attachments, $expand_tax_details, $expand_invoice_address, $financial_period, $document_due_date, $status, $number_to_read, $skip_records, $external_reference, $payment_reference, $customer_ref_number, $greater_than_value, $last_modified_date_time, $last_modified_date_time_condition, $created_date_time, $created_date_time_condition, $page_number, $page_size);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Ekstralys\\VismaNetApi\\Model\\CustomerDocumentDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a cookie of the given name with the specified data for the given length of time.
public function setCookie($name, $cookiedata, $cookietime) { $name_data = rawurlencode($this->targetSystemConfig['cookie_name'] . '_' . $name) . '=' . rawurlencode($cookiedata); $expire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $cookietime); $domain = (!$this->targetSystemConfig['cookie_domain'] || $this->targetSystemConfig['cookie_domain'] == 'localhost' || $this->targetSystemConfig['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $this->targetSystemConfig['cookie_domain']; header('Set-Cookie: ' . $name_data . '; expires=' . $expire . '; path=' . $this->targetSystemConfig['cookie_path'] . $domain . ((!$this->targetSystemConfig['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false); }
[ "function set_pws_cookie($name,$cookieData,$exp){\n $hashedCookie = md5($cookieData);\n setcookie($name,$hashedCookie,time()+$exp);\n }", "function set($name = \"\", $value = \"\", $expire = null, $path = \"/\", $domain = \"\", $secure = false, $httponly = false)\n {\n if (!$expire) {\n $expire = time() + 60*60*24*365*2;\n }\n setcookie($name, $value, (int) $expire, $path, $domain, $secure, $httponly);\n $_COOKIE[$name] = $value;\n }", "function set_cookie( $key, $value, $time = SECONDS_IN_HOUR ) {\n\tsetcookie( $key, $value, time() + $time, '/' );\n}", "function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = false)\n\t{\n if (is_array($name)) {\n extract($name);\n }\n\n $coockie = new Cookie($prefix.$name, $value, $expire, $path, $domain, $secure, false);\n\n $this->response->headers->setCookie($coockie);\n\n\t}", "function CWLIB_cookieVarWrite($aName, $aValue)\n{\n setcookie($aName, $aValue, time() + 60 * 60 * 24 * 365, '/');\n $_COOKIE[$aName] = $aValue;\n}", "private function setCookie() {\r\n\t\t$data = md5($this->id.'|'.$this->username.'|'.$this->created);\r\n\t\tsetcookie($this->cookieName, $data, time() + $this->cookieDuration, '/', '.'.$this->domain); // two week login cookie\r\n\t}", "public function setCookie($name,$value,$expires) {\n\t\tif ($this->p3p != '') {\n\t\t\theader($this->p3p);\n\t\t\t$this->p3p = '';\n\t\t}\n\t\tsetcookie ($name,$value,$expires,\"/\"); \n\t}", "function setCookie($cookie);", "public function addCookie($name, $value);", "public function setCookie($cookieName, $value) \r\n {\r\n $expirationTime = 3600;\r\n setcookie($cookieName, $value, time() + $expirationTime);\r\n }", "public function addCookie ($name, $value);", "public function setCookieValue($value, $time = 31536000)\n\t{\n\t\t$cookieName = XenForo_Application::getOptions()->liam_aed_cookiename;\n\n\t\tif ($value === false)\n\t\t{\n\t\t\tsetcookie($cookieName, false, XenForo_Application::$time - 3600);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetcookie($cookieName, $value, XenForo_Application::$time + $time);\n\t\t}\n\t}", "function writeCartCookie($data)\n {\n $cookieInfo = base64_encode(serialize($data)); \n $a = setcookie($this->cookieName, $cookieInfo, time() + $this->cookieLife);\n }", "function set_cookie($name,$value,$days=30){\n\t\t$expiretime = time() + (86400 * $days);\n\t\tsetcookie(APP_ID.$name, $value, $expiretime,\"/\");\n\t}", "function modify_cookie($name,$value)\n{\n setcookie($name,$value);\n}", "public function set(\n $name,\n $value = null,\n $lifetime = null,\n $path = null,\n $domain = null,\n $secure = null,\n $httpOnly = true\n ) {\n $cookie = $this->create($name, $value, $lifetime, $path, $domain, $secure, $httpOnly);\n $this->scheduled[] = $cookie;\n\n return $cookie;\n }", "private function _set_cookie()\n\t{\t\t\n\t\t// Serialize the userdata for the cookie\n\t\t$cookie_data = serialize($this->userdata['user_data']);\n\t\t\n\t\t// Expiration time\n\t\t$expire = ($this->expire_on_close) ? 0 : $this->sess_expiration + time();\n\t\t\n\t\t// Set the cookie\n\t\tsetcookie(\n\t\t\t$this->cookie_name,\n\t\t\t$cookie_data,\n\t\t\t$expire,\n\t\t\t$this->cookie_path,\n\t\t\t$this->cookie_domain,\n\t\t);\n\t}", "public function setRawCookie($name, $value, $time = '+30 days', $path = '', $domain = '', $secure = false, $httponly = false){\n\n if(is_int($time)){\n $time = time() + $time;\n } else if(is_string($time)){\n $time = strtotime($time);\n }//elif\n\n if(is_array($value) || is_object($value)){\n $value = json_encode($value);\n }//if\n\n return setrawcookie($name,$value,$time,$path,$domain,$secure,$httponly);\n\n }", "static function setData(){\n\t\tsetcookie('data',Encryption::encrypt(serialize(self::$data)),0,'/');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end method kira jenis keputusan markah stress
function papar_keputusan_stress($skor3){ switch($skor3){ case in_array($skor3, range(0,7)): $keputusan= 'NORMAL'; break; case in_array($skor3, range(8,9)): $keputusan= 'RINGAN'; break; case in_array($skor3, range(10,13)): $keputusan= 'SEDERHANA'; break; case in_array($skor3, range(14,17)): $keputusan= 'TERUK'; break; case ($skor3 >= 18 ): $keputusan= 'SANGAT TERUK'; break; } return $keputusan; }
[ "function hitung_gain( $kasus, $atribut, $ent_all, $kondisi1, $kondisi2, $kondisi3, $kondisi4, $kondisi5) {\n $ci =& get_instance();\n\t$data_kasus = '';\n if ($kasus != '') {\n $data_kasus = $kasus . \" AND \";\n }\n\n \n \t$j_SANGATBAIK1 = jumlah_data( \"$data_kasus hasil='SANGAT BAIK' AND $kondisi1\");\n \t$j_BAIK1 = jumlah_data( \"$data_kasus hasil='BAIK' AND $kondisi1\");\n $j_CUKUP1 = jumlah_data( \"$data_kasus hasil='CUKUP' AND $kondisi1\");\n \t$jml1 = $j_SANGATBAIK1 + $j_BAIK1 + $j_CUKUP1;\n \n \t$j_SANGATBAIK2 = jumlah_data( \"$data_kasus hasil='SANGAT BAIK' AND $kondisi2\");\n \t$j_BAIK2 = jumlah_data( \"$data_kasus hasil='BAIK' AND $kondisi2\");\n $j_CUKUP2 = jumlah_data( \"$data_kasus hasil='CUKUP' AND $kondisi2\");\n \t$jml2 = $j_SANGATBAIK2 + $j_BAIK2 + $j_CUKUP2 ;\n \n \t$j_SANGATBAIK3 = jumlah_data( \"$data_kasus hasil='SANGAT BAIK' AND $kondisi3\");\n \t$j_BAIK3 = jumlah_data( \"$data_kasus hasil='BAIK' AND $kondisi3\");\n $j_CUKUP3 = jumlah_data( \"$data_kasus hasil='CUKUP' AND $kondisi3\");\n \t$jml3 = $j_SANGATBAIK3 + $j_BAIK3 + $j_CUKUP3 ;\n\t\t\n\t\t$j_SANGATBAIK4 = jumlah_data( \"$data_kasus hasil='SANGAT BAIK' AND $kondisi4\");\n \t$j_BAIK4 = jumlah_data( \"$data_kasus hasil='BAIK' AND $kondisi4\");\n $j_CUKUP4 = jumlah_data( \"$data_kasus hasil='CUKUP' AND $kondisi4\");\n \t$jml4 = $j_SANGATBAIK4 + $j_BAIK4 + $j_CUKUP4 ;\n\t\t\n\t\t$j_SANGATBAIK5 = jumlah_data( \"$data_kasus hasil='SANGAT BAIK' AND $kondisi5\");\n \t$j_BAIK5 = jumlah_data( \"$data_kasus hasil='BAIK' AND $kondisi5\");\n $j_CUKUP5 = jumlah_data( \"$data_kasus hasil='CUKUP' AND $kondisi5\");\n \t$jml5 = $j_SANGATBAIK5 + $j_BAIK5 + $j_CUKUP5 ;\n \n \t//hitung entropy masing-masing kondisi\n \t$jml_total = $jml1 + $jml2 + $jml3+ $jml4+ $jml5;\n \t$ent1 = hitung_entropy($j_SANGATBAIK1 , $j_BAIK1, $j_CUKUP1);\n \t$ent2 = hitung_entropy($j_SANGATBAIK2 , $j_BAIK2, $j_CUKUP2);\n \t$ent3 = hitung_entropy($j_SANGATBAIK3 , $j_BAIK3, $j_CUKUP3);\n\t\t$ent4 = hitung_entropy($j_SANGATBAIK4 , $j_BAIK4, $j_CUKUP4);\n\t\t$ent5 = hitung_entropy($j_SANGATBAIK5 , $j_BAIK5, $j_CUKUP5);\n\t\t\n \t$gain = $ent_all - ((($jml1/$jml_total)*$ent1) + (($jml2/$jml_total)*$ent2) + (($jml3/$jml_total)*$ent3)+ (($jml4/$jml_total)*$ent4)+ (($jml5/$jml_total)*$ent5));\t\t\t\t\t\t\t\n \t//desimal 3 angka dibelakang koma\n \t$gain = format_decimal($gain);\n\t\t\n \techo \"<tr>\";\n \techo \"<td style='text-align:center;'>\".$kondisi1.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$jml1.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_SANGATBAIK1.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_BAIK1.\"</td>\";\n echo \"<td style='text-align:center;'>\".$j_CUKUP1.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$ent1.\"</td>\";\n \techo \"<td style='text-align:center;'>&nbsp;</td>\";\n \techo \"</tr>\";\n \techo \"<tr>\";\n \techo \"<td style='text-align:center;'>\".$kondisi2.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$jml2.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_SANGATBAIK2.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_BAIK2.\"</td>\";\n echo \"<td style='text-align:center;'>\".$j_CUKUP2.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$ent2.\"</td>\";\n \techo \"<td style='text-align:center;'>&nbsp;</td>\";\n \techo \"</tr>\";\n \techo \"<tr>\";\n \techo \"<td style='text-align:center;'>\".$kondisi3.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$jml3.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_SANGATBAIK3.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_BAIK3.\"</td>\";\n echo \"<td style='text-align:center;'>\".$j_CUKUP3.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$ent3.\"</td>\";\n \techo \"<td style='text-align:center;'>&nbsp;</td>\";\n \techo \"</tr>\";\n\t\techo \"<tr>\";\n \techo \"<td style='text-align:center;'>\".$kondisi4.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$jml4.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_SANGATBAIK4.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_BAIK4.\"</td>\";\n echo \"<td style='text-align:center;'>\".$j_CUKUP4.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$ent4.\"</td>\";\n \techo \"<td style='text-align:center;'>&nbsp;</td>\";\n \techo \"</tr>\";\n\t\techo \"<tr>\";\n \techo \"<td style='text-align:center;'>\".$kondisi5.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$jml5.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_SANGATBAIK5.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$j_BAIK5.\"</td>\";\n echo \"<td style='text-align:center;'>\".$j_CUKUP5.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$ent5.\"</td>\";\n \techo \"<td style='text-align:center;'>\".$gain.\"</td>\";\n \techo \"</tr>\";\n \techo \"<tr><td colspan='8'></td></tr>\";\n \n \t\n $ci->db->query(\"INSERT INTO t_gain VALUES ('','1','$atribut','$gain')\");\n}", "function resource_stress_test() \n\t{\n\t\t// set demand couters\n\t\t$food_demand = $this->food_stress_coefficient * $this->current_creature_count;\n\t\t$water_demand = $this->water_stress_coefficient * $this->current_creature_count;\n\n\t\t// Set $this->resources_stressed\n\t\t$this->stressed = ($water_demand > $this->monthly_water OR $food_demand > $this->monthly_food);\n\n\t\tif($this->stressed)\n\t\t{\n\t\t\tlog::record('Food and/or water resources are currently stressed!', 3);\n\t\t}\n\t}", "public function jumlahperjam(){\n\t\tdate_default_timezone_set(\"Asia/Jakarta\");\n\t\t$this->load->model('overview_model');\n\t\tif (isset($_GET['data'])) {\n\t\t\t// $clock = $this->input->get('data');\n\t\t\t$clock = date('H');\n\t\t\t$day = date('d');\n\n\t\t\t$currentlyh1 = $this->overview_model->ambil_currently1();\n\t\t\t$currentlyh2 = $this->overview_model->ambil_currently2();\n\t\t\t$currentlyh3 = $this->overview_model->ambil_currently3();\n\t\t\t$currentlyh4 = $this->overview_model->ambil_currently4();\n\t\n\t\t\t$crh1 = 0;\n\t\t\tforeach ($currentlyh1 as $data1){\n\t\t\t\t$crh1 += $data1->power;\n\t\t\t}\n\t\t\tforeach ($currentlyh2 as $data2){\n\t\t\t\t$crh1 += $data2->power;\n\t\t\t}\n\t\t\tforeach ($currentlyh3 as $data3){\n\t\t\t\t$crh1 += $data3->power;\n\t\t\t}\n\t\t\tforeach ($currentlyh4 as $data4){\n\t\t\t\t$crh1 += $data4->power;\n\t\t\t}\n\n\t\t\t$insert = array('power' => $crh1, 'time' => time(), 't' => $clock, 'd' => $day);\n\t\t\tif ($this->overview_model->power_s1h($insert)){\n\t\t\t\t$this->overview_model->delete_sensor($clock);\n\t\t\t\techo \"BERHASIL\";\n\t\t\t}else{\n\t\t\t\techo \"ERROR\";\n\t\t\t}\n\n\t\t}else{\n\t\t\techo \"Variabel data tidak terdefinisi\";\n\t\t}\n\t}", "public function keterangantempatusahacetakAction() {\n $id_permintaan_keterangan_tempat_usaha = $this->_getParam(\"id_permintaan_keterangan_tempat_usaha\");\n $this->view->hasil = $this->surat_serv->getketerangantempatusahacetak($id_permintaan_keterangan_tempat_usaha);\n }", "public function cek_lembur()\n {\n $batas_jam_pagi = strtotime('07:00');\n $batas_pra_pagi = strtotime('07:30');\n $batas_jam_akhir = strtotime('17:00');\n $tambahan = 0;\n $status = 'NORMAL';\n\n $jamberangkat = $this->input->post('jamberangkat');\n $jamkerja = $this->input->post('jamkerja');\n $jamAkhir = $this->input->post('jamAkhir');\n $jamAwal = $this->input->post('jamAwal');\n $bulan = $this->input->post('bulan');\n $mobil_id = $this->input->post('mobil_id');\n $isHotmix = $this->input->post('isHotmix');\n\n $akhir = strtotime($jamAkhir);\n $awal = strtotime($jamAwal);\n \n $berangkat = strtotime($jamberangkat);\n $kerja = strtotime($jamkerja);\n\n $isAda = $this->dt_model->get_dt_on_tgl_and_mobil($bulan, intval($mobil_id));\n\n $count_sebelum = 0;\n $count_sesudah = 0;\n $count_pra = 0;\n \n if($isHotmix == 1){\n\n if($kerja > $batas_jam_pagi && $kerja < $batas_pra_pagi){\n $diff = ($kerja - $batas_pra_pagi);\n if($diff < 0){\n $status = 'LEMBUR';\n $jam = abs($diff/3600);\n }else{\n $jam = abs($diff/3600); \n }\n foreach($isAda->result() as $result){\n if(strtotime($result->jam_tiba) > $batas_jam_pagi && strtotime($result->jam_tiba) < $batas_pra_pagi){\n $count_pra +=1;\n }\n }\n if($count_pra >= 0 && $count_pra < 4){\n $tambahan +=10000;\n }\n }\n\n if($kerja < $batas_jam_pagi){\n $diff = ($kerja - $batas_jam_pagi);\n if($diff < 0){\n $status = 'LEMBUR';\n $jam = abs($diff/3600);\n }else{\n $jam = abs($diff/3600); \n }\n foreach($isAda->result() as $result){\n if(strtotime($result->jam_tiba) < $batas_jam_pagi){\n $count_sebelum +=1;\n }\n }\n if($count_sebelum >= 0 && $count_sebelum < 4){\n $tambahan +=20000;\n }\n }\n\n if($kerja > $batas_jam_akhir){\n $diff = ($kerja-$batas_jam_akhir);\n if($diff > 0){\n $status = 'LEMBUR';\n $jam = abs($diff/3600);\n }else{\n $jam = abs($diff/3600); \n }\n foreach($isAda->result() as $result){\n if(strtotime($result->jam_tiba) > $batas_jam_akhir){\n $count_sesudah +=1;\n }\n }\n if($count_sesudah >= 0 && $count_sesudah < 4){\n $tambahan +=20000;\n }\n }\n \n // if($isAda->num_rows() >= 0 && $isAda < 4){\n // if($berangkat < $batas_jam_pagi ){\n // $tambahan += 20000;\n // }\n // if($kerja > $batas_jam_akhir){\n // $tambahan += 20000;\n // }\n // }\n\n }\n \n\n \n\n echo json_encode(array(\n 'status_lembur'=>$status, \n 'tambahan'=>$tambahan,\n 'jam_berangkat'=>$jamberangkat,\n 'jam_kerja'=>$jamkerja,\n 'mobil_id'=>$mobil_id,\n 'bulan'=>$bulan,\n 'isHotmix'=>$isHotmix,\n 'jam_akhir'=>$jamAkhir,\n 'jam_awal'=>$jamAwal,\n 'count_sebelum'=>$count_sebelum,\n 'count_sesudah'=>$count_sesudah\n ));\n }", "public function actionHitungKecamatan($metodebilacak, $metodeperhitungan, $bulan) {\n ini_set('max_execution_time', 300000000);\n $time_start = microtime(true);\n \n $return['kecamatan'] = 'kecamatan';\n $return['metodebilacak'] = $metodebilacak;\n $return['metodeperhitungan'] = $metodeperhitungan;\n $return['bulan'] = $bulan;\n \n $saveprediksi = [];\n $iprediksi = 0;\n $bulan = (int)$bulan;\n \n $kecamatan = Kecamatan::find()->asArray()->all();\n \n for($b = 1; $b <= $bulan; $b++){\n if($b < 10){\n $sbulan = '0'.$b;\n } else {\n $sbulan = ''.$b;\n }\n \n for($iteration = 0; $iteration < sizeof($kecamatan); $iteration++){\n $dbd = DbdNormal::findBySql(\"\n SELECT *\n FROM dbd_normal\n WHERE tanggal < '2012-\".$sbulan.\"-01' AND id_kecamatan = \". $kecamatan[$iteration]['id'] .\"\n \")->asArray()->all();\n if($b > 1){\n for($i=1; $i<$b; $i++){\n $dbd[35+$i]['kasus'] = $saveprediksi[$b-1][$kecamatan[$iteration]['id']];\n //qwerty\n }\n }\n\n $dbd2 = DbdNormal::findBySql(\"\n SELECT *\n FROM dbd_normal\n WHERE tanggal LIKE '%2012-\".$sbulan.\"-01%' AND id_kecamatan = \". $kecamatan[$iteration]['id'] .\"\n \")->asArray()->all();\n\n //Acak Solusi\n if($metodeperhitungan == 'linear'){\n if($metodebilacak == 'biasa'){\n $solusi = acakSolusi(5);\n } else {\n $solusi = randomRatarataNol(5);\n }\n } else {\n if($metodebilacak == 'biasa'){\n $solusi = acakSolusi(8);\n } else{\n $solusi = randomRatarataNol(8);\n }\n }\n\n //perhitungan\n if($metodeperhitungan == 'linear'){\n //Hitung Error \n $hitung = hitungLinear2($solusi, $dbd);\n $error_tiap_data = $hitung['error_tiap_data'];\n $error = average($error_tiap_data);\n\n //Prediksi\n $hitung2 = hitungLinear2($solusi, $dbd2);\n $error_tiap_data2 = $hitung2['error_tiap_data'];\n $error2 = average($error_tiap_data2);\n } else {\n //Hitung Error \n $hitung = hitungKuadratik2($solusi, $dbd);\n $error_tiap_data = $hitung['error_tiap_data'];\n $error = average($error_tiap_data);\n\n //Prediksi\n $hitung2 = hitungKuadratik2($solusi, $dbd2);\n $error_tiap_data2 = $hitung2['error_tiap_data'];\n $error2 = average($error_tiap_data2);\n }\n\n //Penetapan Smin dan Emin\n $solusi_min = $solusi;\n $error_min = $error;\n\n //Prediksi\n $error_min2 = $error2;\n\n //Inisialisasi K dan T\n $K = $error_min * 10;\n //$T = 0.8;\n $T = 0.1; $T0 = 0.1; $Tn = 0.0001;\n\n //Prediksi\n $K2 = $error_min2 * 10;\n\n //prediksi min\n $prediksi_min = average($hitung['prediksi_tiap_data']);\n\n //Prediksi\n $prediksi_min2 = average($hitung2['prediksi_tiap_data']);\n\n $max_iterasi = 500;\n for ($iterasi = 0; $iterasi < $max_iterasi; $iterasi++){\n //Acak Solusi\n if($metodeperhitungan == 'linear'){\n if($metodebilacak == 'biasa'){\n $solusi = acakSolusi(5);\n } else{\n $solusi = randomRatarataNol(5);\n }\n } else {\n if($metodebilacak == 'biasa'){\n $solusi = acakSolusi(8);\n } else{\n $solusi = randomRatarataNol(8);\n }\n }\n\n if($metodeperhitungan == 'linear'){\n //Hitung Error\n $hitung = hitungLinear2($solusi, $dbd);\n $error = average($hitung['error_tiap_data']);\n $prediksi = average($hitung['prediksi_tiap_data']);\n\n //Prediksi\n $hitung2 = hitungLinear2($solusi, $dbd2);\n $error2 = average($hitung2['error_tiap_data']);\n $prediksi2 = average($hitung2['prediksi_tiap_data']);\n } else {\n //Hitung Error\n $hitung = hitungKuadratik2($solusi, $dbd);\n $error = average($hitung['error_tiap_data']);\n $prediksi = average($hitung['prediksi_tiap_data']);\n\n //Prediksi\n $hitung2 = hitungKuadratik2($solusi, $dbd2);\n $error2 = average($hitung2['error_tiap_data']);\n $prediksi2 = average($hitung2['prediksi_tiap_data']);\n }\n\n //Pengubahan Smin dan Emin\n $r = (float)rand()/(float)getrandmax();\n if($K == 0){\n $K = 1;\n }\n $exp = exp( -($error - $error_min)/($K * $T));\n\n //Prediksi\n if($K2 == 0){\n $K2 = 1;\n }\n $exp2 = exp( -($error2 - $error_min2)/($K2 * $T));\n\n if($r < $exp){ //Simulated Annealing\n //if($error_min > $error){ //Montecarlo\n $solusi_min = $solusi;\n $error_min = $error;\n $prediksi_min = $prediksi;\n\n $error_min2 = $error2;\n $prediksi_min2 = $prediksi2;\n }\n\n //Pengubahan Temperature\n $coolingRate = 0.2;\n // $T = $T * (1 - $coolingRate);\n $T = $T0 * pow($Tn/$T0, $iterasi/$max_iterasi);\n\n if(isset($prediksi_min2)){\n $return['prediksi_min'] = abs($prediksi_min2);\n } else{\n $return['prediksi_min'] = abs($prediksi2);\n var_dump($iterasi .\" : \". $prediksi2); die();\n }\n $return['t_akhir'] = $T;\n if($iterasi%100 == 0){\n //ntar dibuka ya\n //$params['error_min'][] = abs(sum($hitung2['kasus']) - $params['prediksi_min']);\n }\n }\n\n $data = DbdFix::findBySql(\"\n SELECT df.kasus as 'kasus', df.id_kecamatan as 'id_kecamatan'\n FROM dbd_fix df\n WHERE df.tanggal LIKE '%2012-\".$sbulan.\"%' AND df.id_kecamatan = \".$kecamatan[$iteration]['id'].\"\n GROUP BY id_kecamatan\n \")->asArray()->one();\n \n if($metodeperhitungan == 'linear'){\n $hitung2 = hitungLinear2($solusi_min, $dbd2);\n } else {\n $hitung2 = hitungKuadratik2($solusi_min, $dbd2);\n }\n $avgsaveprediksi = number_format(average($hitung2['prediksi_tiap_data']), 2);\n if($avgsaveprediksi < 0){\n $avgsaveprediksi = 0;\n }\n \n \n $prediksi2 = denormalisasi($hitung2['prediksi_tiap_data']);\n // $return[$iteration]['solusi'] = $solusi_min;\n $avgprediksi = round(average($prediksi2));\n $err = abs($data['kasus'] - $avgprediksi);\n $return[$iteration]['table']['kecamatan'] = $kecamatan[$iteration]['nama_kecamatan'];\n $return[$iteration]['table']['kasus'] = $data['kasus'];\n $return[$iteration]['table']['prediksi'] = $avgprediksi;\n $return[$iteration]['table']['error'] = $err;\n \n //$saveprediksi[$b][$data['id_kecamatan']]['id_kecamatan'] = $data['id_kecamatan'];\n $saveprediksi[$b][$data['id_kecamatan']] = $avgsaveprediksi;\n\n $kml[$iteration]['table']['kecamatan'] = $kecamatan[$iteration]['nama_kecamatan'];\n $kml[$iteration]['table']['kasus'] = $data['kasus'];\n $kml[$iteration]['table']['prediksi'] = $avgprediksi;\n $kml[$iteration]['table']['error'] = $err;\n\n $kml_asli[$iteration]['table']['kecamatan'] = $kecamatan[$iteration]['nama_kecamatan'];\n $kml_asli[$iteration]['table']['kasus'] = $data['kasus'];\n \n $iprediksi++;\n \n// Helper::vdump($dbd);\n// echo \"=============\";\n// if($b == 4){\n// die();\n// }\n }\n }\n \n// Helper::vdump($return);\n// die(\"a\");\n \n $time_end = microtime(true);\n $time = $time_end - $time_start;\n \n createKMLKecamatan2($return);\n createKMLKecamatan($return);\n \n return $return;\n }", "function BD2_739_VER01_PARAMETER04($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n\r\n </tr>\r\n </table>\";\r\n\r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_dok_qa , u.tsubmit_prareg ,\r\n ABS(datediff(la.dCreate, u.tsubmit_prareg)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=1\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00018\"\r\n AND u.iconfirm_dok_qa = 2 AND u.tsubmit_prareg IS NOT NULL\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\"\r\n AND u.tsubmit_prareg <= \"'.$perode2.'\"\r\n \r\n UNION\r\n \r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_dok_qa , his.dtanggal as tsubmit_prareg ,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id, Concat(\"1\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=1\r\n and la.iApprove=2\r\n and la.lDeleted=0\r\n AND u.iconfirm_dok_qa = 2\r\n and mo.vKode_modul=\"PL00018\"\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n WHERE ta.ldeleted=0 \r\n AND ta.ijenis=1 \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n\r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n //$html.='<pre>'.$sqPrareg.'</pre>';\r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='7' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Approval QA Manager Cek Dokumen Prareg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th>\r\n <th>Team Busdev</th>\r\n <th>Approval QA By</th>\r\n <th>Tanggal Approval QA</th>\r\n <th>Tanggal Submit Prareg</th> \r\n <th>Selisih</th> \r\n </tr>\r\n \"; \r\n\r\n $cekDouble = array();\r\n\r\n $i=0;\r\n $sumselisih = 0;\r\n $total_parareg = 0;\r\n foreach ($upbPrareg as $ub) {\r\n $selisih = $this->datediff($ub['tconfirm_dok_qa'],$ub['tsubmit_prareg'],$cNipNya);\r\n\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ub['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n // array_push($cekDouble,$u['iupb_id']);\r\n $total_parareg++;\r\n $sumselisih += $selisih;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['cNip'].\"-\".$ub['vName'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tconfirm_dok_qa'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tsubmit_prareg'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td>\r\n </tr>\"; \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n //-------------------------------------------------------------------------------------- INI REG\r\n\r\n $sqReq = 'SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(u.tconfirm_registrasi_qa) as tconfirm_registrasi_qa, u.tsubmit_reg , ABS(datediff(u.tconfirm_registrasi_qa, u.tsubmit_reg )) as selisih,u.iteambusdev_id\r\n FROM plc2.plc2_upb u \r\n JOIN hrd.employee e on e.cNip = u.cnip_confirm_registrasi_qa\r\n where u.`ldeleted` = 0 AND u.`iteambusdev_id` = 22 \r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n AND u.iconfirm_registrasi_qa = 1 AND u.tsubmit_reg IS NOT NULL\r\n AND u.`tsubmit_reg` >= \"'.$perode1.'\"\r\n AND u.`tsubmit_reg` <= \"'.$perode2.'\"\r\n ';\r\n $sqReq = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_registrasi_qa , u.tsubmit_reg ,\r\n ABS(datediff(la.dCreate, u.tsubmit_reg)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00029\"\r\n AND u.iconfirm_registrasi_qa = 2 AND u.tsubmit_reg IS NOT NULL\r\n AND u.tsubmit_reg >= \"'.$perode1.'\"\r\n AND u.tsubmit_reg <= \"'.$perode2.'\"\r\n \r\n UNION\r\n \r\n SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, e.cNip, e.vName, date(la.dCreate) as tconfirm_registrasi_qa ,his.dtanggal as tsubmit_reg ,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id,Concat(\"1\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort and moa.vDept_assigned=\"QA\"\r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg=0\r\n and la.iApprove=2\r\n and la.lDeleted=0\r\n AND u.iconfirm_registrasi_qa = 2\r\n and mo.vKode_modul=\"PL00029\"\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n WHERE ta.ldeleted=0 \r\n AND ta.ijenis=2 \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n //$html.='<pre>'.$sqReq.'</pre>';\r\n $upbReq = $this->db_erp_pk->query($sqReq)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='7' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Approval QA Manager Cek Dokumen Registrasi</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th>\r\n <th>Team Busdev</th>\r\n <th>Approval QA By</th>\r\n <th>Tanggal Approval QA</th>\r\n <th>Tanggal Submit Registrasi</th> \r\n <th>Selisih</th> \r\n </tr>\r\n \"; \r\n $i=0;\r\n $total_req=0;\r\n $kurangTotal = 0;\r\n foreach ($upbReq as $ur) {\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ur['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n $total_req++;\r\n if (in_array($ur['iupb_id'], $cekDouble)) {\r\n $kurangTotal++;\r\n }\r\n\r\n $selisih = $this->datediff($ur['tconfirm_registrasi_qa'],$ur['tsubmit_reg'],$cNipNya);\r\n\r\n $sumselisih += $selisih;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['cNip'].\"-\".$ur['vName'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['tconfirm_registrasi_qa'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['tsubmit_reg'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td>\r\n </tr>\"; \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n $totalUpb = $total_req + $total_parareg; \r\n $jumlahUpb = $totalUpb - $kurangTotal;\r\n if($sumselisih==0){\r\n $tot = 0;\r\n }else{\r\n $tot = $sumselisih / $totalUpb;\r\n $tot = $tot/5;\r\n }\r\n $result = number_format($tot,2);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Total UPB Prareg & Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$totalUpb.\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jumlah Selisih (Hari)</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".number_format($sumselisih).\" </td>\r\n </tr>\r\n\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Rata- Rata (Minggu)</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$result.\" Minggu</td>\r\n </tr>\r\n\r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "public function cetak_statistik()\n\t{\n\t\t$var['telah_memilih'] = $this->db->get_where('pemilih', array('status' => '2'))->num_rows();\n\t\t$var['total'] = $this->db->select('id')->get('pemilih')->num_rows();\n\t\t\n\t\t$var['jabatan'] = $this->Pemilwa_model->get_data_all('jabatan');\n\t\t$var['pemilih'] = $this->Pemilwa_model->get_data_all('pemilih');\n\t\t$var['kandidat'] = $this->Pemilwa_model->get_data_all('kandidat');\n\t\t$var['suara'] = $this->Pemilwa_model->get_data_all('suara');\n\n\t\t$jurusan = array();\n\t\tforeach ($var['jabatan'] as $jab) {\n\t\t\tif ($jab->kode_jabatan == 'HIM') {\n\t\t\tarray_push($jurusan, $jab->kode_dapil);\n\t\t\t}\n\t\t};\n\n\t\tforeach ($jurusan as $jur) {\n\t\t\t$var{$jur} = 0;\n\t\t\t$var{'total'.$jur} = 0;\n\t\t\t$query = 'SELECT status FROM pemilih WHERE dapil LIKE \\'%'.$jur.'%\\'';\n\t\t\tif ($this->db->query($query)) {\t\t\t\t\n\t\t\t\t$status_pemilih = $this->db->query($query)->result();\n\t\t\t\tforeach ($status_pemilih as $sp) {\n\t\t\t\t\t$var{'total'.$jur}++;\n\t\t\t\t\tif ($sp->status == '2') {\n\t\t\t\t\t\t$var{$jur}++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$data['header'] = 'header-print';\n\t\t$data['navbar'] = 'navbar-print';\n\t\t$data['footer'] = 'footer-print';\n\t\t$this->pemilwa_library->display('cetak-statistik', $data, $var);\n\t}", "public function jumlahperbulan(){\n\t\tdate_default_timezone_set(\"Asia/Jakarta\");\n\t\t$this->load->model('overview_model');\n\t\tif (isset($_GET['data'])) {\n\t\t\t// $month = $this->input->get('data');\n\t\t\t$month = date(\"m\");\n\t\t\t$year = date(\"Y\");\n\t\t\t \n\t\t\t$monthlyh1 = $this->overview_model->ambil_monthly1();\n\t\t\t$monthlyh2 = $this->overview_model->ambil_monthly2();\n\t\t\t$monthlyh3 = $this->overview_model->ambil_monthly3();\n\t\t\t$monthlyh4 = $this->overview_model->ambil_monthly4();\n\t\n\t\t\t$crm1 = 0;\n\t\t\tforeach ($monthlyh1 as $data1){\n\t\t\t\t$crm1 += $data1->power;\n\t\t\t}\n\t\t\tforeach ($monthlyh2 as $data2){\n\t\t\t\t$crm1 += $data2->power;\n\t\t\t}\n\t\t\tforeach ($monthlyh3 as $data3){\n\t\t\t\t$crm1 += $data3->power;\n\t\t\t}\n\t\t\tforeach ($monthlyh4 as $data4){\n\t\t\t\t$crm1 += $data4->power;\n\t\t\t}\n\n\t\t\t$insert = array('power' => $crm1, 'time' => time(), 'm' => $month, 'y' => $year);\n\t\t\tif ($this->overview_model->power_s1m($insert)){\n\t\t\t\t$montha = date('m',strtotime(\"-1 month\"));\n\t\t\t\t$this->overview_model->delete_jd($montha);\n\t\t\t\techo \"BERHASIL\";\n\t\t\t}else{\n\t\t\t\techo \"ERROR\";\n\t\t\t}\n\n\t\t}else{\n\t\t\techo \"Variabel data tidak terdefinisi\";\n\t\t}\n\t}", "function calcuateSlabPrice(){\n if ( isset($_POST) ) {\n extract($_POST);\n $rowData = $this->fab_model->getProductById($proId);\n\n if (empty($slabVOne)) { $slabVOne = 0; }\n if (empty($slabVTwo)) { $slabVTwo = 0; }\n if (empty($slabVThree)) { $slabVThree = 0; }\n if (empty($slabQty)) { $slabQty = 1; }\n\n if ($styleId =='1' || $styleId =='2' ) {\n // Total squarefeet for slab 1,2.3\n $totalSqFtSlab = $slabVOne+$slabVTwo+$slabVThree;\n $console = \"<br>Total slab - \".$totalSqFtSlab;\n \n $itemCostSqFt = $rowData['item_cost'];\n $console .= \"<br>Item Cost \".$itemCostSqFt;\n\n $totalSlabCost = $itemCostSqFt*$totalSqFtSlab;\n $console .= \"<br>Total Item Cost \".$totalSlabCost;\n \t\n // Get Fabrication cost\n $fabCost = $rowData['fabrication_cost'];\n $console .= \"<br>Fab Cost \".$fabCost;\n\n $totalFabCost = $slabQty*$fabCost;\n $console .= \"<br>Total Fab Cost \".$totalFabCost;\n\n // Total Cost price\n $totalOrderCost = $totalSlabCost+$totalFabCost;\n $console .= \"<br>Total Cost \".$totalOrderCost;\n \n // Total Sale Price\n $pricePerSqFt = $totalOrderCost*1.5;\n $console .= \"<br>Total Price \".$pricePerSqFt;\n if ($totalSqFtSlab == 0) {\n $totalOrderCost = 0.00;\n $pricePerSqFt = 0.00;\n }\n\n }else if ($styleId =='3' || $styleId =='4') {\n\n $totalOrderCost = $rowData['item_cost'] * $slabQty;\n $pricePerSqFt = $totalOrderCost * 1.5; \n }\n\n\n if ( isset($change_cost) ) {\n $totalOrderCost = $totalOrderCost+$change_cost;\n }\n\n if ( isset($change_price) ) {\n $pricePerSqFt = $pricePerSqFt+$change_price;\n }\n\n $calcPerc = $this->calcuatePercentage($pricePerSqFt,$totalOrderCost);\n\n $retData = array(\n 'console' => $console,\n 'cost_price' => decimalValue($totalOrderCost),\n 'sale_price' => decimalValue($pricePerSqFt),\n 'percent' => decimalValue($calcPerc),\n 'test_qty' => decimalValue($slabQty),\n 'test_totalSlabs' => decimalValue($totalSqFtSlab),\n 'test_itemCost' => decimalValue($itemCostSqFt),\n 'test_totalSlabCost' => decimalValue($totalSlabCost),\n 'test_fabricationCost' => decimalValue($fabCost),\n 'test_totalFabricationCost' => decimalValue($totalFabCost),\n 'test_totalCostTed' => decimalValue($totalOrderCost),\n 'test_totalSaleTed' => decimalValue($pricePerSqFt),\n );\n echo json_encode($retData);\n }\n }", "public function penalty()\n\t{\n\t\t$data['judul']\t= \"Buat Penalty SKI\";\n\n\t\t$nipeg \t\t\t= $this->session->userdata('ses_nipeg');\n\t\t$data['poto'] \t= $this->get_url_photo($nipeg);\n\n\t\t$status = $this->Model_karyawan->get_data_status();\n\t\t\tforeach ($status->result_array() as $st ) {\n\t\t\t\t$data['status'] = $st['status_tw'];\n\t\t\t\t$data['tst'] \t= $st['TST'];\n\t\t\t\t$data['thn']\t= $st['tahun'];\n\t\t\t}\n\n\t\t$data['divisi_belum']\t= $this->Model_master_penalty->get_divisi_blm()->result();\n\t\t$data['divisi_belum_h']\t= $this->Model_master_penalty->get_divisi_blm_h();\n\t\t$data['divisi_sudah']\t= $this->Model_master_penalty->get_divisi_sdh()->result();\n\t\t$data['divisi_sudah_h']\t= $this->Model_master_penalty->get_divisi_sdh_h();\n\n\t\t$this->template->load('template_admin','master/penalty/lihat_data', $data);\n\t}", "function BD2_739_VER01_PARAMETER05($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n\r\n </tr>\r\n </table>\";\r\n\r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is not null\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\"\r\n AND u.tsubmit_prareg <= \"'.$perode2.'\"\r\n ELSE\r\n u.tsubmit_reg is not null\r\n AND u.tsubmit_reg >= \"'.$perode1.'\"\r\n AND u.tsubmit_reg <= \"'.$perode2.'\"\r\n END\r\n )\r\n\r\n UNION\r\n\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , his.dtanggal as tanggalSubmit,\r\n ABS(datediff(la.dCreate, his.dtanggal)) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n where u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n and his.ldeleted=0\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta \r\n join plc2.plc2_upb up on up.iupb_id=ta.iupb_id\r\n WHERE ta.ldeleted=0 \r\n AND (case when up.ineed_prareg=1 then\r\n ta.ijenis=1\r\n ELSE\r\n ta.ijenis=2\r\n END) \r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n ';\r\n \r\n \r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Submit Prareg / Reg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama Generik</th> \r\n <th>Selisih</th> \r\n <th>Melalui Prareg</th> \r\n <th>Tgl Prareg / Reg</th>\r\n <th>Tgl Setting Prioritas</th> \r\n </tr>\r\n \"; \r\n\r\n $cekDouble = array();\r\n\r\n $i=0;\r\n $total_parareg = array();\r\n foreach ($upbPrareg as $ub) {\r\n $selisih = $this->getDurasiBulan($ub['tglSettingPrio'],$ub['tanggalSubmit']);\r\n $i++; \r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:5%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:25%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vgenerik'].\"</td>\r\n <td style='width:5%;text-align: right;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['needPrareg'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['tanggalSubmit'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ub['tglSettingPrio'].\"</td>\r\n </tr>\"; \r\n $total_parareg[]=$selisih;\r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n //-------------------------------------------------------------------------------------- INI REG\r\n\r\n $sqReq = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.vupb_nomor,u.vgenerik, u.iupb_id, u.vupb_nama, e.cNip, e.vName,if(u.ineed_prareg=1,\"YA\", \"TIDAK\") as needPrareg, date(la.dCreate) as tglSettingPrio , concat(\"'.$perode2.'\") as tanggalSubmit,\r\n ABS(datediff(la.dCreate, \"'.$perode2.'\")) as selisih,u.iteambusdev_id,Concat(\"2\") as nilai\r\n FROM plc2.plc2_upb u\r\n JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=det.iprioritas_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 22 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and mo.vKode_modul=\"PL00002\"\r\n and moa.vDept_assigned=\"DR\"\r\n and moa.iType=3\r\n and moa.iM_activity=4\r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is NULL\r\n ELSE\r\n u.tsubmit_reg is null\r\n END\r\n )\r\n ) as z\r\n ORDER BY z.nilai ASC\r\n ) as aa GROUP BY aa.iupb_id\r\n '; \r\n $upbReq = $this->db_erp_pk->query($sqReq)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >UPB Belum Tanggal Prareg / Reg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama Generik</th> \r\n <th>Selisih</th> \r\n <th>Melalui Prareg</th> \r\n <th>Tgl Prareg / Reg</th>\r\n <th>Tgl Akhir Semester</th> \r\n </tr>\r\n \"; \r\n $i=0;\r\n foreach ($upbReq as $ur) {\r\n $selisih = $this->getDurasiBulan($ur['tglSettingPrio'],$ur['tanggalSubmit']);\r\n $i++; \r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:5%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vupb_nomor'].\"</td>\r\n <td style='width:25%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ur['vgenerik'].\"</td>\r\n <td style='width:5%;text-align: right;border: 1px solid #dddddd;'>\r\n \".$selisih.\"</td> \r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['needPrareg'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['tanggalSubmit'].\"</td>\r\n <td style='width:10%;text-align: center;border: 1px solid #dddddd;'>\r\n \".$ur['tglSettingPrio'].\"</td>\r\n </tr>\"; \r\n $total_parareg[]=$selisih;\r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n $total=array_sum($total_parareg);\r\n $nn=$total/$i;\r\n $result = number_format($nn);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Jangka Waktu Proses Pengembangan UPB</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$total.\" Bulan</td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>UPB Belum Tanggal Prareg / Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$i.\"</td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Rata - Rata Jangka Waktu Proses Pengembangan UPB</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$result.\" Bulan</td>\r\n </tr>\r\n \r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "function controlloPunti()\n {\n $stats = $GLOBALS['PARAMETERS']['names']['stats'];\n array_pop($stats); \n \n //imposta il valore iniziale della somma dei punteggi delle statistiche\n $sum = 0;\n \n //CICLA L'ELENCO DELLE STATISTICE\n foreach($stats as $k => $v) {\n \n //esegue la somma dei valori delle statistiche\n $sum = $sum + $_REQUEST[$k];\n \n }\n \n //SE LA SOMMA DEI PUNTI DELLE STATISTICHE È DIVERSA DA QUELLA DEFINITA NELLE IMPOSTAIZONI DI GIOCO\n if ($sum != $GLOBALS['PARAMETERS']['settings']['cars_sum']){\n \n //restituisce esito negativo del controllo\n $data['ok'] = false; \n //restituisce i dati dell'errore\n $data['errors'][] = array(\n 'code' => 131,\n 'testo' => $GLOBALS['MESSAGE']['register']['fields']['stats_info'] . ' ' \n . $GLOBALS['PARAMETERS']['settings']['cars_sum']\n );\n\n //SE LA SOMMA È CORRETTA\n } else {\n \n //imposta i dati degli errori a false\n $data = false;\n \n }\n\n //restituisce i dati\n return $data;\n \n }", "public function lihat_siswa_terbaik(){\n $jumlah_siswa = $this->model_siswa->tampil_jumlah_siswa();\n //Ambil jumlah siswa yang udah terisi nilai non keagamaannya\n $jumlah_nilai_non_keagamaan = $this->model_siswa->tampil_jumlah_nilai_terisi('tbl_nilai_non_keagamaan');\n //Ambil jumlah siswa yang udah terisi nilai keagamaannya\n $jumlah_nilai_keagamaan = $this->model_siswa->tampil_jumlah_nilai_terisi('tbl_nilai_keagamaan');\n //Ambil jumlah nilai absensi siswa yang udah terisi nilainya\n $jumlah_nilai_absensi = $this->model_siswa->tampil_jumlah_nilai_terisi('tbl_absensi');\n //Ambil jumlah nilai perilaku siswa yang udah terisi nilainya\n $jumlah_nilai_perilaku = $this->model_siswa->tampil_jumlah_nilai_terisi('tbl_nilai_perilaku');\n\n if($jumlah_siswa == $jumlah_nilai_non_keagamaan AND $jumlah_siswa == $jumlah_nilai_keagamaan AND $jumlah_siswa == $jumlah_nilai_absensi && $jumlah_siswa == $jumlah_nilai_perilaku){\n $is_bisa = TRUE;\n }else{\n $is_bisa = FALSE;\n }\n\n //Pengisian semua nilai ke array hmmmm\n $data['is_bisa'] = $is_bisa;\n $data['data_siswa'] = $this->model_siswa->tampil_data_siswa()->result();\n \n\n //Pengisian Nilai C\n if($is_bisa){\n $no = 0;\n foreach($data['data_siswa'] as $ds){\n //Ambek C1\n $nilaiC1 = $this->model_siswa->panggil_rerata($ds->nisn, 'tbl_nilai_non_keagamaan');\n if($nilaiC1 >= 75){\n $C1 = 5;\n }elseif($nilaiC1 >= 70 AND $nilaiC1 < 75){\n $C1 = 4;\n }elseif($nilaiC1 >= 65 AND $nilaiC1 < 70){\n $C1 = 2;\n }else{\n $C1 = 1;\n }\n\n //Ambek C2\n $C2 = $this->model_siswa->panggil_nilai_absensi($ds->nisn);\n\n //Ambek C3\n $nilaiC3 = $this->model_siswa->tampil_data_nilai($ds->nisn, 'tbl_nilai_perilaku');\n $frekuensi = array(\n 'A' => 0,\n 'B' => 0,\n 'C' => 0,\n 'D' => 0\n );\n\n $frekuensi[$nilaiC3[0]->nilai_kelakuan]++;\n $frekuensi[$nilaiC3[0]->nilai_kerajinan]++;\n $frekuensi[$nilaiC3[0]->nilai_kedisiplinan]++;\n $frekuensi[$nilaiC3[0]->nilai_kerapian]++;\n \n \n if($frekuensi['D'] >= 1){\n $C3 = 1;\n }elseif($frekuensi['C'] > 2){\n $C3 = 2;\n }elseif($frekuensi['C'] == 2){\n $C3 = 3;\n }elseif($frekuensi['B'] > $frekuensi['A']){\n $C3 = 4;\n }elseif($frekuensi['A'] > $frekuensi['B']){\n $C3 = 5;\n }\n\n //Ambek C4\n $nilaiC4 = $this->model_siswa->panggil_rerata($ds->nisn, 'tbl_nilai_keagamaan');\n \n if($nilaiC4 >= 86){\n $C4 = 5;\n }elseif($nilaiC4 >= 78 AND $nilaiC4 < 86){\n $C4 = 4;\n }elseif($nilaiC4 >= 70 AND $nilaiC4 < 78){\n $C4 = 2;\n }else{\n $C4 = 1;\n }\n\n \n $dataTambahan = array(\n 'C1' => $C1,\n 'C2' => $C2,\n 'C3' => $C3,\n 'C4' => $C4\n );\n\n $data['data_siswa'][$no++] = (object) array_merge((array) $ds, $dataTambahan);\n }\n }\n\n //Pembuatan Vektor S\n if($is_bisa){\n $no = 0;\n foreach($data['data_siswa'] as $ds){\n $nilai = pow($ds->C1, 0.5)*pow($ds->C2, 0.2)*pow($ds->C3, 0.2)*pow($ds->C4, 0.1);\n $dataTambahan = array(\n 'vektorS' => $nilai\n );\n\n $data['data_siswa'][$no++] = (object) array_merge((array) $ds, $dataTambahan);\n }\n }\n\n //Pembuatan Vektor V\n if($is_bisa){\n //Menghitung Jumlah S\n $Sigmasn = 0;\n foreach($data['data_siswa'] as $ds){\n $Sigmasn += $ds->vektorS;\n }\n $data['sigmasn'] = $Sigmasn;\n\n //Menghitung V\n $no = 0;\n foreach($data['data_siswa'] as $ds){\n $nilai = $ds->vektorS/$Sigmasn;\n $dataTambahan = array(\n 'vektorV' => $nilai\n );\n $data['data_siswa'][$no++] = (object) array_merge((array) $ds, $dataTambahan);\n\n }\n }\n\n //Menghitung Terbesar\n if($is_bisa){\n $nama_terbesar = \"anto\";\n $nilai_terbesar = -1;\n foreach($data['data_siswa'] as $ds){\n if($ds->vektorV > $nilai_terbesar){\n $nilai_terbesar = $ds->vektorV;\n $nama_terbesar = $ds->nama_siswa;\n }\n }\n\n $data['nilai_terbesar'] = $nilai_terbesar;\n $data['nama_terbesar'] = $nama_terbesar;\n }\n\n $this->load->view('Admin/Template_admin/header');\n $this->load->view('Admin/Template_admin/sidebar');\n $this->load->view('Admin/lihat_siswa_terbaik', $data);\n $this->load->view('Admin/Template_admin/footer');\n }", "function cari_sentimen($cluster, $sentimen, $pusat, $bobot, $debug=true){\n\t$spam = 0;\n\t$real = 0;\n\tforeach($cluster as $c){\n//\t\tif($c <> 0){\n\t\t\tif($sentimen[$c] == 1){\n\t\t\t\t$spam++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$real++;\n\t\t\t}\n//\t\t}\n\t}\n\n\tif($debug){\n\t\techo \"\n\t\t<span class='label label-success'>Data Spam : $spam</span>\n\t\t<span class='label label-danger'>Data Real : $real</span>\n\t\t<br>\n\t\t\";\n\t}\n\n\n\n\t//Metode K-NN ditentukan di baris ini.\n\t//jika ingin dijalankan secara default, hapus baris IF dibawah ini.\n\t// if($spam == $real){\n\t\t//kalau jumlah sentimen positif dan negatifnya sama, maka sentimennya adalah data terdekat\n\t\t// foreach($cluster as $c){\n\t\t// \t$jarak[$c] = abs($pusat-$bobot[$c]);\n\t\t// \tif($debug)\n\t\t// \t\techo \"Jarak <strong>K-$c</strong> ke pusat data = \".$pusat.\" - \".$bobot[$c].\" = <strong>\".$jarak[$c].\"</strong><br>\";\n\t\t// }\n\t\t$jarak_min = array_keys($jarak, min($jarak));\n\t\t$hasil = $sentimen[$jarak_min[0]];\n\n\t\tif($debug){\n\t\t\tif($hasil==0)\n\t\t\t\t$cl = \"danger\";\n\t\t\telse\n\t\t\t\t$cl = \"success\";\n\t\t\techo \"Sentimen ditentukan berdasarkan jarak terdekat yaitu di <span class='label label-$cl'>K-\".$jarak_min[0].\"</span><br>\";\n\t\t}\n\n\t\tif($hasil == 1)\n\t\t\t$spam++;\n\t\telse\n\t\t\t$real++;\n\t// }\n\n\n\t// if($positif > $negatif){\n\t// \treturn 1;\n\t// }\n\t// else{\n\t// \treturn 0;\n\t// }\n}", "public function unitcosts_money()\n\t {\n\t \t$y = Input::get('y_unit');\t \t\n\n\t \t//-----Date ALL\n\t \t$date_start = ($y-1).'-10-01';\n\t \t$date_end = ($y).'-09-30';\t \t\n\n\t \t//------Date OT\n\t \t$range_ot = $this->get_range_ot();\t \t\n\n\t \tforeach ($range_ot as $r1) {\n\t \t\t$start_ot = ($y-1).'-'.$r1->r_start.'-01';\n\t \t\t$end_ot = ($y).'-'.$r1->r_end.'-31';\n\t \t}\t \t\n\t \tif( $start_ot == '' || $end_ot == '' ){\n\t \t\t$start_ot = $date_start;\n\t \t\t$end_ot = $date_end;\n\t \t}\n\n\t \t//-------Date SSO\n\t \t$range_sso = $this->get_range_sso();\n\t \tforeach ($range_sso as $r2) {\n\t \t\t$start_sso = ($y-1).'-'.$r2->r_start.'-01';\n\t \t\t$end_sso = ($y).'-'.$r2->r_end.'-31';\n\t \t}\n\t \tif( $start_sso == '' || $end_sso == '' ){\n\t\t\t\t$start_sso = $date_start;\n\t \t\t$end_sso = $date_end;\n\t \t}\t \t\n\n\n\t \tif ( Session::get('level') != '' )\n\t \t{\t\n\t \t\t//-------sql ดึงหน่วยต้นทุน \t\t\n\t \t\t$sql = ' select *';\t\t\t\t\t\n\t\t\t\t$sql .= ' from s_unit_costs';\t\t\t\t\t\t\t\t\n\n\t\t\t\t$result = DB::select( $sql );\t\t\n\n\t\t\t\t$objPHPExcel = new PHPExcel();\n\t\t\t\t$objPHPExcel->getDefaultStyle()->getFont()->setName('Arial'); \n\t\t\t $objPHPExcel->getActiveSheet()->setTitle('Sheet1');\n\t\t\t\t$objPHPExcel->setActiveSheetIndex(0);\t\t\t\t\n\n\t\t\t\t//--------coloum name ชุด 1\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A1', 'รหัส');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->mergeCells('A1:A2');\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(7);\t\t\t\t\t\t\t\t\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B1', 'ลำดับ');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->mergeCells('B1:B2');\t\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(5);\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('C1', 'ชื่อ');\n\t\t\t\t$objPHPExcel->getActiveSheet()->mergeCells('C1:C2');\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(20);\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('D1', 'สกุล');\n\t\t\t\t$objPHPExcel->getActiveSheet()->mergeCells('D1:D2');\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(20);\n\n\t\t\t\t//-------แถว coloum name ชุด 1 bg color\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:D1')->getFill()->applyFromArray(\n\t\t\t array(\n\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t 'startcolor' => array('rgb' => '60D0F2'),\n\t\t\t 'endcolor' => array('rgb' => '60D0F2')\n\n\t\t\t )\n\t\t\t );\n\t\t\t \n\t\t\t //------fix tab\n\t\t\t $objPHPExcel->getActiveSheet()->freezePane('E1');\t\t\t \t\t\t \n\n\t\t\t //------แถว รวมทั้งจำนวน(บาท) bg color\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('E1', 'รวมทั้งจำนวน(บาท)');\n\t\t\t\t$objPHPExcel->getActiveSheet()->mergeCells('E1:N1');\t\t\t\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('E1:N1')->getAlignment()->applyFromArray(array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER));\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('E1:N1')->getFill()->applyFromArray(\n\t\t\t array(\n\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t 'startcolor' => array('rgb' => 'D39BFF'),\n\t\t\t 'endcolor' => array('rgb' => 'D39BFF')\n\n\t\t\t )\n\t\t\t );\n\n\t\t\t\t//--------coloum name ชุด 2\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('E2', '1.เงินเดือน+ค่าจ้างชั่วคราว');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('E')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \n\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('F2', '2.เงินประจำตำแหน่ง');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(20);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('F')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \n\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('G2', '3.ค่าล่วงเวลา(OT)');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(26);\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('G')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \n\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('H2', '4.ไม่ทำเวชฯ');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('H')->setWidth(30);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('H')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \n\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('I2', '5.ฉ.8');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('I')->setWidth(23);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('I')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \n\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('J2', '6.เงินตอบแทนอื่น');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('J')->setWidth(23);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('J')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \n\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('K2', '7.ค่ารักษาพยาบาล/ช่วยเหลือบุตร');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('K')->setWidth(23);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('K')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \n\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('L2', '8.เดินทางไปราชการ');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('L')->setWidth(23);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('L')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \n\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('M2', '9.อื่น ๆ');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('M')->setWidth(23);\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('M')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \t\t\t\t\n\n\t\t\t\t//------แถว coloum name bg color\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('E2:N2')->getFill()->applyFromArray(\n\t\t\t array(\n\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t 'startcolor' => array('rgb' => 'FCC153'),\n\t\t\t 'endcolor' => array('rgb' => 'FCC153')\n\n\t\t\t )\n\t\t\t );\n\n\t\t\t\t//------แถว coloum name รวม bg color\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('N2', 'รวม');\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('N')->setWidth(20);\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('N')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \t\t\t\t\t\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('N2')->getFill()->applyFromArray(\n\t\t\t array(\n\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t 'startcolor' => array('rgb' => 'F6FC53'),\n\t\t\t 'endcolor' => array('rgb' => 'F6FC53')\n\n\t\t\t )\n\t\t\t );\t\t\t \n\n\t\t\t\t$all_sum_salary\t\t=0;\n\t\t\t\t$all_sum_r_c\t\t=0;\n\t\t\t\t$all_sum_ot \t\t=0;\n\t\t\t\t$all_sum_no_v \t\t=0;\n\t\t\t\t$all_sum_ch8 \t\t=0;\n\t\t\t\t$all_sum_sp_other \t=0;\n\t\t\t\t$all_sum_son \t\t=0;\n\t\t\t\t$all_sum_u_travel \t=0;\n\t\t\t\t$all_sum_u_other \t=0;\n\t\t\t\t$all_sum_money1_all =0;\n\n\t\t\t\t$row = 0;\n\t\t\t\t$sum = 0;\n\t\t\t\tforeach ($result as $key) //for sql 1\n\t\t\t\t{\t\n\t\t\t\t\t//--------- Code UnitCost\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (0, $row+3, $key->unitcode);\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.($row+3))->getFill()->applyFromArray(\n\t\t\t\t array(\n\t\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t\t 'startcolor' => array('rgb' => 'F6FC53'),\n\t\t\t\t 'endcolor' => array('rgb' => 'F6FC53')\n\n\t\t\t\t )\n\t\t\t\t );\n\n\t\t\t\t\t//--------- Name UnitCost\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (1, $row+3, $key->unitname);\t\t\t\t\t\t\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.($row+3).':N'.($row+3))->getFill()->applyFromArray(\n\t\t\t\t array(\n\t\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t\t 'startcolor' => array('rgb' => 'FC8AE7'),\n\t\t\t\t 'endcolor' => array('rgb' => 'FC8AE7')\n\n\t\t\t\t )\n\t\t\t\t );\n\n\t\t\t\t\t//-------sql 2\n\t\t\t\t\t$sql2 = ' select s1.unitname, a.y, a.m, s1.cid, a.type, concat(n1.pname,\"\",n1.fname) as fname, n1.lname,';\n\t\t\t\t\t$sql2 .= ' sum(round(((a.salary * s1.cal) / 100),2)) as salary, sum(round(((a.r_c * s1.cal) / 100),2)) as r_c, ';\t\t\t\t\t\n\t\t\t\t\t$sql2 .= ' sum(round(((a.ot * s1.cal) / 100),2)) as ot, sum(round(((a.no_v * s1.cal) / 100),2)) as no_v, ';\n\t\t\t\t\t$sql2 .= ' sum(round(((a.ch8 * s1.cal) / 100),2)) as ch8, sum(round(((a.sp_other * s1.cal) / 100),2)) as sp_other, ';\n\t\t\t\t\t$sql2 .= ' sum(round(((a.son * s1.cal) / 100),2)) as son, sum(round(((a.u_travel * s1.cal) / 100),2)) as u_travel, ';\n\t\t\t\t\t$sql2 .= ' sum(round(((a.u_other * s1.cal) / 100),2)) as u_other ';\n\t\t\t\t\t$sql2 .= ' from s_unit_costs_emp s1 ';\n\t\t\t\t\t$sql2 .= ' left join ( ';\n\t\t\t\t\t$sql2 .= ' ( select cid,year(order_date) as y, month(order_date) as m, 1 as type, sum(salary+salary_other) as salary, 0 as r_c,';\n\t\t\t\t\t$sql2 .= ' (select sum(c.ot) as ot from s_salary_detail c where order_date between \"'.$start_ot.'\" and \"'.$end_ot.'\" and c.cid=s_salary_detail.cid) as ot, ';\n\t\t\t\t\t$sql2 .= ' sum(no_v) as no_v, sum(ch8) as ch8, ';\n\t\t\t\t\t$sql2 .= ' ((select sum(b.salary_sso) from s_salary_detail b where order_date between \"'.$start_sso.'\" and \"'.$end_sso.'\" and b.cid=s_salary_detail.cid)+sum(pts+pts2)) as sp_other,';\n\t\t\t\t\t$sql2 .= ' 0 as son, sum(u_travel) as u_travel, sum(u_other) as u_other';\n\t\t\t\t\t$sql2 .= ' from s_salary_detail';\n\t\t\t\t\t$sql2 .= ' where order_date between \"'.$date_start.'\" and \"'.$date_end.'\" group by cid ) ';\n\t\t\t\t\t$sql2 .= ' union ';\n\t\t\t\t\t$sql2 .= ' ( select cid,year(order_date) as y, month(order_date) as m, 2 as type, sum(salary+special_m+game_sp) as salary, sum(r_c) as r_c,';\n\t\t\t\t\t$sql2 .= ' (select sum(c.ot) from s_salary_ocsc_detail c where order_date between \"'.$start_ot.'\" and \"'.$end_ot.'\" and c.cid=s_salary_ocsc_detail.cid) as ot,';\n\t\t\t\t\t$sql2 .= ' sum(no_v) as no_v, sum(ch8) as ch8,';\n\t\t\t\t\t$sql2 .= ' sum(save_h+p_other+pts+pts2+r_pt+r_other) as sp_other, sum(son) as son, sum(u_travel) as u_travel, sum(u_other) as u_other ';\n\t\t\t\t\t$sql2 .= ' from s_salary_ocsc_detail';\n\t\t\t\t\t$sql2 .= ' where order_date between \"'.$date_start.'\" and \"'.$date_end.'\" group by cid )';\n\t\t\t\t\t$sql2 .= ' ) as a on a.cid = s1.cid ';\n\t\t\t\t\t$sql2 .= ' left join n_datageneral n1 on n1.cid=s1.cid';\n\t\t\t\t\t$sql2 .= ' where s1.unitname=\"'.$key->unitname.'\" ';\n\t\t\t\t\t$sql2 .= ' group by s1.cid order by s1.unitcode asc,a.type desc,a.salary desc';\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$result2 = DB::select( $sql2 );\t\n\t\t\t\t\t$n \t\t\t\t=0;\n\t\t\t\t\t$sum_salary \t=0;\n\t\t\t\t\t$sum_r_c \t\t=0;\n\t\t\t\t\t$sum_ot \t\t=0;\n\t\t\t\t\t$sum_no_v \t\t=0;\n\t\t\t\t\t$sum_ch8 \t\t=0;\n\t\t\t\t\t$sum_sp_other \t=0;\n\t\t\t\t\t$sum_son \t\t=0;\n\t\t\t\t\t$sum_u_travel \t=0;\n\t\t\t\t\t$sum_u_other \t=0;\n\t\t\t\t\t$sum_money1_all =0;\n\t\t\t\t\t//-------------------- Detail Start -------------------//\n\t\t\t\t\tforeach ( $result2 as $key2 ) //for sql 2\n\t\t\t\t\t{\t\n\t\t\t\t\t\t$sum_money1=0;\t\t\t\t\t\n\t\t\t\t\t\t$n++;\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (1, $row+4, $n);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (2, $row+4, $key2->fname);\t\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (3, $row+4, $key2->lname);\t\t\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (4, $row+4, $key2->salary);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (5, $row+4, $key2->r_c);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (6, $row+4, $key2->ot);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (7, $row+4, $key2->no_v);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (8, $row+4, $key2->ch8);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (9, $row+4, $key2->sp_other);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (10, $row+4, $key2->son);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (11, $row+4, $key2->u_travel);\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (12, $row+4, $key2->u_other);\n\t\t\t\t\t\t//----colum รวมเงิน\n\t\t\t\t\t\t$sum_money1 = $key2->salary+$key2->r_c+$key2->ot+$key2->no_v+$key2->ch8+$key2->sp_other+$key2->son+$key2->u_travel+$key2->u_other;\n\t\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (13, $row+4, $sum_money1);\n\n\t\t\t\t\t\t$sum_salary \t= $sum_salary + $key2->salary;\n\t\t\t\t\t\t$sum_r_c \t\t= $sum_r_c + $key2->r_c;\n\t\t\t\t\t\t$sum_ot \t\t= $sum_ot + $key2->ot;\n\t\t\t\t\t\t$sum_no_v \t\t= $sum_no_v + $key2->no_v;\n\t\t\t\t\t\t$sum_ch8 \t\t= $sum_ch8 + $key2->ch8;\n\t\t\t\t\t\t$sum_sp_other \t= $sum_sp_other + $key2->sp_other;\n\t\t\t\t\t\t$sum_son \t\t= $sum_son + $key2->son;\n\t\t\t\t\t\t$sum_u_travel \t= $sum_u_travel + $key2->u_travel;\n\t\t\t\t\t\t$sum_u_other \t= $sum_u_other + $key2->u_other;\n\t\t\t\t\t\t$sum_money1_all = $sum_money1_all + $sum_money1;\n\n\t\t\t\t\t\t$row = $row+1;\n\t\t\t\t\t}//end for sql 2\n\t\t\t\t\t//-------------------- Detail End -------------------//\n\n\t\t\t\t\t//----------------- รวมแต่ละ unitcosts Start -------------- //\n\t\t\t\t\t//-------color bg coloum ชุด 1\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (1, $row+4,$key->unitcode);\t\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->mergeCells('B'.($row+4).':D'.($row+4));\t\t\t\t\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.($row+4).':D'.($row+4))->getAlignment()->applyFromArray(array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER));\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.($row+4).':D'.($row+4))->getFill()->applyFromArray(\n\t\t\t array(\n\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t 'startcolor' => array('rgb' => 'F6FC53'),\n\t\t\t 'endcolor' => array('rgb' => 'F6FC53')\n\n\t\t\t )\n\t\t\t \t);\t\n\n\t\t\t\t\t//-------color bg coloum ชุด 2 แถวรวมด้านล่าง\n\t\t\t \t$objPHPExcel->getActiveSheet()->getStyle('E'.($row+4).':N'.($row+4))->getAlignment()->applyFromArray(array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER));\n\t\t\t \t$objPHPExcel->getActiveSheet()->getStyle('E'.($row+4).':N'.($row+4))->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \t\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('E'.($row+4).':N'.($row+4))->getFill()->applyFromArray(\n\t\t\t array(\n\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t 'startcolor' => array('rgb' => 'F6FC53'),\n\t\t\t 'endcolor' => array('rgb' => 'F6FC53')\n\n\t\t\t )\n\t\t\t \t);\t \t\n\n\t\t\t\t\t//-------SUM coloum & 1.เงินเดือน+ค่าจ้างชั่วคราว\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (4, $row+4, $sum_salary);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t \t//-------SUM coloum & 2.เงินประจำตำแหน่ง\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (5, $row+4, $sum_r_c);\n\n\t\t\t \t//-------SUM coloum & 3.ค่าล่วงเวลา(OT)\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (6, $row+4, $sum_ot);\n\n\t\t\t \t//-------SUM coloum & 4.ไม่ทำเวชฯ\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (7, $row+4, $sum_no_v);\t\n\n\t\t\t \t//-------SUM coloum & 5.ฉ.8\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (8, $row+4, $sum_ch8);\n\n\t\t\t \t//-------SUM coloum & 6.เงินตอบแทนอื่น\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (9, $row+4, $sum_sp_other);\t\n\n\t\t\t \t//-------SUM coloum & 7.ค่ารักษาพยาบาล/ช่วยเหลือบุตร\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (10, $row+4, $sum_son);\t\n\n\t\t\t \t//-------SUM coloum & 8.เดินทางไปราชการ\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (11, $row+4, $sum_u_travel);\t\n\n\t\t\t \t//-------SUM coloum & 9.อื่น ๆ\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (12, $row+4, $sum_u_other);\t\n\n\t\t\t \t//-------SUM coloum & 10.รวม\n\t\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (13, $row+4, $sum_money1_all);\t\t\t\t\n\t\t\t\t\t\n\t\t\t \t$row = $row+1;\n\t\t\t \t//----------------- รวมแต่ละ unitcosts END -------------- //\n\t\t\t \t$row++;\t\n\n\t\t\t \t//--------------SUM ALL UNIT-------------//\n\t\t\t \t$all_sum_salary \t= $all_sum_salary + $sum_salary;\n\t\t\t\t\t$all_sum_r_c \t\t= $sum_r_c + $all_sum_r_c;\n\t\t\t\t\t$all_sum_ot \t\t= $all_sum_ot + $sum_ot;\n\t\t\t\t\t$all_sum_no_v \t\t= $all_sum_no_v + $sum_no_v;\n\t\t\t\t\t$all_sum_ch8 \t\t= $all_sum_ch8 + $sum_ch8;\n\t\t\t\t\t$all_sum_sp_other \t= $all_sum_sp_other + $sum_sp_other;\n\t\t\t\t\t$all_sum_son \t\t= $all_sum_son + $sum_son;\n\t\t\t\t\t$all_sum_u_travel \t= $all_sum_u_travel + $sum_u_travel;\n\t\t\t\t\t$all_sum_u_other \t= $all_sum_u_other + $sum_u_other;\n\t\t\t\t\t$all_sum_money1_all = $all_sum_money1_all + $sum_money1_all;\t\t\t \t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t}//end for sql 1\n\n\t\t\t\t//----------------- color bg coloum รวม All UnitCosts All Coloum ทั้งหทด ท้ายไฟล์ 1-------------- //\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (0, $row+4, \"รวม\");\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->mergeCells('A'.($row+4).':D'.($row+4));\t\t\t\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.($row+4).':D'.($row+4))->getAlignment()->applyFromArray(array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER));\n\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.($row+4).':D'.($row+4))->getFill()->applyFromArray(\n\t\t array(\n\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t 'startcolor' => array('rgb' => 'FCC153'),\n\t\t 'endcolor' => array('rgb' => 'FCC153')\n\n\t\t )\n\t\t \t);\t\n\n\t\t \t//-------color bg coloum รวม All UnitCosts All Coloum 2-------------- //\n\t\t\t \t$objPHPExcel->getActiveSheet()->getStyle('E'.($row+4).':N'.($row+4))->getAlignment()->applyFromArray(array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER));\n\t\t\t \t$objPHPExcel->getActiveSheet()->getStyle('E'.($row+4).':N'.($row+4))->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); \t\n\t\t\t\t\t$objPHPExcel->getActiveSheet()->getStyle('E'.($row+4).':N'.($row+4))->getFill()->applyFromArray(\n\t\t\t array(\n\t\t\t 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\t\t\t 'startcolor' => array('rgb' => 'FCC153'),\n\t\t\t 'endcolor' => array('rgb' => 'FCC153')\n\n\t\t\t )\n\t\t\t \t);\t \n\n\t\t \t//-------SUM All UnitCosts All Coloum & 1.เงินเดือน+ค่าจ้างชั่วคราว\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (4, $row+4, $all_sum_salary);\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 2.เงินประจำตำแหน่ง\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (5, $row+4, $all_sum_r_c);\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 3.ค่าล่วงเวลา(OT)\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (6, $row+4, $all_sum_ot);\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 4.ไม่ทำเวชฯ\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (7, $row+4, $all_sum_no_v);\t\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 5.ฉ.8\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (8, $row+4, $all_sum_ch8);\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 6.เงินตอบแทนอื่น\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (9, $row+4, $all_sum_sp_other);\t\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 7.ค่ารักษาพยาบาล/ช่วยเหลือบุตร\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (10, $row+4, $all_sum_son);\t\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 8.เดินทางไปราชการ\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (11, $row+4, $all_sum_u_travel);\t\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 9.อื่น ๆ\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (12, $row+4, $all_sum_u_other);\t\n\n\t\t \t//-------SUM All UnitCosts All Coloum & 10.รวม\n\t\t \t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow (13, $row+4, $all_sum_money1_all);\t\t\n\t\t\t\t\n\n\t\t\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); // Set excel version 2007\t \t\t\n\t\t\t $objWriter->save(storage_path().\"/excel/reportCosts.xls\");\n\n\t\t\t return Response::download( storage_path().\"/excel/reportCosts.xls\", \"reportCosts.xls\");\t\n\n\t \t}\n\t \telse\n\t \t{\n\t \t\treturn View::make( 'login.index' );\t\n\t \t} \n\t }", "function profit_margin_kjs($kode_profit,$txt_kd_brg,$kode_kelompok,$flag_kjs)\r\n{\r\n\tglobal $db;\r\n\t///////////////////variabel///////////////\r\n\t$kategori=substr($txt_kd_brg,0,1);\r\n\tif($kategori==\"D\")\r\n\t{\r\n\t\t\r\n\t\t//Nantinya di hitung berdasarkan layanannya juga.\r\n\t\t\r\n\t\t$cek_nilai_profit=baca_tabel(\"fr_mt_profit_margin\",\"profit_obat\",\"WHERE kode_profit=10007\");\r\n\t\tif($cek_nilai_profit!=''){\r\n\t\t\t$nilai_profit=$cek_nilai_profit;\r\n\t\t}else{\r\n\r\n\t\t\t$id_profit\t\t=baca_tabel(\"mt_rekap_stok\",\"id_profit\",\"where kode_brg='\".$this->get(\"kode_barang\").\"'\");\r\n\t\t\t\tif($id_profit!=\"\"){\r\n\t\t\t\t\t$nilai_profit\t=baca_tabel(\"fr_mt_profit_margin\",\"profit_obat\",\"WHERE id_profit=\".$id_profit);\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t/*Untuk rssm margin di hitung perobatnya belum ada standar pakai ini*/\r\n\r\n\t\t\r\n\r\n\t}elseif($kategori==\"E\")\r\n\t{\r\n\t\t$cek_nilai_profit=baca_tabel(\"fr_mt_profit_margin\",\"profit_alkes\",\"WHERE kode_profit=10007\");\r\n\r\n\t\tif($cek_nilai_profit!=''){\r\n\t\t\t$nilai_profit=$cek_nilai_profit;\r\n\t\t}else{\r\n\r\n\t\t\t$id_profit\t\t=baca_tabel(\"mt_rekap_stok\",\"id_profit\",\"where kode_brg='\".$this->get(\"kode_barang\").\"'\");\r\n\t\t\t\tif($id_profit!=\"\"){\r\n\t\t\t\t\t$nilai_profit\t=baca_tabel(\"fr_mt_profit_margin\",\"profit_obat\",\"WHERE id_profit=\".$id_profit);\r\n\t\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*Untuk rssm margin di hitung perobatnya belum ada standar pakai ini*/\r\n\r\n\t\t\r\n\r\n\t}\r\n\t\r\n\t$kenaikan_profit=($nilai_profit*0.01)+1;\r\n\treturn $kenaikan_profit;\r\n}", "function BD1_739_VER01_PARAMETER06($post){\r\n\r\n $iAspekId = $post['_iAspekId'];\r\n $cNipNya = $post['_cNipNya'];\r\n //$cNipNya = 'N09484';\r\n $dPeriode1 = $post['_dPeriode1'];\r\n $x_prd1 = explode(\"-\", $dPeriode1);\r\n $perode1 = $x_prd1['2'].\"-\".$x_prd1['1'].\"-\".$x_prd1['0'];\r\n\r\n $dPeriode2 = $post['_dPeriode2'];\r\n $x_prd2 = explode(\"-\", $dPeriode2);\r\n $perode2 = $x_prd2['2'].\"-\".$x_prd2['1'].\"-\".$x_prd2['0'];\r\n\r\n $jenis = array(1=>'UM',2=>'Claim');\r\n\r\n $bulan = $this->hitung_bulan($perode1,$perode2);\r\n\r\n //cari aspek dulu\r\n $sql = \"SELECT vAspekName FROM hrd.pk_aspek WHERE id='\".$iAspekId.\"'\";\r\n $query = $this->db_erp_pk->query($sql);\r\n $vAspekName = $query->row()->vAspekName;\r\n\r\n $html = \"\r\n <table width='750px'>\r\n <tr>\r\n <td><b>Point Untuk Aspek :</b></td>\r\n <td>\".$vAspekName.\"</td>\r\n\r\n </tr>\r\n </table>\";\r\n\r\n $sqPrareg = 'SELECT aa.* FROM (\r\n SELECT z.*\r\n FROM (\r\n SELECT u.tinfo_paten, u.`iupb_id`, u.`iGroup_produk` , u.iteambusdev_id, mku.vkategori, u.`ikategoriupb_id`,\r\n u.`vupb_nomor`,u.vupb_nama,if(u.ineed_prareg=1,\"Ya\", \"Tidak\") as needPrareg, DATE(la.dCreate) as appdir, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih\r\n FROM plc2.plc2_upb u\r\n # JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules \r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.plc2_upb_master_kategori_upb mku ON u.ikategoriupb_id=mku.ikategori_id\r\n WHERE u.ldeleted = 0 AND la.lDeleted=0 AND mo.lDeleted=0 AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n #AND u.istatus = 7\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND u.iKill = 0\r\n and u.ldeleted = 0\r\n AND la.iApprove=2\r\n AND u.`ikategoriupb_id` = 10\r\n and u.itipe_id <> 6\r\n \r\n AND (\r\n case when u.ineed_prareg=1 then\r\n u.tsubmit_prareg is not null\r\n AND u.tsubmit_prareg >= \"'.$perode1.'\" \r\n AND u.tsubmit_prareg <= \"'.$perode2.'\" \r\n ELSE\r\n u.tsubmit_reg is not null\r\n AND u.tsubmit_reg >= \"'.$perode1.'\" \r\n AND u.tsubmit_reg <= \"'.$perode2.'\" \r\n END\r\n )\r\n UNION \r\n SELECT u.tinfo_paten, u.`iupb_id`, u.`iGroup_produk` , u.iteambusdev_id, mku.vkategori, u.`ikategoriupb_id`,\r\n u.`vupb_nomor`,u.vupb_nama,if(u.ineed_prareg=1,\"Ya\", \"Tidak\") as needPrareg, DATE(la.dCreate) as appdir, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg) as tanggalSubmit,\r\n ABS(datediff(la.dCreate, if(u.ineed_prareg=1,u.tsubmit_prareg, u.tsubmit_reg))) as selisih\r\n FROM plc2.plc2_upb u\r\n # JOIN plc2.plc2_upb_prioritas_detail det on det.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_log_activity la on la.iKey_id=u.iupb_id\r\n JOIN plc3.m_modul mo on mo.idprivi_modules=la.idprivi_modules\r\n JOIN hrd.employee e on e.cNip = la.cCreated\r\n JOIN plc2.plc2_upb_master_kategori_upb mku ON u.ikategoriupb_id=mku.ikategori_id\r\n JOIN plc2.tanggal_history_prareg_reg his on his.iupb_id=u.iupb_id\r\n JOIN plc3.m_modul_activity moa on moa.iM_modul=mo.iM_modul and moa.iM_activity=la.iM_activity and la.iSort=moa.iSort \r\n where u.ldeleted = 0 \r\n AND la.lDeleted=0 \r\n AND mo.lDeleted=0 \r\n AND moa.lDeleted=0\r\n AND u.iteambusdev_id = 4 \r\n AND u.`ikategoriupb_id` = 10\r\n AND u.iappdireksi = 2\r\n AND u.itipe_id <> 6\r\n AND la.iApprove=2\r\n and moa.iType=3\r\n and his.ldeleted=0\r\n AND his.ijenis = 1\r\n #Check Aktivity\r\n and his.id IN (\r\n select na.id_pk from ( \r\n select ta.dtanggal,ta.id as id_pk \r\n FROM plc2.tanggal_history_prareg_reg ta\r\n join plc2.plc2_upb up on up.iupb_id=ta.iupb_id \r\n WHERE ta.ldeleted=0 \r\n AND (case when up.ineed_prareg=1 then\r\n ta.ijenis=1\r\n ELSE\r\n ta.ijenis=2\r\n END)\r\n group by ta.iupb_id \r\n order by ta.id ASC \r\n ) as na\r\n Where na.dtanggal >= \"'.$perode1.'\"\r\n AND na.dtanggal <= \"'.$perode2.'\"\r\n )\r\n \r\n\r\n ) AS z\r\n\r\n # ORDER BY z.nilai ASC\r\n\r\n ) as aa GROUP BY aa.iupb_id\r\n ORDER BY needPrareg\r\n ';\r\n \r\n\r\n /* $sqPrareg = 'SELECT u.vupb_nomor, u.iupb_id, u.vupb_nama, ua.tupdate, u.tsubmit_prareg ,u.iteambusdev_id,kat.vkategori\r\n FROM plc2.`plc2_upb` u\r\n JOIN plc2.plc2_upb_approve ua ON ua.`iupb_id` = u.`iupb_id`\r\n JOIN plc2.master_group_produk m on u.`iGroup_produk` = m.imaster_group_produk\r\n join plc2.plc2_upb_master_kategori_upb kat on kat.ikategori_id=u.ikategoriupb_id\r\n WHERE u.`ldeleted` = 0 \r\n AND u.tsubmit_prareg IS NOT NULL AND u.tsubmit_prareg <>\"0000-00-00\"\r\n AND u.`iteambusdev_id` = 4\r\n AND ua.`vtipe` = \"DR\"\r\n AND ua.`iapprove` = 2\r\n AND u.itipe_id <> 6\r\n and u.ineed_prareg = 1\r\n AND u.ldeleted = 0 \r\n AND u.ikategoriupb_id = 10 # Kategori A\r\n AND u.`tsubmit_prareg` >= \"'.$perode1.'\"\r\n AND u.`tsubmit_prareg` <= \"'.$perode2.'\"\r\n ';\r\n*/\r\n $upbPrareg = $this->db_erp_pk->query($sqPrareg)->result_array(); \r\n $html .= \"<table cellspacing='0' cellpadding='3' width='750px'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <th colspan='6' style='text-align: left;border: 1px solid #dddddd;' >Tanggal Submit Prareg</th> \r\n </tr>\r\n <tr style='width:100%; border: 1px solid #f86609; background: #b5f2a6; border-collapse: collapse;text-align: center;'>\r\n <th>No</th>\r\n <th>No UPB</th>\r\n <th>Nama UPB</th> \r\n <th>Team Busdev</th> \r\n <th>Kategori</th> \r\n <th>Need Prareg</th> \r\n <th>Tanggal Approval Direksi</th>\r\n <th>Tanggal Submit Prareg</th> \r\n </tr>\r\n \"; \r\n\r\n $cekDouble = array();\r\n $kurangTotal=0;\r\n $i=0;\r\n $total_parareg = 0;\r\n foreach ($upbPrareg as $ub) {\r\n $sqlk =\"SELECT u.`vteam` FROM plc2.`plc2_upb_team` u WHERE u.`ldeleted`=0 AND u.`iteam_id` = '\".$ub['iteambusdev_id'].\"'\";\r\n $kat = $this->db_erp_pk->query($sqlk)->row_array();\r\n if(empty($kat['vteam'])){\r\n $k = '-';\r\n }else{\r\n $k = $kat['vteam'];\r\n }\r\n\r\n $i++; \r\n if (in_array($ub['iupb_id'], $cekDouble)) {\r\n $kurangTotal++;\r\n }\r\n array_push($cekDouble,$ub['iupb_id']);\r\n $total_parareg++;\r\n $html .= \"<tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:5%;text-align: center;border: 1px solid #dddddd;' >\".$i.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nomor'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vupb_nama'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$k.\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['vkategori'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['needPrareg'].\"</td> \r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['appdir'].\"</td>\r\n <td style='width:10%;text-align: left;border: 1px solid #dddddd;'>\r\n \".$ub['tanggalSubmit'].\"</td>\r\n </tr>\"; \r\n\r\n \r\n\r\n } \r\n $html .= \"</table><br /> \";\r\n\r\n //-------------------------------------------------------------------------------------- INI REG\r\n\r\n\r\n\r\n $totalUpb =$total_parareg; \r\n $jumlahUpb = $totalUpb - $kurangTotal; \r\n $result = number_format($jumlahUpb);\r\n $getpoint = $this->getPoint($result,$iAspekId);\r\n $x_getpoint = explode(\"~\", $getpoint);\r\n $point = $x_getpoint['0'];\r\n $warna = $x_getpoint['1'];\r\n\r\n\r\n $html .= \"<table align='left' cellspacing='0' cellpadding='3' style='width: 500px;'>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;background-color: #3bdeea;'>\r\n <td colspan='2' style='text-align: left;border: 1px solid #dddddd;'></td>\r\n </tr>\r\n <tr style='border: 1px solid #dddddd; border-collapse: collapse;'>\r\n <td style='width:150px;text-align: left;border: 1px solid #dddddd;'>Total UPB Prareg & Reg</td>\r\n <td style='width:100px;text-align: right;border: 1px solid #dddddd;'>\".$totalUpb.\" </td>\r\n </tr>\r\n \r\n </table><br/><br/>\";\r\n\r\n\r\n echo $result.\"~\".$point.\"~\".$warna.\"~\".$html;\r\n }", "public function simpan_penalty_penetapan()\n\t{\t\n\t\t$status = $this->Model_karyawan->get_data_status();\n\t\t\tforeach ($status->result_array() as $st ) {\n\t\t\t\t$thn = $st['tahun'];\n\t\t\t}\n\n\t\t// Jika menekan button dengan name = submit_data\n\t\tif (isset($_POST['submit_data'])) {\n\t\t\t$divisi = $this->input->post('nama_divisi');\n\n\t\t\tforeach ($divisi as $key => $value) {\n\t\t\t\t$data[] = array(\n\t\t\t\t\t\"ID_INDIKATOR\"\t\t=> $_POST['id_indikator'][$key],\n\t\t\t\t\t\"DIVISI\"\t\t\t=> $_POST['nama_divisi'][$key],\n\t\t\t\t\t\"TARGET_PERTAHUN\"\t=> $_POST['target_pertahun'][$key],\n\t\t\t\t\t\"BOBOT\"\t\t\t\t=> $_POST['bobot'][$key],\n\t\t\t\t\t\"TOTAL_BOBOT\"\t\t=> $_POST['total_bobot'][$key],\n\t\t\t\t\t\"TW1\"\t\t\t\t=> $_POST['tw1'][$key],\n\t\t\t\t\t\"TW2\"\t\t\t\t=> $_POST['tw2'][$key],\n\t\t\t\t\t\"TW3\"\t\t\t\t=> $_POST['tw3'][$key],\n\t\t\t\t\t\"TW4\"\t\t\t\t=> $_POST['tw4'][$key],\n\t\t\t\t\t\"STATUS\" \t\t\t=> 'KIRIM',\n\t\t\t\t\t\"TAHUN_INSERT\"\t\t=> $thn,\n\t\t\t\t\t\"INPUT_TIME\"\t\t=> date('Y-m-d H:i:s', now('Asia/Jakarta'))\n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->Model_master_penalty->simpan_penetapan($data);\n\n\t\t\techo $this->session->set_flashdata('msg','<div class=\"alert alert-success\">Anda &nbsp;&nbsp;<span class=\"badge badge-pill badge-success\">Success</span>&nbsp;&nbsp; Mengirim Data Penalty Penetapan SKI.<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button></div>');\n\n\t\t\tredirect('Master/penetapan_penalty','refresh');\n\t\t// Jika menekan button dengan name = submit_simpan\n\t\t} else {\n\t\t\t$divisi = $this->input->post('nama_divisi');\n\n\t\t\tforeach ($divisi as $key => $value) {\n\t\t\t\t$data[] = array(\n\t\t\t\t\t\"ID_INDIKATOR\"\t\t=> $_POST['id_indikator'][$key],\n\t\t\t\t\t\"DIVISI\"\t\t\t=> $_POST['nama_divisi'][$key],\n\t\t\t\t\t\"TARGET_PERTAHUN\"\t=> $_POST['target_pertahun'][$key],\n\t\t\t\t\t\"BOBOT\"\t\t\t\t=> $_POST['bobot'][$key],\n\t\t\t\t\t\"TOTAL_BOBOT\"\t\t=> $_POST['total_bobot'][$key],\n\t\t\t\t\t\"TW1\"\t\t\t\t=> $_POST['tw1'][$key],\n\t\t\t\t\t\"TW2\"\t\t\t\t=> $_POST['tw2'][$key],\n\t\t\t\t\t\"TW3\"\t\t\t\t=> $_POST['tw3'][$key],\n\t\t\t\t\t\"TW4\"\t\t\t\t=> $_POST['tw4'][$key],\n\t\t\t\t\t\"STATUS\" \t\t\t=> 'SIMPAN',\n\t\t\t\t\t\"TAHUN_INSERT\"\t\t=> $thn,\n\t\t\t\t\t\"INPUT_TIME\"\t\t=> date('Y-m-d H:i:s', now('Asia/Jakarta'))\n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->Model_master_penalty->simpan_penetapan($data);\n\n\t\t\techo $this->session->set_flashdata('msg','<div class=\"alert alert-success\">Anda &nbsp;&nbsp;<span class=\"badge badge-pill badge-success\">Success</span>&nbsp;&nbsp; Menyimpan Data Penalty Penetapan SKI.<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button></div>');\n\n\t\t\tredirect('Master/penetapan_penalty','refresh');\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the useSecurityKeyForSignin property value. Boolean value used to enable the Windows Hello security key as a logon credential.
public function setUseSecurityKeyForSignin(?bool $value): void { $this->getBackingStore()->set('useSecurityKeyForSignin', $value); }
[ "public function setSecurityKeyForSignIn($val)\n {\n $this->_propDict[\"securityKeyForSignIn\"] = $val;\n return $this;\n }", "public function getUseSecurityKeyForSignin()\n {\n if (array_key_exists(\"useSecurityKeyForSignin\", $this->_propDict)) {\n return $this->_propDict[\"useSecurityKeyForSignin\"];\n } else {\n return null;\n }\n }", "public function setKioskModeManagedHomeScreenSignInEnabled(?bool $value): void {\n $this->getBackingStore()->set('kioskModeManagedHomeScreenSignInEnabled', $value);\n }", "public function setEnhancedSignInSecurity(?int $value): void {\n $this->getBackingStore()->set('enhancedSignInSecurity', $value);\n }", "protected function set_use_key() {\n\t\t$this->use_key = true;\n\t}", "public function getUseSecurityKeyForSignin(): ?bool {\n $val = $this->getBackingStore()->get('useSecurityKeyForSignin');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'useSecurityKeyForSignin'\");\n }", "protected function set_use_key() {\n\t\t$this->use_key = false;\n\t}", "public function setLocalSecurityOptionsAllowPKU2UAuthenticationRequests(?bool $value): void {\n $this->getBackingStore()->set('localSecurityOptionsAllowPKU2UAuthenticationRequests', $value);\n }", "public function setAuthenticationAllowSecondaryDevice(?bool $value): void {\n $this->getBackingStore()->set('authenticationAllowSecondaryDevice', $value);\n }", "public function setAccountkey($value = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY)\n\t{\n\t\t$this->_accountKey = base64_decode($value);\n\t\treturn $this;\n\t}", "public function setEnableSingleSignOn(?bool $value): void {\n $this->getBackingStore()->set('enableSingleSignOn', $value);\n }", "public function setFastFirstSignIn(?Enablement $value): void {\n $this->getBackingStore()->set('fastFirstSignIn', $value);\n }", "public function setLocalSecurityOptionsSwitchToSecureDesktopWhenPromptingForElevation(?bool $value): void {\n $this->getBackingStore()->set('localSecurityOptionsSwitchToSecureDesktopWhenPromptingForElevation', $value);\n }", "public function setIsPhoneOneTimePasswordAuthenticationEnabled(?bool $value): void {\n $this->getBackingStore()->set('isPhoneOneTimePasswordAuthenticationEnabled', $value);\n }", "public function setLocalSecurityOptionsAllowUIAccessApplicationsForSecureLocations(?bool $value): void {\n $this->getBackingStore()->set('localSecurityOptionsAllowUIAccessApplicationsForSecureLocations', $value);\n }", "public function setAuthKey();", "public function setSecurityKey($securityKey) {\n\t\t$this->_securityKey = $securityKey;\n\t}", "public function setSmartScreenEnableAppInstallControl(?bool $value): void {\n $this->getBackingStore()->set('smartScreenEnableAppInstallControl', $value);\n }", "public function setServiceKey($value)\n {\n return $this->set('ServiceKey', $value);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the transaction totals, fee and txout
protected function calculate() { $fee = 0; $amount = 0; //Loop though the transactionlines to get the amount and fee foreach ($this->transactionlines as $transactionline) { $fee += $transactionline->fee; $amount += $transactionline->amount; } $this->fee = $fee; $this->amount = $amount; }
[ "protected function calculate_fee_totals()\n {\n }", "protected function calculate_fee_totals() {\n\t\t$this->get_fees_from_cart();\n\n\t\t$this->set_total( 'fees_total', array_sum( wp_list_pluck( $this->fees, 'total' ) ) );\n\t\t$this->set_total( 'fees_total_tax', array_sum( wp_list_pluck( $this->fees, 'total_tax' ) ) );\n\n\t\t$this->cart->fees_api()->set_fees( wp_list_pluck( $this->fees, 'object' ) );\n\t\t$this->cart->set_fee_total( wc_remove_number_precision_deep( array_sum( wp_list_pluck( $this->fees, 'total' ) ) ) );\n\t\t$this->cart->set_fee_tax( wc_remove_number_precision_deep( array_sum( wp_list_pluck( $this->fees, 'total_tax' ) ) ) );\n\t\t$this->cart->set_fee_taxes( wc_remove_number_precision_deep( $this->combine_item_taxes( wp_list_pluck( $this->fees, 'taxes' ) ) ) );\n\t}", "public function getBillTotal() {\n\t\t// alle Positionen einer Rechnungen ermitteln \n\t\t\n\t\t// und den Positionspreis errechnen und speichern\n\t\t\n\t\t// die Summe aller Positionspreise ist der Rechnungspreis\n\t\t\n\t\t\n\t\t// steuersatz umrechnen\n\t\t//$tax = $this->tax / 100;\n\t\t//$tax = $tax + 1; \n\t\treturn $this->quantity * $this->price * $tax;\n\t}", "public function getTransactionSum(): float\n {\n $result = $this->getTransactions();\n $sum = 0;\n\n foreach($result as $transaction) {\n $transaction->getFrom()->getId() == $this->getId() ? $sum -= $transaction->getAmount() : $sum += $transaction->getAmount();\n }\n return $sum;\n }", "public function CalculateTotals()\n {\n foreach($this->rentals as $rental) {\n $amount = 0;\n\n $Billing = new \\BusinessLogic\\Billing();\n $Points = new \\BusinessLogic\\FrequentRenterPoints();\n $this->total += $Billing->GenerateMovieRentCost($rental);\n $this->points += $Points->GeneratePoints($rental);\n }\n }", "abstract public function calcTransactionFee(int $inputs, int $outputs, $amount = 0);", "public function getCostTotals();", "public function calculateTotal() \n\t{\n\t\t\n //Prepare the calculation variables.\n\t\t$sortCodeAccountMerge = $this->getSortCodeAccountMerge();\t\t\t\n\t\t\n\t\t//Calculate the total\n\t\t$total = 0;\n\t\t\n\t\t$total += ($sortCodeAccountMerge->sortCodeU * $this->_multiplier->sortCodeU);\n\t\t$total += ($sortCodeAccountMerge->sortCodeV * $this->_multiplier->sortCodeV);\n\t\t$total += ($sortCodeAccountMerge->sortCodeW * $this->_multiplier->sortCodeW);\n\t\t$total += ($sortCodeAccountMerge->sortCodeX * $this->_multiplier->sortCodeX);\n\t\t$total += ($sortCodeAccountMerge->sortCodeY * $this->_multiplier->sortCodeY);\n\t\t$total += ($sortCodeAccountMerge->sortCodeZ * $this->_multiplier->sortCodeZ);\n\t\t$total += ($sortCodeAccountMerge->accountNumberA * $this->_multiplier->accountNumberA);\n\t\t$total += ($sortCodeAccountMerge->accountNumberB * $this->_multiplier->accountNumberB);\n\t\t$total += ($sortCodeAccountMerge->accountNumberC * $this->_multiplier->accountNumberC);\n\t\t$total += ($sortCodeAccountMerge->accountNumberD * $this->_multiplier->accountNumberD);\n\t\t$total += ($sortCodeAccountMerge->accountNumberE * $this->_multiplier->accountNumberE);\n\t\t$total += ($sortCodeAccountMerge->accountNumberF * $this->_multiplier->accountNumberF);\n\t\t$total += ($sortCodeAccountMerge->accountNumberG * $this->_multiplier->accountNumberG);\n\t\t$total += ($sortCodeAccountMerge->accountNumberH * $this->_multiplier->accountNumberH);\n\n\t\t$this->_total = $total;\n\t}", "public function getTotalTtc()\n\t{\n\t\t$retour = 0;\n\t\tforeach($this->getProducts() as $item)\n\t\t{\n\t\t\t$retour += round($item->getRowTotalWithTaxes(), 2);\n\t\t}\n\t\t//rajoute les fdp\n\t\t$retour += round($this->getShippingAmountTtc(), 2);\n\t\t$retour += round($this->getZollAmountTtc(), 2);\n\t\treturn $retour;\n\t}", "public function calculateTotals()\n {\n $discountAmount = $this->price * $this->discount;\n $this->subtotal = ($this->price - $discountAmount) * $this->quantity;\n\n $taxClass = $this->getTaxClass();\n\n if ($taxClass && $this->invoice && !$this->is_tax_exempt) {\n $this->tax = $taxClass->getTotalTax($this->subtotal);\n }\n\n $this->total = $this->subtotal + $this->tax;\n }", "public function calcTotalCash(){\n\n return $this->cashNotes['50']*50 + $this->cashNotes['20']*20;\n }", "public function getCalculateTotal()\n {\n $this->updateFreight();\n\n $totals = $this->getProductsTotal();\n\n $this->setvlsubtotal($totals['vlprice']);\n $this->setvltotal($totals['vlprice'] + $this->getvlfreight());\n }", "public function total() \n {\n // TODO\n // Add the tax to total.\n\n $contents = $this->contents();\n\n return $contents->sum('subtotal') + $this->shop->delivery_fee;\n }", "public function recalculateTotal()\n {\n $this->setTotal($this->getSubTotal() + $this->getHubFee());\n }", "private function calculateTotalsAndUtilisation()\n\t{\n\t\tforeach ($this->project_table_data as $project_id => $weekly_data) {\n\t\t\t$allocated = 0;\n\t\t\t$required = 0;\n\t\t\tforeach ($weekly_data as $week => $data) {\n\t\t\t\tif ($week != \"totals\") {\n\t\t\t\t\t$allocated += $data['allocated'];\n\t\t\t\t\t$required += $data['required'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$utilisation = 0;\n\t\t\tif ($required == 0) {\n\t\t\t\t$utilisation = \"N/A\";\n\t\t\t} else {\n\t\t\t\t$utilisation = round($allocated/$required * 100, 1); //this represents a percentage value\n\t\t\t}\n\t\t\t$this->project_table_data[$project_id]['totals'] = array(\n\t\t\t\t\t'allocated' => $allocated,\n\t\t\t\t\t'required' => $required,\n\t\t\t\t\t'utilisation' => $utilisation\n\t\t\t\t);\n\t\t\t\n\t\t\t$this->total_allocated += $allocated;\n\t\t}\n\n\t\t$this->calculateTotalAvailable();\n\t\t$this->calculateTotalUtilisation();\n\t}", "public function calculateAdjustmentsTotal();", "private function calculateTotals(): float{\r\n $tempTotal = 0;\r\n foreach($this->listOfItems as &$item){\r\n $item['total'] = $item['price'] * $item['quantity'];\r\n $tempTotal += $item['total'];\r\n }\r\n\r\n return $tempTotal;\r\n }", "function recalculatingPaymentTotals() {\n $invoice_objects_table = TABLE_PREFIX . 'invoice_objects';\n $payments_table = TABLE_PREFIX . 'payments';\n\n // set balance due to invoice total\n DB::execute('UPDATE ' . $invoice_objects_table . ' SET balance_due = total');\n\n $total_payments = DB::execute('SELECT parent_id AS invoice_id, SUM(amount) AS paid_amount FROM ' . $payments_table . ' WHERE parent_type = ? AND status = ? GROUP BY parent_id ORDER BY parent_id ASC', 'Invoice', 'Paid');\n if ($total_payments) {\n foreach ($total_payments as $total_payment) {\n $invoice_id = $total_payment['invoice_id'];\n $paid_amount = $total_payment['paid_amount'];\n $invoice_total = DB::executeFirstCell('SELECT total FROM ' . $invoice_objects_table . ' WHERE id = ? AND type = ?', $invoice_id, 'Invoice');\n $balance_due = $invoice_total - $paid_amount;\n DB::execute('UPDATE ' . $invoice_objects_table . ' SET balance_due = ?, paid_amount = ? WHERE id = ? AND type = ?', $balance_due, $paid_amount, $invoice_id, 'Invoice');\n } // foreach\n } // if\n }", "function calcTotal() {\n // calculate the total for the entire cart.\n $productBS = new ProductBusinessService();\n //create an array to hold the subtotals\n $subtotals_array = array();\n $this->total_price = 0;\n\n foreach($this->items as $item => $num){\n $product = $productBS->findByproductsID($item);\n $product_subtotal = $product->getPrice() * $num;\n $subtotals_array = $subtotals_array + array($item => $product_subtotal);\n $this->total_price = $this->total_price + $product_subtotal;\n ;\n\n }\n\n $this->subtotals = $subtotals_array;\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test fixture records of similar type
public function testFixtureRecordsWithSameType() { $data = $this->Volunteerregistration->find()->where(['profession' => 'Doctor']); $this->assertEquals(2, $data->count()); }
[ "public function testFixtureRecordsWithSameType()\n {\n \n $data = $this->Orgteam->find()->where(['teamname' => 'Evac1']);\n $this->assertEquals(1, $data->count());\n\n }", "public function testFixtureRecordsWithSameType()\n {\n \n $data = $this->Organization->find()->where(['type' => 'Private']);\n $this->assertEquals(2, $data->count());\n\n }", "public function testByUid()\n {\n foreach ($this->dummyRecords as $expectedRecord) {\n $media = $this->mediaRepository->findByUid($expectedRecord['uid']);\n $this->assertInstanceOf($expectedRecord['tx_extbase_type'], $media);\n }\n }", "public function test_insert_record() {\n global $CFG;\n\n $this->resetAfterTest();\n $manager = new records_manager();\n $this->assertCount(0, $manager->get_all());\n\n $record1 = new record((object)[\n 'id' => 'test1',\n 'enabled' => false,\n 'type' => 'test 1',\n ]);\n\n $manager->save($record1);\n $this->assertCount(1, $manager->get_all());\n\n $record2 = new record((object)[\n 'id' => 'test2',\n 'enabled' => true,\n 'type' => 'test 2',\n 'settings' => [],\n ]);\n\n $manager->save($record2);\n $this->assertCount(2, $manager->get_all());\n\n $this->assertEquals([\n 'test1' => (object) [\n 'id' => 'test1',\n 'name' => '',\n 'enabled' => false,\n 'type' => 'test 1',\n 'trackadmin' => 0,\n 'cleanurl' => 0,\n 'settings' => [],\n\n ],\n 'test2' => (object) [\n 'id' => 'test2',\n 'name' => '',\n 'enabled' => true,\n 'type' => 'test 2',\n 'trackadmin' => 0,\n 'cleanurl' => 0,\n 'settings' => [],\n ]\n ], unserialize($CFG->tool_webanalytics_records));\n }", "private function prepareMultiOccurrenceWithSameTypeTestData(): array\n {\n $data = array_merge(\n ['int_field' => 3, 'string_field' => 'test', 'float_field' => 56.35, 'bool_field' => true],\n ['associative_array_field' => ['a' => 23, 'b' => 7], 'simple_array_field' => [46, 764]],\n );\n $jsonData = [array_merge($data, ['_name' => 'some_test']), array_merge($data, ['_name' => 'other_test'])];\n $json = json_encode($jsonData);\n $expected = [\n 'int_field' => new IntType(),\n 'string_field' => new StringType(),\n 'float_field' => new FloatType(),\n 'bool_field' => new BoolType(),\n 'associative_array_field' => new ArrayType(),\n 'simple_array_field' => new ArrayType(),\n ];\n\n return [$json, $expected];\n }", "public function records_can_find_their_record_type()\n {\n $record_type = factory(RecordType::class)->create();\n\n $record = factory(Record::class)->states('approved')->create([\n 'record_type_id' => $record_type->id,\n ]);\n\n $this->assertEquals($record_type->id, Record::find($record->id)->record_type->id);\n }", "public function itShouldAbleToGenerateFakeFixtureData()\n {\n $word = Fixture::fake('word');\n $number = Fixture::fake('numberBetween', 1, 1);\n\n $this->assertInternalType('string', $word);\n $this->assertEquals(1, $number);\n }", "public function testGetRecords()\n {\n $fixtures = new Mad_Test_Fixture_Collection($this->_conn, 'unit_tests_more');\n $this->assertEquals(11, count($fixtures->getRecords()));\n }", "abstract protected function getFixtures();", "public function testDoubleRecord()\n {\n $record = $this->createRecord(array(\n 'student' => $this->student,\n 'exam' => $this->exam\n ));\n $record = $this->createRecord(array(\n 'student' => $this->student,\n 'exam' => $this->exam\n ));\n }", "public function record_type_can_find_records()\n {\n $record_type = factory(RecordType::class)->create();\n\n $record = factory(Record::class)->states('approved')->create([\n 'record_type_id' => $record_type->id,\n ]);\n\n $this->assertEquals(1, RecordType::find($record_type->id)->records->count());\n $this->assertEquals($record->md5, RecordType::find($record_type->id)->records->first()->md5);\n }", "public function testDynamicDataIdRecordsGet()\n {\n\n }", "public function testAggregateRecords()\n {\n }", "abstract protected function getRandomRecord($type) : Record;", "abstract protected function willLoadFixture();", "private function createTypeRecords(): void\n {\n $typeFactory = new TypeFactory();\n\n foreach ($this->data as $data) {\n $this->records[] = $typeFactory->getType($data);\n }\n }", "public function testCorrectDataTypes()\n {\n // Test with correct data types\n $entity = new Types([\n 'integer' => 1337,\n 'boolean' => false,\n 'array' => ['hello'],\n 'string' => 'foobar',\n 'any' => 'any!',\n ]);\n\n $this->assertInternalType('integer', $entity->integer);\n $this->assertInternalType('boolean', $entity->boolean);\n $this->assertInternalType('array', $entity->array);\n $this->assertInternalType('string', $entity->string);\n $this->assertInternalType('string', $entity->any);\n }", "function testGetUserFixtures() {\n\t\t$this->Task->setReturnValueAt(0, 'in', 'y');\n\t\t$this->Task->setReturnValueAt(1, 'in', 'app.pizza, app.topping, app.side_dish');\n\t\t$result = $this->Task->getUserFixtures();\n\t\t$expected = array('app.pizza', 'app.topping', 'app.side_dish');\n\t\t$this->assertEqual($result, $expected);\n\t}", "function testSetsContainCorrectTypes()\r\n {\r\n foreach ($this->sets as $set)\r\n {\r\n // id is a number >= 0\r\n $this->assertTrue(is_numeric($set->id));\r\n $this->assertGreaterThanOrEqual(0, $set->id);\r\n // weapon is a number >= 0\r\n $this->assertTrue(is_numeric($set->weapon));\r\n $this->assertGreaterThanOrEqual(0, $set->weapon);\r\n // armor is a number >= 0\r\n $this->assertTrue(is_numeric($set->armor));\r\n $this->assertGreaterThanOrEqual(0, $set->armor);\r\n // helmet is a number >= 0\r\n $this->assertTrue(is_numeric($set->helmet));\r\n $this->assertGreaterThanOrEqual(0, $set->helmet);\r\n // boots is a number >= 0\r\n $this->assertTrue(is_numeric($set->boots));\r\n $this->assertGreaterThanOrEqual(0, $set->boots);\r\n // name is not empty\r\n $this->assertNotEmpty($set->name);;\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return Thumbnail path from given path, works for both file and dir path
protected function get_thumbnail_path($path) { $relative_path = $this->getRelativePath($path); $thumbnail_path = $this->path_to_files . '/' . $this->config['images']['thumbnail']['dir'] . '/'; if (is_dir($path)) { $thumbnail_fullpath = $thumbnail_path . $relative_path . '/'; } else { $thumbnail_fullpath = $thumbnail_path . dirname($relative_path) . '/' . basename($path); } return $this->cleanPath($thumbnail_fullpath); }
[ "public function getThumbnailDirectory($path)\n {\n return pathinfo($path, PATHINFO_DIRNAME) . '/' . \\Magento\\Theme\\Model\\Wysiwyg\\Storage::THUMBNAIL_DIRECTORY;\n }", "private function getThumbnailDir()\n {\n $mediaService = Shopware()->Container()->get('shopware_media.media_service');\n $path = $this->getUploadDir() . 'thumbnail' . DIRECTORY_SEPARATOR;\n $path = $mediaService->normalize($path);\n\n return $path;\n }", "function load_thumbnail_path($source_path) {\n\t// Hardcode.\n\t$name = \"186_186\";\n\t$base_name = pathinfo($source_path, PATHINFO_BASENAME);\n\t$dir_name = pathinfo($source_path, PATHINFO_DIRNAME);\n\treturn \"{$dir_name}/thumbnail_{$name}_\". $base_name;\n}", "protected function thumbnailPath()\n {\n \treturn $this->basePath() . '/' . $this->thumbnail;\n }", "public function thumbnailPath() {\n return $this->baseDir() . '/tn-' . $this->name;\n // Ex: 'BannerPhoto/photos/tn-foo.jpg'\n }", "public function getThumbnailPath()\n {\n return $this->getCurrentThemePath() . self::DIR_SEPARATOR . $this->thumbnailFolder;\n }", "abstract protected function getThumbPath($originalPath);", "public function getThumbnail() {\n\n if (file_exists($this->getUploadDir() . '/min_' . $this->path)){\n return $this->getUploadDir() . '/min_' . $this->path;\n }else{\n return $this->getWebPath();\n }\n }", "public function getThumbnail() {\n if (file_exists($this->getUploadDir() . '/min_' . $this->path)){\n return $this->getUploadDir() . '/min_' . $this->path;\n }else{\n return $this->getWebPath();\n }\n }", "public static function getThumbnailFolder()\n {\n return trim(sfConfig::get('app_lyMediaManager_thumbnail_folder', 'thumbs'), \"\\/\");\n }", "public function getThumbnailPath() {\n return $this->getPath() . DS . 'thumbs';\n }", "public function thumbnailPath() {\n return $this->baseDir() . '/tn-' . $this->fileName();\n }", "protected function getThumbnailDirUrl()\n {\n return url(config('__file_manager.thumbnails_dir_url'));\n }", "public function getThumbMediaImgPath()\n\t{\n\n\t\t$folderPath = realpath(Yii::app()->params['imgPath'] . '/property/p/' . $this->med_row);\n\n\t\tif (file_exists($folderPath . '/' . $this->getNameWithSuffix(self::SUFFIX_THUMB1))) {\n\t\t\treturn $folderPath . '/' . $this->getNameWithSuffix(self::SUFFIX_THUMB1);\n\t\t}\n\t\tif (file_exists($folderPath . '/' . $this->getNameWithSuffix(self::SUFFIX_THUMB2))) {\n\t\t\treturn $folderPath . '/' . $this->getNameWithSuffix(self::SUFFIX_THUMB2);\n\t\t}\n\t\treturn false;\n\t}", "public function getThumbnail(): string\n\t{\n\t\t$path = config('Medias')->getPath() . 'thumbnails' . DIRECTORY_SEPARATOR . ($this->attributes['thumbnail'] ?? '');\n\t\t\t\n\t\tif (!is_file($path)) {\n $setThumbnail = self::locateDefaultThumbnail();\n }else{\n\t\t\t$setThumbnail = site_url(config('Medias')->segementUrl . DIRECTORY_SEPARATOR . 'thumbnails' . DIRECTORY_SEPARATOR . $this->attributes['filename']);\n\t\t}\n\n\t\treturn $setThumbnail;\n\t}", "public function getAbsoluteThumbnailPath()\n\t{\n\t\treturn rtrim($this->UploadDestination->server_path, '/') . '/_thumbs/' . $this->file_name;\n\t}", "public function getRootThumbnailPath()\n {\n return \"{$this->thumbnail}\";\n }", "protected function getThumbnailDir(Media $media)\n {\n return '/media/' . strtolower($media->getType()) . '/thumbnail/';\n }", "public function getThumbFilePath()\n {\n \t$filename=$this->const.\"_\".$this->max.\"_\".$this->qhash;\n \t$this->thumbPath= dirname(dirname(__FILE__)).\"/\".$this->relPath.$filename;\n \t$this->thumbHTMLPath= \"content/\".$this->relPath.$filename;\n \tswitch ($this->mimetype)\n\t\t{\n\t\t\tcase 'image/jpeg':\n\t\t\tcase 'image/pjpeg':\n\t\t\tcase 'image/x‑xbitmap':\n\t\t\tcase 'image/x‑xbm':\n\t\t\tcase 'image/x‑xpixmap':\n\t\t\tcase 'image/vnd.wap.wbmp':\n\t\t\t\t$this->thumbPath .= \".jpg\";\n\t\t\t\t$this->thumbHTMLPath .= \".jpg\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'image/webp':\n\t\t\tcase 'image/png':\n\t\t\tcase 'image/gif':\n\t\t\t\t$this->thumbPath .= \".png\";\n\t\t\t\t$this->thumbHTMLPath .= \".png\";\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Logic CPU Count for macOS
public static function getCpuCount(): int { [$ret, $output] = shell()->execWithResult('sysctl -n hw.ncpu'); if ($ret !== 0) { throw new RuntimeException('Failed to get cpu count'); } return (int) $output[0]; }
[ "function detect_cpus()\n{\n // Linux, Unix and MacOS:\n if (PHP_OS_FAMILY == OS_MACOS) {\n $shell = ['sysctl', '-n', 'hw.ncpu'];\n } elseif (PHP_OS_FAMILY == OS_LINUX) {\n $shell = ['cat', '/proc/cpuinfo', '|', 'grep', 'processor', '|', 'wc', '-l'];\n } else {\n // default\n return 1;\n }\n try {\n $process = new Process($shell);\n $process->mustRun();\n $output = $process->getOutput();\n return intval($output);\n } catch (ProcessFailedException $e) {\n TestLogger::warning($e);\n return 1;\n }\n}", "function swoole_cpu_num(){}", "function system_cores()\n{\n $cmd = \"uname\";\n $OS = strtolower(trim(shell_exec($cmd)));\n \n switch($OS) {\n case('linux'):\n $cmd = \"cat /proc/cpuinfo | grep processor | wc -l\";\n break;\n case('freebsd'):\n $cmd = \"sysctl -a | grep 'hw.ncpu' | cut -d ':' -f2\";\n break;\n default:\n unset($cmd);\n }\n \n if ($cmd != '') {\n $cpuCoreNo = intval(trim(shell_exec($cmd)));\n }\n \n return empty($cpuCoreNo) ? 1 : $cpuCoreNo;\n}", "function teddy_cpu_num(): int\n {\n static $count;\n if (!$count) {\n $os = strtolower(PHP_OS_FAMILY);\n\n switch ($os) {\n case 'windows':\n $count = (int) shell_exec('echo %NUMBER_OF_PROCESSORS%');\n\n break;\n\n case 'linux':\n $count = (int) shell_exec('nproc --all');\n\n break;\n\n case 'darwin':\n case 'bsd':\n case 'solaris':\n $count = (int) shell_exec('grep -c ^processor /proc/cpuinfo');\n\n break;\n\n default:\n $count = 1;\n }\n\n $count = ($count > 0) ? $count : 1;\n }\n\n return $count;\n }", "static function cpuNum() {\n\t\tif (0 === strpos ( PHP_OS, 'WIN' )) {\n\t\t\tuser_error ( 'Windows not supported', E_USER_ERROR );\n\t\t}\n\t\t$numCpus = null;\n\t\tif (is_file ( '/proc/cpuinfo' )) {\n\t\t\t$cpuinfo = file_get_contents ( '/proc/cpuinfo' );\n\t\t\tpreg_match_all ( '/^processor/m', $cpuinfo, $matches );\n\t\t\t$numCpus = count ( $matches [0] );\n\t\t} else if ('WIN' == strtoupper ( substr ( PHP_OS, 0, 3 ) )) {\n\t\t\t$process = popen ( 'wmic cpu get NumberOfCores', 'rb' );\n\t\t\tif (false !== $process) {\n\t\t\t\tfgets ( $process );\n\t\t\t\t$numCpus = intval ( fgets ( $process ) );\n\t\t\t\tpclose ( $process );\n\t\t\t}\n\t\t} else {\n\t\t\t$process = popen ( 'sysctl -a', 'rb' );\n\t\t\tif (false !== $process) {\n\t\t\t\t$output = stream_get_contents ( $process );\n\t\t\t\tpreg_match ( '/hw.ncpu: (\\d+)/', $output, $matches );\n\t\t\t\tif ($matches) {\n\t\t\t\t\t$numCpus = intval ( $matches [1] [0] );\n\t\t\t\t}\n\t\t\t\tpclose ( $process );\n\t\t\t}\n\t\t}\n\n\t\treturn $numCpus;\n\t}", "public function getCpuCores()\n {\n $numCpus = 1;\n if (is_file('/proc/cpuinfo')) {\n $cpuinfo = file_get_contents('/proc/cpuinfo');\n preg_match_all('/^processor/m', $cpuinfo, $matches);\n $numCpus = count($matches[ 0 ]);\n } else {\n if ('WIN' == strtoupper(substr(PHP_OS, 0, 3))) {\n $process = @popen('wmic cpu get NumberOfCores', 'rb');\n if (false !== $process) {\n fgets($process);\n $numCpus = intval(fgets($process));\n pclose($process);\n }\n } else {\n $process = @popen('sysctl -a', 'rb');\n if (false !== $process) {\n $output = stream_get_contents($process);\n preg_match('/hw.ncpu: (\\d+)/', $output, $matches);\n if ($matches) {\n $numCpus = intval($matches[ 1 ][ 0 ]);\n }\n pclose($process);\n }\n }\n }\n\n return $numCpus;\n }", "function num_cpus() {\r\n static $numCpus = null;\r\n\r\n if ($numCpus === null) {\r\n $numCpus = 1;\r\n if (is_file('/proc/cpuinfo')) {\r\n $cpuinfo = file_get_contents('/proc/cpuinfo');\r\n preg_match_all('/^processor/m', $cpuinfo, $matches);\r\n $numCpus = count($matches[0]);\r\n } else if ('WIN' == strtoupper(substr(PHP_OS, 0, 3))) {\r\n $process = @popen('wmic cpu get NumberOfCores', 'rb');\r\n if (false !== $process) {\r\n fgets($process);\r\n $numCpus = intval(fgets($process));\r\n pclose($process);\r\n }\r\n } else {\r\n $process = @popen('sysctl -a', 'rb');\r\n if (false !== $process) {\r\n $output = stream_get_contents($process);\r\n preg_match('/hw.ncpu: (\\d+)/', $output, $matches);\r\n if ($matches) {\r\n $numCpus = intval($matches[1][0]);\r\n }\r\n pclose($process);\r\n }\r\n }\r\n }\r\n\r\n return $numCpus;\r\n}", "public function getCoreCount()\n {\n return (int) trim(shell_exec('nproc --all'));\n }", "public function getCpuInfo()\r\n {\r\n\t\treturn $this->terminal('wmic CPU get Name,Manufacturer,NumberOfCores,NumberOfLogicalProcessors /value');\r\n\t}", "protected function getCpuCoresNumber()\r\n {\r\n $result = [];\r\n $status = [];\r\n try {\r\n exec('grep -c ^processor /proc/cpuinfo 2>&1', $result, $status);\r\n if ($status != 0) {\r\n new \\Exception(print_r($result, true));\r\n }\r\n return $result[0];\r\n } catch (\\Exception $e) {\r\n // catch and log exception\r\n }\r\n\r\n return 1;\r\n }", "abstract public function getCpuFrequency();", "protected function getNumberOfCores() {\n if (is_file('/proc/cpuinfo')) {\n $cpu_info = file_get_contents('/proc/cpuinfo');\n preg_match_all('/^processor/m', $cpu_info, $matches);\n\n return count($matches[0]);\n }\n\n $process = @popen('sysctl -a', 'rb');\n if ($process) {\n $output = stream_get_contents($process);\n preg_match('/hw.ncpu: (\\d+)/', $output, $matches);\n pclose($process);\n\n if ($matches) {\n return intval($matches[1][0]);\n }\n }\n\n return 1;\n }", "public function CpuInfo();", "abstract public function cpuCores(): int;", "public function getCPU()\n {\n return $this->cpu;\n }", "public static function getCpuCores();", "private static function _getCPU() {\n return 'amd64';\n }", "function dse_sysstats_hardware_summary(){\n\tglobal $vars;\n\tdpv(3,\"dse_sysstats_hardware_summary()\");\n\t$tbr=\"\";\n\tif(dse_is_osx()){\n\t\t$r=dse_exec(\"/usr/sbin/system_profiler -detailLevel full SPHardwareDataType\");\n\t\t$tbr.=$r;\n\t\t$r=dse_exec(\"sysctl -a\");\n\t\t$tbr.=$r;\n\t\t\n\t\t\n\t\t$cpu_count=trim(dse_exec(\"hwprefs cpu_count\"));\n\t\t$memory_size=trim(dse_exec(\"hwprefs memory_size\"));\n\t\t$cpu_type=trim(dse_exec(\"hwprefs cpu_type\"));\n\t\t$cpu_freq=trim(dse_exec(\"hwprefs cpu_freq\"));\n\t\t$cpu_bus_freq=trim(dse_exec(\"hwprefs cpu_bus_freq\"));\n\t\t$machine_type=trim(dse_exec(\"hwprefs machine_type\"));\n\t\t$processors=trim(strcut(trim(dse_exec(\"system_profiler | grep Processors:\")),\":\"));\n\t\t$ncpu=trim(strcut(trim(dse_exec(\"sysctl hw.ncpu\")),\":\"));\n\t\t$hwphysicalcpu=trim(strcut(trim(dse_exec(\"sysctl hw.physicalcpu\")),\":\"));\n\t\t$hwlogicalcpu=trim(strcut(trim(dse_exec(\"sysctl hw.logicalcpu\")),\":\"));\n\t\t$cpubrand_string=trim(strcut(trim(dse_exec(\"sysctl machdep.cpu.brand_string\")),\":\"));\n\t\t$cpul1icachesize=intval(trim(strcut(trim(dse_exec(\"sysctl hw.l1icachesize\")),\":\"))/1024);\n\t\t$cpucachesize=trim(strcut(trim(dse_exec(\"sysctl machdep.cpu.cache.size\")),\":\"));\n\t\t$cpul3cachesize=intval(trim(strcut(trim(dse_exec(\"sysctl hw.l3cachesize\")),\":\"))/1024);\n\t\t$hwmachine=trim(strcut(trim(dse_exec(\"sysctl hw.machine\")),\":\"));\n\n\t\t// /usr/sbin/system_profiler SPHardwareDataType\n\t\t\n\t\t$tbr.=colorize(\"Hardware Summary:\\n\",\"white\",\"green\");\n\t\t$tbr.= \"Machine Type: \".colorize(\"$machine_type\\n\",\"green\",\"black\");\n\t\t\n\t\t$tbr.= \"CPU Brand: \".colorize(\"$cpubrand_string\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPU Type: \".colorize(\"$cpu_type\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPU Arch: \".colorize(\"$hwmachine\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPU Freq: \".colorize(\"$cpu_freq\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPU Count: \".colorize(\"$processors\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPU Core Count: \".colorize(\"$cpu_count\\n\",\"green\",\"black\");\n\t\t/*$tbr.= \"CPUs: (sysctl hw.ncpu) \".colorize(\"$ncpu\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPUs: (sysctl hw.physicalcpu) \".colorize(\"$hwphysicalcpu\\n\",\"green\",\"black\");*/\n\t\t$tbr.= \"CPU Virtual Cores: \".colorize(\"$hwlogicalcpu\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPU L1 Cache Size: \".colorize(\"$cpul1icachesize KB\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPU L2 Cache Size: \".colorize(\"$cpucachesize KB\\n\",\"green\",\"black\");\n\t\t$tbr.= \"CPU L3 Cache Size: \".colorize(\"$cpul3cachesize KB\\n\",\"green\",\"black\");\n\t\t\n\t\t$tbr.= \"Buss Freq: \".colorize(\"$cpu_bus_freq\\n\",\"green\",\"black\");\n\t\t$tbr.= \"RAM: \".colorize(\"$memory_size\\n\",\"green\",\"black\");\n\t\t\n\t}else{\n\t\t$r=dse_exec(\"hardinfo -r -f text\");\n\t\t$tbr.=$r;\n\t\t\n\t\t$r=dse_exec(\"lshw\"); //-xml\n\t\t$tbr.=$r;\n\t\t\n\t\t//$r=dse_exec(\"lshw -xml\");\n\t\t//$tbr.=$r;\n\t}\n\t\n\treturn $tbr;\n}", "public function getStatus()\n {\n return $this->variant->cpuStatus();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test mapArrayToFileReference with exception
public function testMapArrayToFileReferenceWithException(): void { $reflection = new ReflectionClass(FrontendUserController::class); $method = $reflection->getMethod('mapArrayToFileReference'); $method->setAccessible(true); $propertyMappingConfigurationMock = $this->createMock(PropertyMappingConfiguration::class); $builder = $propertyMappingConfigurationMock->method('setTypeConverterOptions'); $builder->willReturnSelf(); $builder = $this->propertyMapperMock->method('convert'); $builder->willThrowException(new Exception('Exception while property mapping at property path "name".', 1297759968)); $result = $method->invoke($this->subject, []); $this->assertNull($result); }
[ "public function testWriteToFileArrayExceptionPermission() {\n\t $file = vfsStream::newFile('testFile', 0444);\n\t $root = vfsStreamWrapper::getRoot();\n\t $root->addChild($file);\n\n\t $this->assertTrue(vfsStreamWrapper::getRoot()->hasChild('testFile'));\n\n\t $this->fileManipulation->writeToFileArray(vfsStream::url('unitTestDir/testFile'), array(1 => 'replace'));\n\t}", "public function testArrayAccessReadsFileNameFromArray()\n {\n $this->assertEquals($this->bulletproof['ikea'], true);\n }", "public function testConstructFileAlreadyExists()\n {\n file_put_contents($this->file, null);\n\n $SerializedArray = new SerializedArray($this->file);\n $this->assertEquals($this->file, $this->getProperty($SerializedArray, 'file'));\n }", "protected function ensureMapfile($map) {\n\t\tif (is_string($map) && !empty($map) && $this->mapIsString($map)) {\n\t\t\t$map = $this->createTempFile($map);\n\t\t}\n\n\t\treturn $map;\n\t}", "public function can_export_from_array()\n {\n $response = $this->mockExportFromArray->store('from-array-store.xlsx');\n $this->assertTrue($response);\n }", "public function testReadFileUsesReadArray()\n\t{\n\t\t$config = $this->getMock('Phergie_Config', array('readArray'));\n\t\t$config\n\t\t\t->expects($this->once())\n\t\t\t->method('readArray')\n\t\t\t->with($this->equalTo(array('foo' => 'bar')))\n\t\t\t;\n\n $file = $this->createTempFile();\n file_put_contents($file, '<?php return array(\"foo\" => \"bar\");');\n\n $config->read($file);\n\t}", "public function testLoad()\n {\n $array = Fixtures::getSamplePhpArray();\n $this->assertSame($array, $this->arrayLoader->load($array));\n }", "public function testMergeDocumentPngMultiArray()\n {\n }", "public function testJSONFileNotFoundException()\n {\n $this->expectExceptionMessage(\"file_get_contents(\".$this->root.\"data/page_maps.json): failed to open stream: No such file or directory\");\n FileReader::readJSON($this->root.\"data/page_maps.json\",\"page\");\n }", "public function testInstantiationFailMapMustBeArray()\n {\n new CSV(array(\n 'map' => true,\n ));\n }", "public function testsUnparseableFileThrowsException() {\n $urls = static::$sitemapParser->parse('https://www.somesite.com/invalid.file.png');\n }", "public function testConstructFileStructure()\r\n {\r\n $file = $this->builder->constructFileStructure();\r\n\r\n $this->assertTrue( is_array( $file ) );\r\n }", "function testLoadFileWithDependancyMap() {\n\t\t$this->assertNoErrors();\n\t\t$this->ApiFile->classMap['MappedRandomFile'] = $this->_testAppPath . 'mapped_file.php';\n\t\t$this->ApiFile->classMap['SillyTestInterface'] = $this->_testAppPath . 'silly_interface_file.php';\n\t\t$this->ApiFile->loadFile($this->_testAppPath . 'test_file.php');\n\t}", "public function testArrayAccess()\n {\n $valueObject = new Memory\\Value('0123456789', new TestAsset\\DummyMovableContainer());\n $this->assertEquals($valueObject[8], '8');\n\n $valueObject[2] = '_';\n $this->assertEquals((string) $valueObject, '01_3456789');\n\n\n $error_level = error_reporting();\n error_reporting($error_level & ~E_NOTICE);\n $valueObject[10] = '_';\n $this->assertEquals((string) $valueObject, '01_3456789_');\n error_reporting($error_level);\n }", "function testBuildMapsicle() {\r\n $sqlmap =& MapsicleFactory::buildMapsicle('etc/mapsicle.xml');\r\n if (PEAR::isError($sqlmap)) {\r\n $this->fail($sqlmap->getMessage());\r\n }\r\n }", "function array2file($array, $filename) {\n\t$temp = '<?php\nclass ProcMap\n{\n private static $_procmap = '.var_export($array, TRUE).';\n\n public static function getProcAll()\n {\n return self::$_procmap;\n }\n\n public static function getProcFromSchema($schema_name)\n {\n return self::$_procmap[$schema_name];\n }\n\n}\n?>';\n\tfile_exists($filename) or touch($filename);\n\tfile_put_contents($filename, $temp);\n}", "public function findMap()\n {\n /*\n * only try to find a map in some directory tree for a resource type once per script exec\n */\n $alreadyTested = isset(self::$_testToMap[$this->_testFilesInPath][$this->_testClassNameEndPart]);\r\n if ($alreadyTested) {\n $oldMapClassNameEndPart = end(explode('\\\\', get_class(self::$_testToMap[$this->_testFilesInPath][$this->_testClassNameEndPart])));\n trigger_error(\"This $this->_testClassNameEndPart's test has already been done in {$this->_testFilesInPath}. It has been found out that the supported map is : $oldMapClassNameEndPart. Testing again.. but why?\", E_USER_NOTICE);\r\n }\n\n /*\n * Iterate through all files and try to map the structure to a map \n */\n require_once WPO_DIR . '/Map/Test/UserFilesIterator.php';\n $iterator = new \\WPO\\Map\\Test\\UserFilesIterator($this->_testFilesInPath,\n $this->getRegex());\n \r\n //iterate through all files, and find a map that matches all files\n foreach ($iterator as $file) {\n if (!$this->fileMatchesSomeMap($file)) {\n require_once WPO_DIR . '/Map/Test/Exception.php';\n throw new Exception(\n \"Your file structure does not fit any map. The file not matching the rest is: \" . $file->getPathname()\n );\n }\n //let subclasses do something with the files\n $this->_interceptFile($iterator, $file);\n }\n \n /*\n * Only continue if there is some map that has matched.\n * This test is needed cause dont want _announce... to\n * throw exception, we want to return bool on not found\n */\r\n if (!$this->hasMatchingMap()) {\n return false;\n }\n \n /*\n * Now the map doesn't know that there are no more files,\n * announce that, and see if it still wants to support the file\n * structure given that fact. (Some maps need a certain\n * amount of files, so they could match all the files in\n * a structure, but not support the structure in the end, \n * because theyv were written for a structure with more files...)\n * \n * Think of it as sets.. :/ we have checked if the structure\n * is a subset of the map's structure, and now we are checking\n * for equality\n */\n $this->_announceNoMoreFilesAndDropNotSupported();\n \n /*\n * The final check was made, did some map survive?\n */\n if (!$this->hasMatchingMap()) {\r\n return false;\r\n }\n \n /*\r\n * If some map survived, store it statically\r\n */\r\n self::$_testToMap[$this->_testFilesInPath][$this->_testClassNameEndPart] = $this->getMatchingMap();\n \n //in case it was already tested, did this test differ from the last?\n if ($alreadyTested) {\n $newMapClassNameEndPart = end(explode('\\\\', get_class(self::$_testToMap[$this->_testFilesInPath][$this->_testClassNameEndPart])));\n $difference = ($oldMapClassNameEndPart !== $newMapClassNameEndPart)? \"different : $newMapClassNameEndPart\" : 'the same';\n trigger_error(\"The map is $difference!\", E_USER_NOTICE);\n }\n return true;\n }", "public function testSettingNullOffset()\n {\n $this->expectException(InvalidArgumentException::class);\n $paths = new Paths([]);\n $paths[] = \"foo\";\n }", "public function test_findFile_returns_false_or_array_on_failure()\n {\n $this->assertFalse(Filesystem::findFile('configy', 'zebra'));\n\n $this->assertSame([], Filesystem::findFile('configy', 'zebra', null, true));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check register globals and remove them
function checkRegisterGlobals() { if (ini_get('register_globals')) { # $array = array('_SESSION', '_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES'); # foreach ($array as $value) { # foreach ($GLOBALS[$value] as $key => $var) { # if ($var === $GLOBALS[$key]) { # unset($GLOBALS[$key]); # } # } # } throw new SystemException("Register Globals must be turned off!!!"); } }
[ "function unregisterGlobals() \n\t{\n\t\tif (ini_get('register_globals')) \n\t\t{\n\t\t\t$array = array('_SESSION', '_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');\n\t\t\tforeach ($array as $value) \n\t\t\t{\n\t\t\t\tforeach ($GLOBALS[$value] as $key => $var) \n\t\t\t\t{\n\t\t\t\t\tif ($var === $GLOBALS[$key]) \n\t\t\t\t\t{\n\t\t\t\t\t\tunset($GLOBALS[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function unregisterGlobals() {\r\n /* if (ini_get('register_globals')) {\r\n $array = array('_SESSION', '_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');\r\n foreach ($array as $value) {\r\n foreach ($GLOBALS[$value] as $key => $var) {\r\n if ($var === $GLOBALS[$key]) {\r\n unset($GLOBALS[$key]);\r\n }\r\n }\r\n }\r\n } */\r\n}", "function unregisterGlobals() {\n if (ini_get('register_globals')) \n\t{\n $array = array('_SESSION', '_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');\n foreach ($array as $value) \n\t\t{\n foreach ($GLOBALS[$value] as $key => $var) \n\t\t\t{\n if ($var === $GLOBALS[$key]) \n\t\t\t\t{\n unset($GLOBALS[$key]);\n }\n }\n }\n }\n}", "function unregisterGlobals() {\n\t if (ini_get('register_globals')) {\n\t $array = array('_SESSION', '_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');\n\t foreach ($array as $value) {\n\t foreach ($GLOBALS[$value] as $key => $var) {\n\t if ($var === $GLOBALS[$key]) {\n\t unset($GLOBALS[$key]);\n\t }\n\t }\n\t }\n\t }\n\t}", "function unregister_globals()\n{\n\t$register_globals = @ini_get('register_globals');\n\tif ($register_globals === \"\" || $register_globals === \"0\" || strtolower($register_globals === \"off\"))\n\t\treturn;\n\n\t// Prevent script.php?GLOBALS[foo]=bar\n\tif (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']))\n\t\texit('I\\'ll have a steak sandwich and... a steak sandwich.');\n\t\n\t// Variables that shouldn't be unset\n\t$no_unset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');\n\n\t// Remove elements in $GLOBALS that are present in any of the superglobals\n\t$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());\n\tforeach ($input as $k => $v)\n\t{\n\t\tif (!in_array($k, $no_unset) && isset($GLOBALS[$k]))\n\t\t{\n\t\t\tunset($GLOBALS[$k]);\n\t\t\tunset($GLOBALS[$k]);\t// Double unset to circumvent the zend_hash_del_key_or_index hole in PHP <4.4.3 and <5.1.4\n\t\t}\n\t}\n}", "private function revert_register_globals()\n\t{\n\t\tif(isset($_REQUEST['GLOBALS']) OR isset($_FILES['GLOBALS']))\n\t\t{\n\t\t\texit(1); // Malicious attack detected, exit\n\t\t}\n\t\t\n\t\t$global_variables = array_diff(array_keys($GLOBALS), array(\n\t\t\t'_COOKIE',\n\t\t\t'_ENV',\n\t\t\t'_GET',\n\t\t\t'_FILES',\n\t\t\t'_POST',\n\t\t\t'_REQUEST',\n\t\t\t'_SERVER',\n\t\t\t'_SESSION',\n\t\t\t'GLOBALS',\n\t\t));\n\n\t\tforeach ($global_variables as $name)\n\t\t{\n\t\t\tunset($GLOBALS[$name]);\n\t\t}\n\t}", "function deregister_globals()\n\t{\n\t\t$not_unset = array(\n\t\t\t'GLOBALS' => true,\n\t\t\t'_GET' => true,\n\t\t\t'_POST' => true,\n\t\t\t'_COOKIE' => true,\n\t\t\t'_REQUEST' => true,\n\t\t\t'_SERVER' => true,\n\t\t\t'_SESSION' => true,\n\t\t\t'_ENV' => true,\n\t\t\t'_FILES' => true,\n\t\t);\n\n\t\t// Not only will array_merge and array_keys give a warning if\n\t\t// a parameter is not an array, array_merge will actually fail.\n\t\t// So we check if _SESSION has been initialised.\n\t\tif (!isset($_SESSION) || !is_array($_SESSION))\n\t\t{\n\t\t\t$_SESSION = array();\n\t\t}\n\n\t\t// Merge all into one extremely huge array; unset this later\n\t\t$input = array_merge(\n\t\t\tarray_keys($_GET),\n\t\t\tarray_keys($_POST),\n\t\t\tarray_keys($_COOKIE),\n\t\t\tarray_keys($_SERVER),\n\t\t\tarray_keys($_SESSION),\n\t\t\tarray_keys($_ENV),\n\t\t\tarray_keys($_FILES)\n\t\t);\n\n\t\tforeach ($input as $varname)\n\t\t{\n\t\t\tif (isset($not_unset[$varname]))\n\t\t\t{\n\t\t\t\t// Hacking attempt. No point in continuing unless it's a COOKIE\n\t\t\t\tif ($varname !== 'GLOBALS' || isset($_GET['GLOBALS']) || isset($_POST['GLOBALS']) || isset($_SERVER['GLOBALS']) || isset($_SESSION['GLOBALS']) || isset($_ENV['GLOBALS']) || isset($_FILES['GLOBALS']))\n\t\t\t\t{\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$cookie = &$_COOKIE;\n\t\t\t\t\twhile (isset($cookie['GLOBALS']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($cookie['GLOBALS'] as $registered_var => $value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!isset($not_unset[$registered_var]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tunset($GLOBALS[$registered_var]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$cookie = &$cookie['GLOBALS'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset($GLOBALS[$varname]);\n\t\t}\n\n\t\tunset($input);\n\t}", "function drupal_unset_globals() {\n if (ini_get('register_globals')) {\n $allowed = array('_ENV' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, '_REQUEST' => 1, 'access_check' => 1, 'GLOBALS' => 1);\n foreach ($GLOBALS as $key => $value) {\n if (!isset($allowed[$key])) {\n unset($GLOBALS[$key]);\n }\n }\n }\n}", "function disable_register_globals() {\n if (ini_get(\"register_globals\") === false) { // if register_globals is disabled in php.ini,\n return; // everything's fine :-)\n }\n \n $inputVars = array($_GET, $_POST, $_COOKIE);\n foreach($inputVars as $inputVar) {\n foreach($inputVar as $key => $value) {\n // check if var has been set as global and has the 'right' value\n if (isset($GLOBALS[$key]) && $GLOBALS[$key] == value) \n unset($GLOBALS[$key]); // ... then unset it!\n }\n }\n }", "function forum_unregister_globals()\n{\n\t$register_globals = ini_get('register_globals');\n\tif ($register_globals === '' || $register_globals === '0' || strtolower($register_globals) === 'off')\n\t\treturn;\n\n\t// Prevent script.php?GLOBALS[foo]=bar\n\tif (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']))\n\t\texit('I\\'ll have a steak sandwich and... a steak sandwich.');\n\n\t// Variables that shouldn't be unset\n\t$no_unset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');\n\n\t// Remove elements in $GLOBALS that are present in any of the superglobals\n\t$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());\n\tforeach ($input as $k => $v)\n\t{\n\t\tif (!in_array($k, $no_unset) && isset($GLOBALS[$k]))\n\t\t{\n\t\t\tunset($GLOBALS[$k]);\n\t\t\tunset($GLOBALS[$k]); // Double unset to circumvent the zend_hash_del_key_or_index hole in PHP <4.4.3 and <5.1.4\n\t\t}\n\t}\n}", "public function unsetReservedGlobalVariables() {}", "public static function unsetReservedGlobalVariables() {}", "public static function cleanGlobals()\n {\n $list = array(\n 'GLOBALS',\n '_POST',\n '_GET',\n '_COOKIE',\n '_REQUEST',\n '_SERVER',\n '_ENV',\n '_FILES',\n );\n \n // Create a list of all of the keys from the super-global values.\n // Use array_keys() here to preserve key integrity.\n $keys = array_merge(\n array_keys($_ENV),\n array_keys($_GET),\n array_keys($_POST),\n array_keys($_COOKIE),\n array_keys($_SERVER),\n array_keys($_FILES),\n // $_SESSION is null if you have not started the session yet.\n // This insures that a check is performed regardless.\n isset($_SESSION) && is_array($_SESSION) ? array_keys($_SESSION) : array()\n );\n \n // Unset the globals.\n foreach ($keys as $key) {\n if (isset($GLOBALS[$key]) && ! in_array($key, $list)) {\n unset($GLOBALS[$key]);\n }\n }\n }", "protected function clearGlobals()\n {\n if (false === config('app.globals',false))\n {\n $_SERVER = [];\n $_ENV = [];\n }\n }", "public static function unRegister();", "function clean_up_global_scope() {\n\t\tglobal $wp_customize;\n\t\t$wp_customize = null;\n\t\tparent::clean_up_global_scope();\n\t}", "public function tearDown() {\n\t\tforeach ($this->backupGlobalVariables as $key => $data) {\n\t\t\t$GLOBALS[$key] = $data;\n\t\t}\n\t\tunset($this->backupGlobalVariables);\n\t}", "protected function clearStubs(): void\n {\n self::$globals = [];\n }", "static public function cleanGlobals() {\n\t\tself::_unsetGlobals();\n\n\t\tself::_clean($_GET);\n\t\tself::_clean($_POST);\n\t\tself::_clean($_COOKIE);\n\t\tself::_clean($_REQUEST);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Form validation handler for access_admin_grants().
function access_admin_grants_validate($form, &$form_state) { // Error if there are no items to select. if (!is_array($form_state['values']['grants']) || !count(array_filter($form_state['values']['grants']))) { form_set_error('', t('No items selected.')); } }
[ "protected static function validateAdminPermissions()\n\t\t{\n\t\t\tif(!self::isAdminPermissions()){\n\t\t\t\techo \"access denied\";\n\t\t\t\treturn(false);\n\t\t\t}\t\t\t\n\t\t}", "protected function validate_access()\n {\n return true;\n }", "protected static function validateAdminPermissions(){\r\n\t\tif(!self::isAdminPermissions()){\r\n\t\t\techo \"access denied\";\r\n\t\t\treturn(false);\r\n\t\t}\n\t}", "function vsite_register_admin_form_validate(&$form, &$state) {\n $state['values'];\n if ((int) $state['values']['os_vsites_per_user'] < 0) {\n form_set_error('os_vsites_per_user', t('Vsites per user must be a positive integer. To restrict users from creating sites, please edit permissions instead.'));\n }\n\n if (!count(array_filter($state['values']['os_enabled_spaces_presets']))) {\n form_set_error('os_enabled_spaces_presets', t('At least one preset must be enabled.'));\n }\n}", "private function _adminPrivilegeValidation(){\n ($this->session->userdata('privilege') == $this->modules) ?\n\t\t\t: (redirect(base_url(), 'refresh'));\n\t}", "protected function validateAdminPermissions(){\r\n\t\t\t\r\n\t\t\tif(UniteFunctionsWPUC::isAdminPermissions() == false){\r\n\t\t\t\techo \"access denied, no admin permissions\";\r\n\t\t\t\treturn(false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "function validate_admin()\r\n\t{\r\n\t\tvalidate_session();\r\n\t\tif ( ! session_is_admin() )\r\n\t\t{\r\n\t\t\tsession_clear();\r\n\t\t\terror_redirect('/admin_home');\r\n\t\t}\r\n\t}", "public function validateAdministrator(){\n \treturn true;\n }", "public function admin_required () {\n\t\tif (!$this->is_loggedin() || !$this->is_admin()) {\n\t\t\tflash_error('Access denied');\n\t\t\tredirect();\n\t\t}\t\n }", "function user_profile_form_admin_validation(&$form, &$form_state) {\n // Form validation here\n}", "function taxonomy_access_admin_build_row(array $grants, $label_key = NULL, $delete = FALSE) {\n $form['#tree'] = TRUE;\n if ($delete) {\n $form['remove'] = array(\n '#type' => 'checkbox',\n '#title' => t('Delete access rule for @name', array('@name' => $grants[$label_key])),\n '#title_display' => 'invisible',\n );\n }\n if ($label_key) {\n $form[$label_key] = array(\n '#type' => 'markup',\n '#markup' => \\Drupal\\Component\\Utility\\Html::escape($grants[$label_key]),\n );\n }\n foreach (array('view', 'update', 'delete', 'create', 'list') as $grant) {\n $for = $label_key ? $grants[$label_key] : NULL;\n $form[$grant] = array(\n '#type' => 'select',\n '#title' => _taxonomy_access_grant_field_label($grant, $for),\n '#title_display' => 'invisible',\n '#default_value' => is_string($grants['grant_' . $grant]) ? $grants['grant_' . $grant] : TAXONOMY_ACCESS_NODE_IGNORE,\n '#required' => TRUE,\n );\n }\n foreach (array('view', 'update', 'delete') as $grant) {\n $form[$grant]['#options'] = array(\n TAXONOMY_ACCESS_NODE_ALLOW => t('Allow'),\n TAXONOMY_ACCESS_NODE_IGNORE => t('Ignore'),\n TAXONOMY_ACCESS_NODE_DENY => t('Deny'),\n );\n }\n foreach (array('create', 'list') as $grant) {\n $form[$grant]['#options'] = array(\n TAXONOMY_ACCESS_TERM_ALLOW => t('Allow'),\n TAXONOMY_ACCESS_TERM_DENY => t('Deny'),\n );\n }\n return $form;\n}", "function options_validate(&$form, &$form_state) {\n if (!array_filter($form_state['values']['access_options']['restrictions'])) {\n form_error($form['restrictions'], t('You must select at least one restriction if type is \"by restriction\"'));\n }\n }", "public function checkPermission()\n {\n $this->import('BackendUser', 'User');\n\n $arrFields = array_keys($GLOBALS['TL_DCA']['tl_formdata']['fields']);\n // check/set restrictions\n foreach ($arrFields as $strField) {\n if (!empty($GLOBALS['TL_DCA']['tl_formdata']['fields'][$strField]['exclude']) && $GLOBALS['TL_DCA']['tl_formdata']['fields'][$strField]['exclude'] == true) {\n if ($this->User->isAdmin || $this->User->hasAccess('tl_formdata::' . $strField, 'alexf') == true) {\n $GLOBALS['TL_DCA']['tl_formdata']['fields'][$strField]['exclude'] = false;\n }\n }\n }\n }", "private function checkAdmin()\n\t{\t\n\t\t$adminOnly = property_exists($this, 'adminOnly') ? $this->adminOnly : false;\n\t\tif ($adminOnly) \n\t\t{\n\t\t\t$this->checkLogin(true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->checkPermission();\n\t\t}\n\t}", "function verify_access_fill(){\n\t\t$b1 = FALSE;\n\t\t$b2 = FALSE;\n\t\tif(isset($_GET[\"form_id\"])){\n\t\t\t$form_id = $_GET[\"form_id\"];\n\t\t}\n\t\tif(isset($_GET[\"ans_id\"])){\n\t\t\t$ans = new Answer($_GET[\"ans_id\"]);\n\t\t\t$form_id = $ans->getFormId();\n\t\t}\n\t\t$form = new Form($form_id);\n\t\tif($form->getAnonymous()){ // Anonymous allowed if anonymous form\n\t\t\treturn;\n\t }\n\t \n\t //Si l'utilisateur est anonyme et formulaire non anonyme\n\t if ($_SESSION[\"user_id\"] == 0) {\n\t header(\"Location: include/logout.php\" );\n\t return;\n\t }\n\t \n\t\t$user = new User($_SESSION[\"user_id\"]);\n\t\t$forms = $user->getDestinatairesForms(); // Returns validated (creation) forms\n\t\tforeach ($forms as $f) {\n\t\t\tif($f->getId() == $form_id){\n\t\t\t\t$b1 = TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$b1 ? TRUE : header(\"Location: error.php?e=4\" );\n\n\t\tif(isset($_GET[\"form_id\"])){\n\t\t\t$max = $form->getMaxAnswers();\n\t\t\tif($max == 0) // b2 should be TRUE -> 0 - (-1) > 0\n\t\t\t\t$current = -1;\n\t\t\telse\n\t\t\t\t$current = count($form->getListRecipient([$_SESSION[\"user_id\"]]));\n\t\t\t$b2 = $max - $current > 0;\n\t\t\t$b2 ? TRUE : header(\"Location: error.php?e=5\" );\n\t\t}\n\t}", "public function checkAdminPagePermission()\n {\n if (!SUPER_USER) {\n exit(\"Only super users can access this page!\");\n } elseif (!Csrf::isValidRequest()) {\n exit(\n \"Access not allowed. Your session may have expired.\"\n .\" Please make sure you are logged in and try again.\"\n );\n }\n }", "public function checkPermission()\r\r\n\t{\r\r\n\t\t$this->import('BackendUser', 'User');\r\r\n\r\r\n\t\tif ($this->User->isAdmin)\r\r\n\t\t{\r\r\n\t\t\treturn;\r\r\n\t\t}\r\r\n\r\r\n\t\t// Set root IDs\r\r\n\t\tif (!is_array($this->User->forms) || count($this->User->forms) < 1)\r\r\n\t\t{\r\r\n\t\t\t$root = array(0);\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$root = $this->User->forms;\r\r\n\t\t}\r\r\n\r\r\n\t\t$GLOBALS['TL_DCA']['tl_form']['config']['closed'] = true;\r\r\n\t\t$GLOBALS['TL_DCA']['tl_form']['list']['sorting']['root'] = $root;\r\r\n\r\r\n\t\t// Check current action\r\r\n\t\tswitch ($this->Input->get('act'))\r\r\n\t\t{\r\r\n\t\t\tcase 'select':\r\r\n\t\t\t\t// Allow\r\r\n\t\t\t\tbreak;\r\r\n\r\r\n\t\t\tcase 'edit':\r\r\n\t\t\tcase 'show':\r\r\n\t\t\t\tif (!in_array($this->Input->get('id'), $root))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->log('Not enough permissions to '.$this->Input->get('act').' form ID \"'.$this->Input->get('id').'\"', 'tl_form checkPermission', 5);\r\r\n\t\t\t\t\t$this->redirect('typolight/main.php?act=error');\r\r\n\t\t\t\t}\r\r\n\t\t\t\tbreak;\r\r\n\r\r\n\t\t\tcase 'editAll':\r\r\n\t\t\t\t$session = $this->Session->getData();\r\r\n\t\t\t\t$session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $root);\r\r\n\t\t\t\t$this->Session->setData($session);\r\r\n\t\t\t\tbreak;\r\r\n\r\r\n\t\t\tdefault:\r\r\n\t\t\t\tif (strlen($this->Input->get('act')))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->log('Not enough permissions to '.$this->Input->get('act').' forms', 'tl_form checkPermission', 5);\r\r\n\t\t\t\t\t$this->redirect('typolight/main.php?act=error');\r\r\n\t\t\t\t}\r\r\n\t\t\t\tbreak;\r\r\n\t\t}\r\r\n\t}", "private function validarPermisos(){\n if(!Sistema::app()->acceso()->puedeConfigurar()){\n Sistema::app()->paginaError(404,\"Solo los administradores pueden acceder\");\n exit;\n }\n \n \n \n }", "public function checkPermission()\r\r\n\t{\r\r\n\t\t$this->import('BackendUser', 'User');\r\r\n\r\r\n\t\tif ($this->User->isAdmin)\r\r\n\t\t{\r\r\n\t\t\treturn;\r\r\n\t\t}\r\r\n\r\r\n\t\t// Set root IDs\r\r\n\t\tif (!is_array($this->User->forms) || count($this->User->forms) < 1)\r\r\n\t\t{\r\r\n\t\t\t$root = array(0);\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$root = $this->User->forms;\r\r\n\t\t}\r\r\n\r\r\n\t\t$id = strlen($this->Input->get('id')) ? $this->Input->get('id') : CURRENT_ID;\r\r\n\r\r\n\t\t// Check current action\r\r\n\t\tswitch ($this->Input->get('act'))\r\r\n\t\t{\r\r\n\t\t\tcase 'select':\r\r\n\t\t\tcase 'paste':\r\r\n\t\t\t\t// Allow\r\r\n\t\t\t\tbreak;\r\r\n\r\r\n\t\t\tcase 'edit':\r\r\n\t\t\tcase 'show':\r\r\n\t\t\tcase 'create':\r\r\n\t\t\tcase 'copy':\r\r\n\t\t\tcase 'cut':\r\r\n\t\t\tcase 'delete':\r\r\n\t\t\t\t$objArchive = $this->Database->prepare(\"SELECT pid FROM tl_form_field WHERE id=?\")\r\r\n\t\t\t\t\t\t\t\t\t\t\t ->limit(1)\r\r\n\t\t\t\t\t\t\t\t\t\t\t ->execute($id);\r\r\n\r\r\n\t\t\t\tif ($objArchive->numRows < 1)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->log('Invalid form field ID \"'.$id.'\"', 'tl_form_field checkPermission', 5);\r\r\n\t\t\t\t\t$this->redirect('typolight/main.php?act=error');\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\tif (!in_array($objArchive->pid, $root))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->log('Not enough permissions to '.$this->Input->get('act').' form field ID \"'.$id.'\" of form ID \"'.$objArchive->pid.'\"', 'tl_form_field checkPermission', 5);\r\r\n\t\t\t\t\t$this->redirect('typolight/main.php?act=error');\r\r\n\t\t\t\t}\r\r\n\t\t\t\tbreak;\r\r\n\r\r\n\t\t\tcase 'editAll':\r\r\n\t\t\tcase 'deleteAll':\r\r\n\t\t\t\tif (!in_array($id, $root))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->log('Not enough permissions to access form ID \"'.$id.'\"', 'tl_form_field checkPermission', 5);\r\r\n\t\t\t\t\t$this->redirect('typolight/main.php?act=error');\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t$objArchive = $this->Database->prepare(\"SELECT id FROM tl_form_field WHERE pid=?\")\r\r\n\t\t\t\t\t\t\t\t\t\t\t ->execute($id);\r\r\n\r\r\n\t\t\t\tif ($objArchive->numRows < 1)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->log('Invalid form ID \"'.$id.'\"', 'tl_form_field checkPermission', 5);\r\r\n\t\t\t\t\t$this->redirect('typolight/main.php?act=error');\r\r\n\t\t\t\t}\r\r\n\r\r\n\t\t\t\t$session = $this->Session->getData();\r\r\n\t\t\t\t$session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objArchive->fetchEach('id'));\r\r\n\t\t\t\t$this->Session->setData($session);\r\r\n\t\t\t\tbreak;\r\r\n\r\r\n\t\t\tdefault:\r\r\n\t\t\t\tif (strlen($this->Input->get('act')))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->log('Invalid command \"'.$this->Input->get('act').'\"', 'tl_form_field checkPermission', 5);\r\r\n\t\t\t\t\t$this->redirect('typolight/main.php?act=error');\r\r\n\t\t\t\t}\r\r\n\t\t\t\telseif (!in_array($id, $root))\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->log('Not enough permissions to access form ID \"'.$id.'\"', 'tl_form_field checkPermission', 5);\r\r\n\t\t\t\t\t$this->redirect('typolight/main.php?act=error');\r\r\n\t\t\t\t}\r\r\n\t\t\t\tbreak;\r\r\n\t\t}\r\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the current cursor position by sending ANSI control code SCP to the terminal. Position can then be restored with [[restoreCursorPosition()]].
public static function savePosition() { echo self::ESC . "s"; }
[ "public static function savepos() {\n\t\tfwrite(self::$stream, \"\\033[s\");\n\t}", "public static function savePosition()\n {\n return self::command(Sequence::CURSOR_SAVE_POSITION);\n }", "public static function restoreCursorPosition()\n {\n echo \"\\033[u\";\n }", "public function cursorCommand()\n {\n $this->write('hello, this in ' . __METHOD__);\n\n // $this->output->panel($_SERVER, 'Server information', '');\n\n $this->write('this is a message text.', false);\n\n sleep(1);\n AnsiCode::make()->cursor(AnsiCode::CURSOR_BACKWARD, 6);\n\n sleep(1);\n AnsiCode::make()->cursor(AnsiCode::CURSOR_FORWARD, 3);\n\n sleep(1);\n AnsiCode::make()->cursor(AnsiCode::CURSOR_BACKWARD, 2);\n\n sleep(2);\n\n AnsiCode::make()->screen(AnsiCode::CLEAR_LINE, 3);\n\n $this->write('after 2s scroll down 3 row.');\n\n sleep(2);\n\n AnsiCode::make()->screen(AnsiCode::SCROLL_DOWN, 3);\n\n $this->write('after 3s clear screen.');\n\n sleep(3);\n\n AnsiCode::make()->screen(AnsiCode::CLEAR);\n }", "function save()\n {\n // we must reset the color cache or it will keep bad colors after clipping\n $this->currentColor = null;\n $this->currentStrokeColor = null;\n $this->addContent(\"\\nq\");\n }", "public function cursorCommand()\n {\n $this->write('hello, this in ' . __METHOD__);\n $this->write('this is a message text.', false);\n\n sleep(1);\n Terminal::make()->cursor(Terminal::CURSOR_BACKWARD, 6);\n\n sleep(1);\n Terminal::make()->cursor(Terminal::CURSOR_FORWARD, 3);\n\n sleep(1);\n Terminal::make()->cursor(Terminal::CURSOR_BACKWARD, 2);\n\n sleep(2);\n\n Terminal::make()->screen(Terminal::CLEAR_LINE, 3);\n\n $this->write('after 2s scroll down 3 row.');\n\n sleep(2);\n\n Terminal::make()->screen(Terminal::SCROLL_DOWN, 3);\n\n $this->write('after 3s clear screen.');\n\n sleep(3);\n\n Terminal::make()->screen(Terminal::CLEAR);\n }", "public static function clearScreenAfterCursor()\n {\n echo \"\\033[0J\";\n }", "public function clearScreenAfterCursor()\n\t{\n\t\techo \"\\033[0J\";\n\t}", "public static function restorePosition()\n {\n return self::command(Sequence::CURSOR_RESTORE_POSITION);\n }", "private function setCursor()\n {\n $this->tcpdf->SetXY(\n self::CURSOR_X,\n self::CURSOR_Y\n );\n }", "private function moveCursorToTop()\n {\n $this->getOutput()->write(\"\\x1B[H\");\n }", "public static function clearBeforeCursor() {\n echo static::ESC . \"1J\";\n }", "function saveClipboard()\t{\n\t\tglobal $BE_USER;\n\t\t$BE_USER->pushModuleData($this->module,$this->clipData);\n\t}", "public function restoreTerminal()\n\t{\n\t\tsystem(\"stty '\" . trim($this->_tty_saved) . \"'\");\n\t}", "private function resetCursorPosition(): void\n {\n $lines = count(explode(PHP_EOL, $this->prevFrame)) - 1;\n\n $this->moveCursor(-999, $lines * -1);\n }", "public function clearLineAfterCursor()\n\t{\n\t\techo \"\\033[0K\";\n\t}", "public static function clearLineAfterCursor()\n {\n echo \"\\033[0K\";\n }", "public static function clearScreenBeforeCursor()\n\t{\n\t\techo \"\\033[1J\";\n\t}", "function ncurses_flushinp() {}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the access page: login, signup, forgot login, and links to resend verification
public function showAccess() { /** * Is member already logged in and logged in correctly by type */ $authCheck = $this->authCheckOnCustomerAccess(); if(FALSE != $authCheck){return Redirect::route($authCheck['name']);} $activity = ( isset($this->activity) ? $this->activity : 'login'); $reason = ( isset($this->reason) ? $this->reason : ''); /** * 3 Access Forms */ $LoginFormMessages = ''; $SignupFormMessages = ''; $ForgotFormMessages = ''; $LoginAttemptMessages = ''; if($activity == 'login') { switch($reason) { case 'expired-session' : $LoginHeaderMessage = 1; break; case 'intentional-logout' : $LoginHeaderMessage = 2; break; case 'changed-password' : $LoginHeaderMessage = 3; break; default : $LoginHeaderMessage = 0; } } else { $LoginHeaderMessage = ''; } $viewData = array ( 'activity' => (isset($activeForm) ? $activeForm : $activity), 'LoginFormMessages' => $LoginFormMessages, 'LoginAttemptMessages' => $LoginAttemptMessages, 'SignupFormMessages' => $SignupFormMessages, 'ForgotFormMessages' => $ForgotFormMessages, 'LoginHeaderMessage' => $LoginHeaderMessage ); return $this->makeResponseView('application/auth/login', $viewData); }
[ "public function loginPage() \n {\n $pageTitle = \"Login Admin\";\n \\Renderer::render('admin/login', array('errorLogin' => ''));\n }", "public function passwordRecoveryPageAction()\n {\n if ($_SESSION[\"loginStatus\"] == Controller::GUEST) {\n $view = new View('passwordRecoveryPage');\n echo $view->render();\n } elseif ($_SESSION[\"loginStatus\"] == Controller::CANDIDATE) {\n $this->redirect('candidateHomePage');\n } elseif ($_SESSION[\"loginStatus\"] == Controller::EMPLOYER) {\n $this->redirect('employerHomePage');\n }\n }", "public function loadLogin(){\n\t\techo \"<h1>Login</h1>\";\n\t\techo \"<form method='get' action='index.php'>\";\n\t\techo \"<p>Login: <input type='text' name='login' /></p>\";\n\t\techo \"<p>Password: <input type='password' name='pwd'></p>\";\n\t\techo \"<input type='reset' value='Clear' />\";\n\t\techo \"<input type='submit' value='Submit' />\";\n\t\techo \"<input type='hidden' value='userAccount' name='userRequest' />\";\n\t\techo \"</form>\";\n\t\techo \"<p><a href='index.php?userRequest=userRegister'>Register for a new Account!</a></p>\";\n\t}", "function show_login_control_panel()\n\t{\n\t\t$this->secure_hash();\n\t\t\n\t\t$r = $this->html_header()\n\t\t.$this->simple_header()\n\t\t.$this->body\n\t\t.$this->copyright()\n\t\t.$this->html_footer();\n\t\n\t\t$this->EE->output->set_output($r);\n\t}", "public function showRegistrationForm()\n {\n if (!empty($_SESSION['LoginStatus']))\n header('Location: /account');\n else\n View::renderTemplate('register.html');\n }", "private function displayPages () : void {\n if ($this->authSession->hasLoggedInSession()) {\n $this->loginController->displayAuthenticated();\n \n } elseif ($this->layoutView->isRequestingRegisterForm()) {\n $this->registerController->displayRegisterForm();\n\n } else {\n $this->loginController->displayLoginForm();\n }\n }", "public function loginAction() {\n // Do not cache login page\n $this->_helper->cache->setNoCacheHeaders($this->getResponse());\n\n $this->view->title = __('login page title');\n $this->view->description = __('login page description');\n\n // allow callers to set a targetUrl via the request\n if ($targetUrl = $this->_getSubmittedTargetUrl()) {\n Garp_Auth::getInstance()->getStore()->targetUrl = $targetUrl;\n }\n\n $authVars = Garp_Auth::getInstance()->getConfigValues();\n // self::processAction might have populated 'errors' and/or 'postData'\n if ($this->getRequest()->getParam('errors')) {\n $this->view->errors = $this->getRequest()->getParam('errors');\n }\n if ($this->getRequest()->getParam('postData')) {\n $this->view->postData = $this->getRequest()->getParam('postData');\n }\n }", "public function landing()\n {\n require_once'model/validation.php';\n $this->_f3->set('cssLink', 'landing.css');\n $this->_f3->set('valid', 'validateLogin.js');\n $this->_f3->set('formLink', '//cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.1/css/material.min.css');\n echo Template::instance()->render('view/login/landing.php');\n }", "function view()\n{\n\tstartOfPage();\n\tusers_renderLoginForm();\n\th1(\"Course Enrolled Successfully!\");\n}", "public function login(){\r\n\t\t$returnTo = $this->input->get('returnTo');\r\n\t\t$re = !$returnTo ? site_url() . \"/page/overview\" : $returnTo;\r\n\r\n\t\t//SSO starts here\r\n\r\n\t\t$this->auth->login($re);\r\n\t}", "public function adminLoginForm()\r\n {\r\n print file_get_contents(_HTML_TEMPLATE_FOLDER_.'loginForm_Admin.html');\r\n }", "public function showLoginForm()\n {\n $this->setContent('auth.login');\n }", "public function login() {\n\t\tif (!$this -> session -> userdata('email')) {\n\t\t\t$this -> load -> view('get_started_view');\n\t\t} else {\n\t\t\t$this -> load -> view('report_news_view');\n\t\t}\n\t}", "public function connectPage() //Redirection page connexion\n {\n require('Views/Frontend/authView.php');\n }", "public function index() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n redirect(ADMIN_ENC_URL.'/rides/display_rides');\n }\n }", "function print_logon_box()\n{\n\tglobal $ssp;\n\tglobal $QUERY_STRING;\n\n\t$target_url = this_page();\n\n\tif (isset($QUERY_STRING))\n\t{\n\t\t$target_url = $target_url . \"?\" . $QUERY_STRING;\n\t}\n\n\t$user=getUserName();\n\n\tif ($ssp->isAuthenticated())\n\t{\n\t\tprint_report_link(isset($user) ? $user : '-invalid-');\n\t\tprint_saml_logoff_button('/'.$target_url);\n\t}\n\telse\n\t{\n\t\tprint_unknown_user();\n\t\tprint_saml_logon_button('/'.$target_url);\n\t}\n\n\tprint_userlist_link();\n}", "protected function _access()\r\n\t{\r\n\t\tif(!$this->hasAccess())\r\n\t\t{\r\n\t\t\t/**\r\n\t\t\t * If User has Auth\r\n\t\t\t */\r\n\t\t\tif(zbase_auth_has())\r\n\t\t\t{\r\n\t\t\t\t$redirectToRoute = $this->_v('access.noaccess.route', null);\r\n\t\t\t\t$message = $this->_v('access.noaccess.message', null);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$redirectToRoute = $this->_v('access.noauth.route', null);\r\n\t\t\t\t$message = $this->_v('access.noauth.message', null);\r\n\t\t\t}\r\n\t\t\tif(!empty($message))\r\n\t\t\t{\r\n\t\t\t\t$this->_viewParams['message'] = $message;\r\n\t\t\t}\r\n\t\t\tif(!empty($redirectToRoute))\r\n\t\t\t{\r\n\t\t\t\t$this->setViewFile('ui.auth');\r\n\t\t\t\treturn;\r\n\t\t\t\t// return redirect()->to(zbase_url_from_route($redirectToRoute));\r\n\t\t\t}\r\n\t\t\tif(!empty($message))\r\n\t\t\t{\r\n\t\t\t\t$this->setViewFile('ui.message.access');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t$this->setViewFile(null);\r\n\t\t}\r\n\t}", "public function userLoginDisplay(){\r\n \t \t$this->display();\r\n \t }", "public function show_login()\n\t{\n\t\treturn url::redirect(Kohana::config('routes.log_in_form'));\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation deleteAuditEntriesForAuditAppWithHttpInfo Permanently delete audit entries for an audit application
public function deleteAuditEntriesForAuditAppWithHttpInfo($audit_application_id, $where) { // verify the required parameter 'audit_application_id' is set if ($audit_application_id === null) { throw new \InvalidArgumentException('Missing the required parameter $audit_application_id when calling deleteAuditEntriesForAuditApp'); } // verify the required parameter 'where' is set if ($where === null) { throw new \InvalidArgumentException('Missing the required parameter $where when calling deleteAuditEntriesForAuditApp'); } // parse inputs $resourcePath = "/audit-applications/{auditApplicationId}/audit-entries"; $httpBody = ''; $queryParams = []; $headerParams = []; $formParams = []; $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); if (!is_null($_header_accept)) { $headerParams['Accept'] = $_header_accept; } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params if ($where !== null) { $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where); } // path params if ($audit_application_id !== null) { $resourcePath = str_replace( "{" . "auditApplicationId" . "}", $this->apiClient->getSerializer()->toPathValue($audit_application_id), $resourcePath ); } // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } // this endpoint requires HTTP basic authentication if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, 'DELETE', $queryParams, $httpBody, $headerParams, null, '/audit-applications/{auditApplicationId}/audit-entries' ); return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { default: $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Alfresco\Model\Error', $e->getResponseHeaders()); $e->setResponseObject($data); break; } throw $e; } }
[ "public function listAuditEntriesForAuditAppWithHttpInfo($audit_application_id, $skip_count = '0', $order_by = null, $max_items = '100', $where = null, $include = null, $fields = null)\n {\n // verify the required parameter 'audit_application_id' is set\n if ($audit_application_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $audit_application_id when calling listAuditEntriesForAuditApp');\n }\n if (!is_null($skip_count) && ($skip_count < 0)) {\n throw new \\InvalidArgumentException('invalid value for \"$skip_count\" when calling AuditApi.listAuditEntriesForAuditApp, must be bigger than or equal to 0.');\n }\n\n if (!is_null($max_items) && ($max_items < 1)) {\n throw new \\InvalidArgumentException('invalid value for \"$max_items\" when calling AuditApi.listAuditEntriesForAuditApp, must be bigger than or equal to 1.');\n }\n\n // parse inputs\n $resourcePath = \"/audit-applications/{auditApplicationId}/audit-entries\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // query params\n if ($skip_count !== null) {\n $queryParams['skipCount'] = $this->apiClient->getSerializer()->toQueryValue($skip_count);\n }\n // query params\n if (is_array($order_by)) {\n $order_by = $this->apiClient->getSerializer()->serializeCollection($order_by, 'csv', true);\n }\n if ($order_by !== null) {\n $queryParams['orderBy'] = $this->apiClient->getSerializer()->toQueryValue($order_by);\n }\n // query params\n if ($max_items !== null) {\n $queryParams['maxItems'] = $this->apiClient->getSerializer()->toQueryValue($max_items);\n }\n // query params\n if ($where !== null) {\n $queryParams['where'] = $this->apiClient->getSerializer()->toQueryValue($where);\n }\n // query params\n if (is_array($include)) {\n $include = $this->apiClient->getSerializer()->serializeCollection($include, 'csv', true);\n }\n if ($include !== null) {\n $queryParams['include'] = $this->apiClient->getSerializer()->toQueryValue($include);\n }\n // query params\n if (is_array($fields)) {\n $fields = $this->apiClient->getSerializer()->serializeCollection($fields, 'csv', true);\n }\n if ($fields !== null) {\n $queryParams['fields'] = $this->apiClient->getSerializer()->toQueryValue($fields);\n }\n // path params\n if ($audit_application_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"auditApplicationId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($audit_application_id),\n $resourcePath\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires HTTP basic authentication\n if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {\n $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . \":\" . $this->apiClient->getConfig()->getPassword());\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Alfresco\\Model\\AuditEntryPaging',\n '/audit-applications/{auditApplicationId}/audit-entries'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Alfresco\\Model\\AuditEntryPaging', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Alfresco\\Model\\AuditEntryPaging', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n default:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Alfresco\\Model\\Error', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function deleteAuditEntryWithHttpInfo($audit_application_id, $audit_entry_id)\n {\n // verify the required parameter 'audit_application_id' is set\n if ($audit_application_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $audit_application_id when calling deleteAuditEntry');\n }\n // verify the required parameter 'audit_entry_id' is set\n if ($audit_entry_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $audit_entry_id when calling deleteAuditEntry');\n }\n // parse inputs\n $resourcePath = \"/audit-applications/{auditApplicationId}/audit-entries/{auditEntryId}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // path params\n if ($audit_application_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"auditApplicationId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($audit_application_id),\n $resourcePath\n );\n }\n // path params\n if ($audit_entry_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"auditEntryId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($audit_entry_id),\n $resourcePath\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires HTTP basic authentication\n if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {\n $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . \":\" . $this->apiClient->getConfig()->getPassword());\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/audit-applications/{auditApplicationId}/audit-entries/{auditEntryId}'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n default:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Alfresco\\Model\\Error', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function deleteRequestLogsWithHttpInfo()\n {\n \n \n // parse inputs\n $resourcePath = \"/v2/diagnostics/request_logs\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n \n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 400:\n $data = \\DocuSign\\eSign\\ObjectSerializer::deserialize($e->getResponseBody(), '\\DocuSign\\eSign\\Model\\ErrorDetails', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n }", "public function removeAuditItem(Audit $auditItem);", "public function deleteDatatableEntries1WithHttpInfo($datatable, $apptableId)\n {\n $returnType = '\\Frengky\\Fineract\\Model\\DeleteDataTablesDatatableAppTableIdResponse';\n $request = $this->deleteDatatableEntries1Request($datatable, $apptableId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Frengky\\Fineract\\Model\\DeleteDataTablesDatatableAppTableIdResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function removeEntriesFromAclWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->aclEntries)) {\n $query['AclEntries'] = $request->aclEntries;\n }\n if (!Utils::isUnset($request->aclId)) {\n $query['AclId'] = $request->aclId;\n }\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->dryRun)) {\n $query['DryRun'] = $request->dryRun;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'RemoveEntriesFromAcl',\n 'version' => '2019-11-20',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return RemoveEntriesFromAclResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "public function deleteDatatableEntriesAsyncWithHttpInfo($datatable, $apptableId, $datatableId)\n {\n $returnType = '\\Frengky\\Fineract\\Model\\DeleteDataTablesDatatableAppTableIdDatatableIdResponse';\n $request = $this->deleteDatatableEntriesRequest($datatable, $apptableId, $datatableId);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function deleteDatatableEntriesWithHttpInfo($datatable, $apptableId, $datatableId)\n {\n $returnType = '\\Frengky\\Fineract\\Model\\DeleteDataTablesDatatableAppTableIdDatatableIdResponse';\n $request = $this->deleteDatatableEntriesRequest($datatable, $apptableId, $datatableId);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Frengky\\Fineract\\Model\\DeleteDataTablesDatatableAppTableIdDatatableIdResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function massDestroy(Request $request)\n {\n if (! Gate::allows('appointment_log_delete')) {\n return abort(401);\n }\n if ($request->input('ids')) {\n $entries = AppointmentLog::whereIn('id', $request->input('ids'))->get();\n\n foreach ($entries as $entry) {\n $entry->delete();\n }\n }\n }", "public function deleteRouteEntriesWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->routeEntries)) {\n $query['RouteEntries'] = $request->routeEntries;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteRouteEntries',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteRouteEntriesResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "public function listAuditApps($skip_count = '0', $max_items = '100', $fields = null)\n {\n list($response) = $this->listAuditAppsWithHttpInfo($skip_count, $max_items, $fields);\n return $response;\n }", "public function delete($params) {\n if (!isset($params['userId'])) throw new osapiException(\"Invalid or no userId specified for osapiAppData->delete\");\n if (!isset($params['groupId'])) throw new osapiException(\"Invalid or no groupId specified for osapiAppData->delete\");\n if (!isset($params['appId'])) throw new osapiException(\"Invalid or no appId specified for osapiAppData->delete\");\n if (isset($params['fields'])) {\n if (!is_array($params['fields'])) throw new osapiException(\"Optional param 'fields' should be an array in osapiAppData->delete\");\n foreach ($params['fields'] as $key) {\n if (!self::isValidKey($key)) {\n throw new osapiException(\"Invalid key specified in osapiAppData->delete: $key\");\n }\n }\n }\n return osapiRequest::createRequest('appdata.delete', $params);\n }", "public function actionTruncate()\n {\n try\n {\n TargetInstanceAudit::deleteAll();\n Yii::$app->session->setFlash('success', Yii::t('app',\"All audit records have been deleted.\"));\n }\n catch(\\Exception $e)\n {\n Yii::$app->session->setFlash('error', Yii::t('app',\"Failed to delete audit records. <b>{exception}</b>\",['exception'=>Html::encode($e->getMessage())]));\n }\n return $this->redirect(['index']);\n }", "public function truncate()\n {\n if ($this->maxAge === null)\n return;\n\n $entry = models\\AuditEntry::tableName();\n $errors = models\\AuditError::tableName();\n $data = models\\AuditData::tableName();\n $javascript = models\\AuditJavascript::tableName();\n\n $threshold = time() - ($this->maxAge * 86400);\n\n models\\AuditEntry::getDb()->createCommand(<<<SQL\nDELETE FROM $entry, $errors, $data, $javascript USING $entry\n INNER JOIN $errors ON $errors.audit_id = $entry.id\n INNER JOIN $data ON $data.audit_id = $entry.id\n INNER JOIN $javascript ON $javascript.audit_id = $entry.id\n WHERE $entry.created < FROM_UNIXTIME($threshold)\nSQL\n )->execute();\n }", "public function retrieveAuditEntriesAsyncWithHttpInfo($actionName = null, $entityName = null, $resourceId = null, $makerId = null, $makerDateTimeFrom = null, $makerDateTimeTo = null, $checkerId = null, $checkerDateTimeFrom = null, $checkerDateTimeTo = null, $processingResult = null, $officeId = null, $groupId = null, $clientId = null, $loanid = null, $savingsAccountId = null, $paged = null, $offset = null, $limit = null, $orderBy = null, $sortOrder = null)\n {\n $returnType = '\\Frengky\\Fineract\\Model\\GetMakerCheckerResponse[]';\n $request = $this->retrieveAuditEntriesRequest($actionName, $entityName, $resourceId, $makerId, $makerDateTimeFrom, $makerDateTimeTo, $checkerId, $checkerDateTimeFrom, $checkerDateTimeTo, $processingResult, $officeId, $groupId, $clientId, $loanid, $savingsAccountId, $paged, $offset, $limit, $orderBy, $sortOrder);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public static function deleteAuditFields($id_metaData)\n {\n\n\t}", "public function deleteEntry(RequestContext $request);", "public function deleteAll($appId, array $queryParams = [])\n {\n $response = $this->api->applications()->artifacts()->deleteAll($appId, $queryParams);\n\n return new BaseResponse($response);\n }", "public function delete($employee)\n {\n $employee->timeoff()->whereIn('id', (array) (request('entry')['id']))->delete();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Directory Definition Files Recursively scans a given template directory. Returns an array of JSON definition files with path relative to $dirPath
protected function getDirectoryDefinitionFiles($dirPath): array { $files = []; $dirPathLength = mb_strlen($dirPath); $directories = new RecursiveDirectoryIterator($dirPath, RecursiveDirectoryIterator::SKIP_DOTS); $filter = new RecursiveCallbackFilterIterator($directories, function ($current, $key, $iterator) { // Ensures we scan recursively if ($iterator->hasChildren()) { return true; } if ($current->getExtension() === 'json') { return true; } return false; }); foreach (new RecursiveIteratorIterator($filter) as $file) { // Return path relative to $dirPath $files[] = mb_substr($file->getPathname(), $dirPathLength); } return $files; }
[ "private function findTemplatesInFolder($dir)\n {\n $templates = array();\n\n if (is_dir($dir)) {\n $finder = new Finder();\n foreach ($finder->files()->followLinks()->in($dir) as $file) {\n $template = $this->parser->parse($file->getRelativePathname());\n if (false !== $template) {\n $templates[] = $template;\n }\n }\n }\n\n return $templates;\n }", "public function getTemplateDirs();", "public function getTemplatesDirs();", "function _getSnippetsByDir($SnippetDir, $Depth = 0)\n\t{\n\t\t\n\t\t$Snippets = array();\n\t\t\n\t\t$Depth++;\n\t\t$_dir = dir($this->SnippetPath . $SnippetDir);\n\t\twhile (false !== ($_entry = $_dir->read())) {\n\t\t\t\n\t\t\t// ignore files . and ..\n\t\t\tif ($_entry == \".\" || $_entry == \"..\") {\n\t\t\t\t// ignore these\n\t\t\t\n\n\t\t\t// get the snippets by file if extension is xml\n\t\t\t} else \n\t\t\t\tif (!is_dir($this->SnippetPath . $SnippetDir . \"/\" . $_entry) && eregi(\".xml$\", $_entry)) {\n\t\t\t\t\t// get the snippet\n\t\t\t\t\t$_snippet = weCodeWizardSnippet::initByXmlFile(\n\t\t\t\t\t\t\t$this->SnippetPath . $SnippetDir . \"/\" . $_entry);\n\t\t\t\t\t$_item = array(\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'type' => 'option', \n\t\t\t\t\t\t\t'name' => $_snippet->getName(), \n\t\t\t\t\t\t\t'value' => $SnippetDir . \"/\" . $_entry\n\t\t\t\t\t);\n\t\t\t\t\t$Snippets[] = $_item;\n\t\t\t\t\t\n\t\t\t\t// enter subdirectory only if depth is smaller than 2\n\t\t\t\t} else \n\t\t\t\t\tif (is_dir($this->SnippetPath . $SnippetDir . \"/\" . $_entry) && $Depth < 2) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$information = array();\n\t\t\t\t\t\t$_infoFile = $this->SnippetPath . $SnippetDir . \"/\" . $_entry . \"/\" . \"_information.php\";\n\t\t\t\t\t\tif (file_exists($_infoFile) && is_file($_infoFile)) {\n\t\t\t\t\t\t\tinclude ($_infoFile);\n\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$_foldername = $_entry;\n\t\t\t\t\t\tif (isset($information['foldername'])) {\n\t\t\t\t\t\t\t$_foldername = $information['foldername'];\n\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$_folder = array(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'type' => 'optgroup', \n\t\t\t\t\t\t\t\t'name' => $_foldername, \n\t\t\t\t\t\t\t\t'value' => $this->_getSnippetsByDir($SnippetDir . \"/\" . $_entry, $Depth)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$Snippets[] = $_folder;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\n\t\t}\n\t\t$_dir->close();\n\t\t\n\t\t$Depth--;\n\t\t\n\t\treturn $Snippets;\n\t\n\t}", "function list_templates() {\n\n $files = array();\n foreach ($this->dirkeys as $key => $dirname) \n $files = array_merge($files, $this->_list_files($key, $dirname));\n\n return $files;\n }", "public function dirs() {\r\n\t\t$dirs = array();\r\n\t\t$path = $this->app->request->get('path', 'string');\r\n\t\tforeach ($this->app->path->dirs('root:'.$this->getDirectory().$path) as $dir) {\r\n\t\t\t$count = count($this->app->path->files('root:'.$this->getDirectory().$path.'/'.$dir, false, $this->filter));\r\n\t\t\t$dirs[] = array('name' => basename($dir) . \" ($count)\", 'path' => $path.'/'.$dir, 'type' => 'folder');\r\n\t\t}\r\n\r\n\t\treturn json_encode($dirs);\r\n\t}", "public function gatherJSON($dir=NULL) {\n\n\t\t$dir = $dir !== NULL ? rtrim($dir, '/') : '';\n\n\t\t// TODO: check if glob(...) returns an array first\n\t\t$menuFiles = glob($dir . '/*/menu.json');\n\t\tif(is_array($menuFiles)) {\n\n\t\t\tforeach($menuFiles AS $item) {\n\n\t\t\t\tif(is_file($item)) {\n\n\t\t\t\t\t$content = json_decode(file_get_contents($item), true);\n\t\t\t\t\tif($content != NULL) {\n\t\t\t\t\t\t$content['controller'] = $content['controller'] ? $content['controller'] : basename(dirname($item));\n\t\t\t\t\t\t$this->JSON[] = $content;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$dirs = glob($dir . '/*', GLOB_ONLYDIR);\n\t\tif(is_array($dirs)) {\n\t\t\tforeach(glob($dir . '/*', GLOB_ONLYDIR) AS $subdirs) {\n\t\t\t\t$this->gatherJSON($subdirs);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\n\t}", "public function listDir($dirPath = \"\")\n {\n $searchDir = FileSystem::getPath($dirPath);\n $listing = scandir($searchDir);\n $folders = [];\n $files = [];\n\n foreach ($listing as $item)\n {\n $item = [\n 'name' => $item,\n 'path' => $dirPath . $item . (is_dir($searchDir . $item) ? '/' : ''),\n ];\n\n if ($item['name'] == '.' or $item['name'] == '..')\n {\n continue;\n }\n else if (is_dir($searchDir . $item['name']))\n {\n $folders[] = $item;\n }\n else\n {\n $item['ext'] = $this->getFileExtension($item['name']);\n $files[] = $item;\n }\n }\n\n return ['folders' => $folders, 'files' => $files];\n }", "function getFilesRecursive($basedir = \"\");", "protected function scanDirectory($dir) {\n // Validate that this is a directory worth investigating.\n if (!is_dir($dir)) {\n return NULL;\n }\n $files = [];\n // ******************** UNLEASH THE KRAKEN ********************.\n // We need to create a recursive iterator to crawl the directory and look\n // for component yml files. This type of action can be resource intensive.\n // For performance reasons, we want to limit the numebr of subdirectories\n // that we will search inside of. First we create a filter to do so.\n\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $dir_iterator = new \\RecursiveDirectoryIterator($dir, $flags);\n\n // Allow directories specified in settings.php to be ignored. You can use\n // this to not check for files in common special-purpose directories.\n $ignore_dir = Settings::get('file_scan_ignore_directories', []);\n\n // Create the filter to use. Note that this is based on ExtensionDiscovery\n // We can safely use the same filters for finding info.yml files here.\n $filter = new RecursiveComponentFilterIterator($dir_iterator, $ignore_dir);\n\n // Grab the list of files that have been discovered using the filter above\n // to avoid scanning all subdirs. Glad we put a leash on this thing, huh?\n $iterator = new \\RecursiveIteratorIterator($filter, \\RecursiveIteratorIterator::LEAVES_ONLY, \\RecursiveIteratorIterator::CATCH_GET_CHILD);\n\n // Loop through the files found in directory and all valid subdirectories\n foreach ($iterator as $key => $fileinfo) {\n // If this isn't a valid component file, then go check the next one.\n if (!preg_match(static::PHP_FUNCT_PATTERN, $fileinfo\n ->getBasename('.component.yml'))) {\n continue;\n }\n // Set the name of the component and the pathname of where to find it.\n $name = $fileinfo->getBasename('.component.yml');\n // Set the full path including the file itself.\n $pathfilename = $fileinfo->getPathName();\n // Add the filepath keyed by component machine name.\n $files[$name] = $pathfilename;\n }\n return $files;\n }", "private function getJsonFiles()\n\t{\n\t\t$handle = opendir($this->_folder);\n\t\twhile(false !== ($entry = readdir($handle)))\n\t\t{\n\t\t\tif($this->checkFile($entry))\n\t\t\t{\n\t\t\t\t$this->_files[] = $entry;\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t\tclosedir($handle);\n\t}", "protected function generateRecursiveList(\\DirectoryIterator $dir, $nodePath)\n {\n // We will need a flipped file mapping as we work from the tmp dir\n $fileMapping = array_flip($this->config->getValue(Config::FILE_MAPPING));\n $mappedIndexFile = $fileMapping['index.html'];\n\n $out = '';\n $fileUtil = new File();\n $parsedownUtil = new Parsedown();\n foreach ($dir as $node) {\n\n // Create the link path\n $linkPath = str_replace('.md', '.html', $this->config->getValue(Config::NAVIGATION_BASE) . $nodePath . $node);\n\n // If we got a directory we have to go deeper. If not we can add another link\n if ($node->isDir() && !$node->isDot()) {\n\n // Stack up the node path as we need for out links\n $nodePath .= $node . DIRECTORY_SEPARATOR;\n\n // Build up the link structure\n $nodeName = '<a href=\"{navigation-base}' . $linkPath . DIRECTORY_SEPARATOR .\n $this->config->getValue(Config::INDEX_FILE_NAME) . '\">' . $fileUtil->filenameToHeading($node) .\n '</a>';\n\n // Make a recursion with the new path\n $out .= '<li class=\"icon-thin-arrow-left\" node=\"' . $node . '\">' . $nodeName . '\n\n <h2>' . $fileUtil->filenameToHeading($node) . '</h2>\n <ul>' .\n $this->generateRecursiveList(new \\DirectoryIterator($node->getPathname()), $nodePath) .\n '</ul></li>';\n\n // Clean the last path segment as we do need it within this loop\n $nodePath = str_replace($node . DIRECTORY_SEPARATOR, '', $nodePath);\n\n } elseif ($node->isFile() && isset($this->allowedExtensions[$node->getExtension()])) {\n // A file is always a leaf, so it cannot be an ul element\n\n // We will skip index files as actual leaves\n if ($node == $mappedIndexFile) {\n\n continue;\n }\n\n // Get the node's name (in a heading format)\n $nodeName = $fileUtil->filenameToHeading($node);\n\n // Do we have an markdown file? If so we will check for any markdown headings\n $headingBlock = '';\n if (isset($this->allowedExtensions[$node->getExtension()])) {\n\n // We need the headings within the file\n $headings = $parsedownUtil->getHeadings(\n file_get_contents($dir->getPathname()),\n $this->config->getValue(Config::NAVIGATION_HEADINGS_LEVEL)\n );\n\n // Create the list of headings as a ul/li list\n $headingBlock = $this->generateHeadingBlock($headings, $nodeName);\n }\n\n // Create the actual leaf\n $out .= '<li node=\"' . strstr($node, \".\", true) . '\"><a href=\"{navigation-base}' .\n $linkPath . '\">' . $nodeName . '</a>' .\n $headingBlock . '</li>';\n }\n }\n\n // Return the menu\n return $out;\n }", "private function getGeneratedFiles()\n\t{\n\t\t$files = array();\n\n\t\t// Resources\n\t\tforeach ($this->config->template->resources as $item) {\n\t\t\t$path = $this->getTemplateDir() . DIRECTORY_SEPARATOR . $item;\n\t\t\tif (is_dir($path)) {\n\t\t\t\t$iterator = Nette\\Utils\\Finder::findFiles('*')->from($path)->getIterator();\n\t\t\t\tforeach ($iterator as $innerItem) {\n\t\t\t\t\t$files[] = $this->config->destination . DIRECTORY_SEPARATOR . $item . DIRECTORY_SEPARATOR . $iterator->getSubPathName();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$files[] = $this->config->destination . DIRECTORY_SEPARATOR . $item;\n\t\t\t}\n\t\t}\n\n\t\t// Common files\n\t\tforeach ($this->config->template->templates->common as $item) {\n\t\t\t$files[] = $this->config->destination . DIRECTORY_SEPARATOR . $item;\n\t\t}\n\n\t\t// Optional files\n\t\tforeach ($this->config->template->templates->optional as $optional) {\n\t\t\t$files[] = $this->config->destination . DIRECTORY_SEPARATOR . $optional['filename'];\n\t\t}\n\n\t\t// Main files\n\t\t$masks = array_map(function($config) {\n\t\t\treturn preg_replace('~%[^%]*?s~', '*', $config['filename']);\n\t\t}, $this->config->template->templates->main->toArray());\n\t\t$filter = function($item) use ($masks) {\n\t\t\tforeach ($masks as $mask) {\n\t\t\t\tif (fnmatch($mask, $item->getFilename())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t\tforeach (Nette\\Utils\\Finder::findFiles('*')->filter($filter)->from($this->config->destination) as $item) {\n\t\t\t$files[] = $item->getPathName();\n\t\t}\n\n\t\treturn $files;\n\t}", "function _mailgun_civix_find_files($dir, $pattern) {\n if (is_callable(array('CRM_Utils_File', 'findFiles'))) {\n return CRM_Utils_File::findFiles($dir, $pattern);\n }\n\n $todos = array($dir);\n $result =[];\n while (!empty($todos)) {\n $subdir = array_shift($todos);\n foreach (_mailgun_civix_glob(\"$subdir/$pattern\") as $match) {\n if (!is_dir($match)) {\n $result[] = $match;\n }\n }\n if ($dh = opendir($subdir)) {\n while (FALSE !== ($entry = readdir($dh))) {\n $path = $subdir . DIRECTORY_SEPARATOR . $entry;\n if ($entry{0} == '.') {\n } elseif (is_dir($path)) {\n $todos[] = $path;\n }\n }\n closedir($dh);\n }\n }\n return $result;\n}", "public function findTemplates()\n {\n $templates = [];\n $Regex = new \\RegexIterator(\n new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->dir)\n ),\n '/^.+\\.template$/',\n \\RecursiveRegexIterator::GET_MATCH\n );\n\n foreach ($Regex as $file) {\n $template = str_replace($this->dir, '', $file[0]);\n\n\t\t\t// Skip anything from our own skel/ tooling directory.\n if (strpos($template, 'skel/') === 0) {\n \tcontinue;\n }\n\n $templates[] = $template;\n $this->writeVerbose('Found template: `' . $template . '`');\n }\n\n return $templates;\n }", "function pico_main_get_wraps_files_recursively($mydirname, $dir_path = '/')\n{\n\t$full_dir_path = XOOPS_TRUST_PATH . _MD_PICO_WRAPBASE . '/' . $mydirname . $dir_path;\n\tif (!is_dir($full_dir_path)) return [];\n\n\t$ret = [];\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\t// parse currenct directry\n\t$dir_tmps = [];\n\t$file_tmps = [];\n\t$dh = opendir($full_dir_path);\n\twhile (false !== ($file = readdir($dh))) {\n\t\tif ('.' == substr($file, 0, 1)) continue;\n\t\tif (is_dir($full_dir_path . $file)) {\n\t\t\t$dir_tmps[] = $file;\n\t\t} else if (is_file($full_dir_path . $file)) {\n\t\t\t$ext = strtolower(substr(strrchr($file, '.'), 1));\n\t\t\tif (in_array($ext, explode('|', _MD_PICO_EXTS4HTMLWRAPPING))) {\n\t\t\t\t$file_tmps[] = $file;\n\t\t\t}\n\t\t}\n\t}\n\tclosedir($dh);\n\n\t// files\n\tforeach ($file_tmps as $file_tmp) {\n\t\t$file_path4key = $dir_path . $file_tmp;\n\t\t$ret[$file_path4key] = htmlspecialchars('XOOPS_TRUST_PATH' . _MD_PICO_WRAPBASE . '/' . $mydirname . $file_path4key, ENT_QUOTES);\n\t\t$myrow = $db->fetchArray($db->query('SELECT subject FROM ' . $db->prefix($mydirname . '_contents') . \" WHERE vpath='\" . addslashes($file_path4key) . \"'\"));\n\t\tif (!empty($myrow)) {\n\t\t\t$ret[$file_path4key] .= ' (' . htmlspecialchars(xoops_substr($myrow['subject'], 0, 20), ENT_QUOTES) . ')';\n\t\t}\n\t}\n\n\t// subdirs\n\tforeach ($dir_tmps as $dir_tmp) {\n\t\t$ret += pico_main_get_wraps_files_recursively($mydirname, $dir_path . $dir_tmp . '/');\n\t}\n\n\treturn $ret;\n}", "function directorylist($dir, $recurse=false)\n {\n \n if (!file_exists($dir)) { return false; }\n\n// array to hold return value\n\n $retval = array();\n\n// add trailing slash if missing\n\n if(substr($dir, -1) != \"/\") $dir .= \"/\";\n\n// open pointer to directory and read list of files\n\n $d = @dir($dir) or die();\n while(false !== ($entry = $d->read())) {\n\n// skip hidden files\n\n if($entry[0] == '.') continue;\n if(is_dir(\"$dir$entry\")) {\n $retval[] = array(\n \"name\" => \"$dir$entry/\",\n \"type\" => filetype(\"$dir$entry\"),\n \"size\" => 0,\n \"lastmod\" => filemtime(\"$dir$entry\")\n );\n\n if($recurse && is_readable(\"$dir$entry/\")) {\n $retval = array_merge($retval, directorylist(\"$dir$entry/\", true));\n }\n } elseif(is_readable(\"$dir$entry\")) {\n $retval[] = array(\n \"name\" => \"$dir$entry\",\n \"filename\" => \"$entry\",\n \"size\" => filesize(\"$dir$entry\"),\n \"lastmod\" => filemtime(\"$dir$entry\")\n );\n }\n }\n $d -> close();\n\n return $retval;\n }", "protected static function _getContentByDir($template){\n \t$template = Util::getWritableDir(\"articles\") . $template;\n\n\t\tif(!is_dir($template)){\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$result = array();\n \tforeach(glob($template . '*') as $item){\n \t\t$result[basename($item)] = Common::readFile($item);\n\t }\n\t \n\t \treturn $result;\n }", "function scanFiles($dir)\r\n{\r\n $files = array();\r\n // Is there actually such a folder/file?\r\n if(file_exists($dir)){\r\n foreach(scandir($dir) as $f) {\r\n if(!$f || $f[0] == '.') {\r\n continue; // Ignore hidden files\r\n }\r\n if(is_dir($dir . '/' . $f)) {\r\n // The path is a folder\r\n $files[] = array(\r\n \"id\" => str_replace('//','/', $dir . '/' . $f),\r\n //\"text\" => str_replace('/','',$f),\r\n \"text\" => $f,\r\n \"type\" => \"folder\",\r\n //\"path\" => $dir . '/' . $f,\r\n \"children\" => scanFiles($dir . '/' . $f) // Recursively get the contents of the folder\r\n );\r\n } else {\r\n // It is a file\r\n //$id = 'fileadmin' . array_pop(explode('fileadmin', str_replace('//','/',$dir . $f)));\r\n $ext = strpos($f, '.') !== FALSE ? substr($f, strrpos($f, '.') + 1) : '';\r\n $files[] = array(\r\n //\"id\" => str_replace('/','',$f),\r\n \"id\" => $f,\r\n //\"text\" => str_replace('/','',$f),\r\n \"text\" => $f,\r\n \"type\" => 'file',\r\n 'icon' => 'file file-'.substr($f, strrpos($f,'.') + 1),\r\n //\"path\" => $dir . '/' . $f,\r\n //\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\r\n );\r\n }\r\n }\r\n }\r\n return $files;\r\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
funcion de verificacion de vendedor por medio del codigo
public function verificaVendedor() { //var_dump($_POST); //estraigo el id del vendedor $pedazos = explode("-",$_POST['codVende']); $idUsuario = (count($pedazos) == 2)?$pedazos[1]:0; $where['u.idPersona'] = $idUsuario; $where['u.idPerfil'] = _PERFIL_VENDEDOR; $respuesta = $this->logicaUsuarios->verificaVendedor($where); echo json_encode($respuesta); }
[ "public function veriCode() {}", "public function isVatValid();", "public function verEntradaPresidenciaAV2() {\n\n $error=self::$presidencia->verEntradaPantallaAV(3);\n if(!empty ($error)) {\n if(strpos($error, \"OK\")===false) {\n echo \"Error al intentar seleccionar la entrada av2 de encender la pantalla de la presidencia\\n\";\n }\n }\n }", "function verificaCumprimentoObjeto($obrid)\n{\n\n /* Verificando se no houve um bloqueio/desbloqueio forado (manual). */\n if (!verificaBloqueioManual($obrid)) {\n $situacaoObra = verificaSituacaoObra($obrid);\n //$co = new CumprimentoObjeto();\n $obra = new Obras($obrid);\n\n $pagamentosEfetuados = $obra->getPagamentoPar($obrid);\n $pagamentoEfetivadoExists = false;\n\n if ($situacaoObra == 8) { // OBRA CANCELADA\n // VERIFICANDO SE A ORIGEM DA OBRA 'CONVNIO'.\n if (verificaOrigemObra($obrid) == 2 || verificaNumeroConvenio($obrid) == true) {\n $pagamentoEfetivadoExists = true;\n } else {\n // VERIFICANDO SE EXISTE PELO MENOS UM PAGAMENTO EFETIVADO.\n if (is_array($pagamentosEfetuados)) {\n foreach ($pagamentosEfetuados as $pagamento) {\n if (strpos($pagamento[\"pagsituacaopagamento\"], \"EFETIVADO\") !== false) {\n $pagamentoEfetivadoExists = true;\n break;\n }\n }\n }\n }\n\n if (!$pagamentoEfetivadoExists) { // SE NO HOUVER NENHUM PAGAMENTO EFETIVADO\n return false;\n } else {\n return true;\n }\n } elseif ($situacaoObra == 7) { // OBRA INACABADA\n return true;\n } elseif ($situacaoObra == 6) { // OBRA CONCLUDA\n $vigencia = null;\n $situacaoEfetivada = false; // Varivel que indica se a obra est 100% paga.\n\n if (verificaOrigemObra($obrid) == 2 || verificaNumeroConvenio($obrid) == true) { // CONVNIO\n // Para a origem 'Convênio' assumido que a obra est 100% paga.\n $situacaoEfetivada = true;\n\n // Pesquisando na tabela 'registroatividades'.\n $dtvigencia = verificaLeituraNotificacaoObraConcluida($obrid);\n\n if ($dtvigencia) { // Se houver data de vigncia na tabela 'registroatividades'...\n $dtAtual = new DateTime(\"now\");\n\n // Obtendo a data da tabela 'registroatividades' e somando mais 45 dias.\n $dtvigencia = new DateTime($dtvigencia);\n $dtvigencia->add(new DateInterval(\"P45D\"));\n\n // Verificando a vigncia a partir da nova data (45 dias).\n if ($dtvigencia->diff($dtAtual) > 0) {\n $vigencia = false;\n } else {\n $vigencia = true;\n }\n } else {\n $dtfimconvenio = verificaDataFimConvenio($obrid);\n if ($dtfimconvenio) {\n $dtAtual = new DateTime(\"now\");\n $dtfimconvenio = new DateTime($dtfimconvenio);\n\n // Verificando se a vigncia a partir da nova data (45 dias).\n if ($dtfimconvenio->diff($dtAtual) > 0) {\n $vigencia = false;\n } else {\n $vigencia = true;\n }\n } else {\n // Caso no haja data de vigncia campo 'Fim' na aba 'Recursos' (para convênio) e nem na tabela 'registroatividades', bloqueia a aba 'Cumprimnento do objeto'.\n return false;\n }\n }\n } else { // PROCESSO\n // Verificando a data de vigncia da aba \"Recursos\".\n $vigencia = verificaVigenciaObra($obrid);\n\n if ($vigencia === null) { // Se no existir data de vigncia na aba recursos, pesquisar na tabela 'registroatividades'.\n // Pesquisando na tabela 'registroatividades'.\n $dtvigencia = verificaLeituraNotificacaoObraConcluida($obrid);\n\n if ($dtvigencia) { // Se houver data de vigncia na tabela 'registroatividades'...\n $dtAtual = new DateTime(\"now\");\n\n // Obtendo a data da tabela 'registroatividades' e somando mais 45 dias.\n $dtvigencia = new DateTime($dtvigencia);\n\n $dtvigencia->add(new DateInterval(\"P45D\"));\n\n // Verificando se a vigncia a partir da nova data (45 dias).\n if ($dtvigencia->diff($dtAtual) > 0) {\n $vigencia = false;\n } else {\n $vigencia = true;\n }\n } else {\n // Caso no haja data de vigncia na aba 'Recursos' e nem na tabela 'registroatividades', bloqueia a aba 'Cumprimnento do objeto'.\n return false;\n }\n }\n }\n\n if ($vigencia === false) { // Obra vencida.\n if ($pagamentosEfetuados) {\n $calc = 0;\n array_walk($pagamentosEfetuados, function ($v, $k) use (&$calc) {\n if (strpos($v[\"pagsituacaopagamento\"], \"EFETIVADO\") !== false) {\n $percentual = round($v[\"percentualpagamento\"], 2);\n $calc += $percentual;\n }\n }, $calc);\n\n if ($calc < 100) {\n $situacaoEfetivada = false;\n } else {\n $situacaoEfetivada = true;\n }\n }\n\n if ($situacaoEfetivada === false) {\n // Se a obra no for 100% efetivada, bloqueia-se a aba 'Cumprimento do objeto'.\n return false;\n } else {\n // Se todas as previses de providência estiverem vencidas, liberar a aba 'Cumprimento do objeto'.\n if (obterSituacaoPrevisaoProvidencia($obrid)) {\n return true;\n } else {\n // Se pelo menos uma previso de providência no estiver vencida, bloquear a aba 'Cumprimento do objeto'.\n return false;\n }\n }\n } elseif ($vigencia === true) { // Obra em vigncia.\n if ($pagamentosEfetuados) {\n $calc = 0;\n array_walk($pagamentosEfetuados, function ($v, $k) use (&$calc) {\n if (strpos($v[\"pagsituacaopagamento\"], \"EFETIVADO\") !== false) {\n $percentual = round($v[\"percentualpagamento\"], 2);\n $calc += $percentual;\n }\n }, $calc);\n\n if ($calc < 100) {\n $situacaoEfetivada = false;\n } else {\n $situacaoEfetivada = true;\n }\n }\n\n if ($situacaoEfetivada === false) {\n // Se a obra no for 100% efetivada, bloqueia-se a aba 'Cumprimento do objeto'.\n return false;\n } else {\n // Se todas as previses de providência estiverem vencidas, liberar a aba 'Cumprimento do objeto'.\n if (obterSituacaoPrevisaoProvidencia($obrid)) {\n $solicitacoes = capturaSolicitacoesObra($obrid);\n $solUsoSaldoDeferida = false;\n foreach ($solicitacoes as $solicitacao) {\n if ($solicitacoes[\"aprovado\"] == \"S\" && $solicitacoes[\"tslid\"] == 2) {\n $solUsoSaldoDeferida = true;\n break;\n }\n }\n\n // Se houver solicitação de uso de saldo deferida, bloqueia a aba 'Cumprimento do objeto'.\n if ($solUsoSaldoDeferida) {\n return false;\n } else {\n if (verificaComposicaoConcluida($obrid)) {\n return true;\n } else {\n return false;\n }\n }\n } else {\n // Se pelo menos uma previso de providência no estiver vencida, bloquear a aba 'Cumprimento do objeto'.\n return false;\n }\n }\n } else {\n return false;\n }\n }\n }\n}", "function esta_vigente($id_desig)\n\t{\n $sql = \"SELECT case when e.vigente then 1 else 0 end as vig FROM designacion d, departamento e\"\n . \" where d.id_departamento=e.iddepto\"\n . \" and d.id_designacion=$id_desig\";\n $dato=toba::db('designa')->consultar($sql);\n return $dato[0]['vig'] ;\n\t}", "function verif($mot, $m, $M){\r\n\tfor ($i=0; $i <=taille_chaine($mot) ; $i++) {\r\n\t\tif (isset($mot[$i])) {\r\n\t\t\tif ($mot[$i]==$M||$mot[$i]==$m) {\r\n\t\t\t\treturn true;\r\n\t\t\t} \r\n\t\t} \r\n\t}\r\nreturn false;\r\n}", "function vendas()\n{\n}", "public function zahtev_ver()\n\t{\n\t\t$zahtevVerModel = new ModelZahtevVer();\n\t\t$korisnik = $this->session->get(\"korisnik\");\n\t\t//Provera da li postoji neobradjen zahtev trenutnog korisnika\n\t\tif ($zahtevVerModel->proveraZahtevPodnet($korisnik->IdK)) {\n\t\t\treturn $this->pozovi('zahtev_ver/slanje_zahteva_podnet');\n\t\t} else {\n\t\t\t$data['zahtevNeuspesan'] = '';\n\t\t\treturn $this->pozovi('zahtev_ver/slanje_zahteva', $data);\n\t\t}\n\t}", "public function estaVencido()\n {\n }", "function check_vaccine_eligibility(){\n\t\n\t\tif(func_num_args()>0):\n\t\t\t$arr = func_get_args();\n\t\t\t$patient_id = $arr[0];\n\t\t\t$dob = $arr[1];\n\t\t\t$vaccine = $arr[2];\n\t\tendif;\n\n\n\t\t//query will determine 3 things: 1. determine if the patient is enrolled in ccdev, 2. determine if the patient has a vaccination record, 3. determine if the patient hasn't been vaccinated with $vaccine yet.\n\n\t\t$q_ccdev = mysql_query(\"SELECT a.ccdev_id FROM m_patient_ccdev a WHERE a.patient_id='$patient_id' ORDER by a.ccdev_timestamp DESC\") or die(\"Cannot query 1149 \".mysql_error()); \n\t\t$arr_vacc_no_seq = array('BCG','HEPB1','MSL','DPT1','OPV1','PENTA1','MMR','ROTA'); //1st dosages OR vaccine has no series\n\t\t$arr_vacc_seq = array('DPT2','OPV2','HEPB2','PENTA2','DPT3','OPV3','HEPB3','PENTA3','ROTA2');\n\n\t\tif(mysql_num_rows($q_ccdev)!=0):\n\t\t\tlist($ccdev_id) = mysql_fetch_array($q_ccdev);\n\t\t\t\n\t\t\t\n\t\t\t$q_vaccine = mysql_query(\"SELECT consult_id FROM m_consult_ccdev_vaccine WHERE ccdev_id='$ccdev_id' AND patient_id='$patient_id' AND vaccine_id='$vaccine'\") or die(\"Cannot query 1158 \".mysql_error());\n\t\t\t\n\t\t\tif(mysql_num_rows($q_vaccine)==0): \n\t\t\t\tif($this->get_vaccine_min_age_eligibility($vaccine,$patient_id,$dob)<=round(($this->get_patient_age($patient_id)*12*30.42),0)): //checks if the client is within the minimum age to have the vaccination\n\n\t\t\t\t\tif(in_array($vaccine,$arr_vacc_no_seq)): \n\t\t\t\t\t\treturn true;\n\t\t\t\t\telseif(in_array($vaccine,$arr_vacc_seq)): //check if the prerequisite vaccine was given to the client \n\t\t\t\t\t\t//this would cover only 'DPT2','OPV2','HEPB2','DPT3','OPV3','HEPB3'\n\t\t\t\t\t\tif($this->check_vaccine_dependency($vaccine,$patient_id)): \n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\tendif;\n\t\t\t\t\telse:\n\t\t\t\t\t\t\n\t\t\t\t\tendif;\n\t\t\t\telse:\n\t\t\t\t\treturn false;\n\t\t\t\tendif;\n\t\t\telse:\n\t\t\t\treturn false;\n\t\t\tendif;\n\n\t\telse:\n\t\t\treturn false;\n\t\tendif;\n\t}", "function verificarEstadoDefesaCivil() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t#Palavras chave de pesquisa\n\t\t\t\t$palavrasChave = array('Timbó', 'Blumenau', 'Médio Vale', 'Rio dos Cedros');\n\t\t\t\t\n\t\t\t\t#Busca quadr de informações no site da defesa civil\n\t\t\t\tinclude \"lib/simple_html_dom.php\";\n\t\t\t\t$html = file_get_html('http://www.defesacivil.sc.gov.br/');\n\t\t\t\t\n\t\t\t\t#Filtra dados\t\t\t\n\t\t\t\t$html = $html -> getElementById(\"user5\");\n\t\t\t\t$html = $html -> find(\"p\");\n\t\t\t\t\n\t\t\t\t#Varre dados em busca de palavras chave\n\t\t\t\t$cont = 0;\n\t\t\t\t$achouSemAviso = false;\n\t\t\t\t$achouPalavra = false;\n\t\t\t\tforeach ($html as $key => $value) {\n\t\t\t\t\tif ($cont != 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t#Procura por \"Sem aviso.\"\n\t\t\t\t\t\tif (strpos($value,'Sem aviso.') !== false) {\n\t\t\t\t\t\t $achouSemAviso = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t#Procura por palavras Chave\n\t\t\t\t\t\tforeach ($palavrasChave as $key => $palavraChave) {\n\t\t\t\t\t\t\tif (strpos($value, $palavraChave) !== false) {\n\t\t\t\t\t\t\t $achouPalavra = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t$cont++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#Se não achou \"Sem aviso\" e achou palavra chave\n\t\t\t\tif (!$achouSemAviso & $achouPalavra) {\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} catch (Exception $e) {\n\t\t\t\t#echo 'Cuaght exception: ', $e -> getMessage(), \"\\n\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}", "function simplecal_check_2_1_2(){\n\t// En attendant https://core.spip.net/issues/2236, on restreint désormais à ['non', 'partout']\n\t// Du coup, on remplace en base, la valeur 'secteur' par 'partout'.\n\t\n\t$row = sql_fetsel(\"m.nom, m.valeur\", \"spip_meta as m\", \"m.nom='simplecal_rubrique'\");\n\tif ($row and $row['valeur'] == \"secteur\") {\n\t\tecrire_meta('simplecal_rubrique', 'partout');\n\t}\n}", "public function existeregistromaestrocajachica() {\n \n }", "function DetectarMetodoResolucion($vectorRev, $metodoVerificar)\n{\n\t//buscar los elementos unicos del vector, si el conteo de ese vector es 1 quiere decir\n\t//que solo tiene 1 elemento igual en todas sus posiciones, adicional si preguntamos que\n\t//elemento hay en la posicion [0] determinamos que metodo usar\n\treturn ((count($vectorRev) == 4 || count($vectorRev) == 8) && (count(array_unique($vectorRev)) == 1) && $vectorRev[0] == 0) ? $metodoVerificar : \"ami\";\n}", "public function FN_Verificacion_Cuenta()\r\n{\r\n //Si no existe la sesion\r\n $PK_ID_Usuario = Sesion::getValue( 'PK_ID_Usuario' );\r\n $Verificacion_Cuenta = $this->_Mdl_Usuario->FN_Verificacion_Cuenta\r\n ( $PK_ID_Usuario );\r\n if($Verificacion_Cuenta)\r\n {\r\n echo \"Cuenta_No_Verifica\";\r\n }\r\n else\r\n {\r\n echo \"Verificada\";\r\n }\r\n}", "public function verVideoconferenciaEnPizarra( ) {\n $error=AccesoControladoresDispositivos::$ctrlProyectores->entradaVCPizarra();\n\tif($error!=1)\n\t AccesoControladoresDispositivos::$ctrlMatrizVideo->asignarVideo(MatrizVideo::$INPUT_VIDEOCONFERENCIA,MatrizVideo::$OUTPUT_PROYECTOR_CENTRAL);\n }", "function isVacia($palabra)\n{\n\t$palabrasVacias = array(\"&\",\"^^\",\"www\", \"http\",\"com\",\"\",\"-\",\"I\",\"a\",\"about\",\"above\",\"after\",\"again\",\"against\",\"all\",\"am\",\"an\",\"and\",\"any\",\"are\",\"aren't\",\"as\",\"at\",\"be\",\"because\",\"been\",\"before\",\"being\",\"below\",\"between\",\"both\",\"but\",\"by\",\"can't\",\"cannot\",\"could\",\"couldn't\",\"did\",\"didn't\",\"do\",\"does\",\"doesn't\",\"doing\",\"don't\",\"down\",\"during\",\"each\",\"few\",\"for\",\"from\",\"further\",\"had\",\"hadn't\",\"has\",\"hasn't\",\"have\",\"haven't\",\"having\",\"he\",\"he'd\",\"he'll\",\"he's\",\"her\",\"here\",\"here's\",\"hers\",\"herself\",\"him\",\"himself\",\"his\",\"how\",\"how's\",\"i\",\"i'd\",\"i'll\",\"i'm\",\"i've\",\"if\",\"in\",\"into\",\"is\",\"isn't\",\"it\",\"it's\",\"its\",\"itself\",\"let's\",\"me\",\"more\",\"most\",\"mustn't\",\"my\",\"myself\",\"no\",\"nor\",\"not\",\"of\",\"off\",\"on\",\"once\",\"only\",\"or\",\"other\",\"ought\",\"our\",\"ours\",\"ourselves\",\"out\",\"over\",\"own\",\"same\",\"shan't\",\"she\",\"she'd\",\"she'll\",\"she's\",\"should\",\"shouldn't\",\"so\",\"some\",\"such\",\"than\",\"that\",\"that's\",\"the\",\"their\",\"theirs\",\"them\",\"themselves\",\"then\",\"there\",\"there's\",\"these\",\"they\",\"they'd\",\"they'll\",\"they're\",\"they've\",\"this\",\"those\",\"through\",\"to\",\"too\",\"under\",\"until\",\"up\",\"very\",\"was\",\"wasn't\",\"we\",\"we'd\",\"we'll\",\"we're\",\"we've\",\"were\",\"weren't\",\"what\",\"what's\",\"when\",\"when's\",\"where\",\"where's\",\"which\",\"while\",\"who\",\"who's\",\"whom\",\"why\",\"why's\",\"with\",\"won't\",\"would\",\"wouldn't\",\"you\",\"you'd\",\"you'll\",\"you're\",\"you've\",\"your\",\"yours\",\"yourself\",\"yourselves\");\n\tforeach ($palabrasVacias as $vacia){\n\t\tif($palabra==$vacia){\n\t\t\treturn true;\n\t\t}\n\t}\n return false;\n}", "public function verificaSituacaoNota() {\n\n $oDaoBemNota = new cl_bensempnotaitem();\n\n $sWhere = \"e136_bens = \" . $this->getCodigoBem();\n $sSqlBemNota = $oDaoBemNota->sql_query_bens_ativos(null, \"e72_vlrliq\", null, $sWhere);\n $rsBemNota = $oDaoBemNota->sql_record($sSqlBemNota);\n\n if ($oDaoBemNota->numrows == 0) {\n return self::SEMNOTA;\n }\n\n $nValorLiquidado = db_utils::fieldsMemory($rsBemNota, 0)->e72_vlrliq;\n\n if ($nValorLiquidado > 0) {\n\n return self::LIQUIDADO;\n }\n return self::EMLIQUIDACAO;\n }", "public function estVivant()\n {\n if ($this->getDeces() != false) {\n return false;\n } else {\n //est vivant \n return true;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the correct structure for Verifications Background Checks
protected function getVerificationBackgroundChecksStructure() { return [ 'first_name' => $this->background_checks_first_name, 'middle_name' => $this->background_checks_middle_name, 'last_name' => $this->background_checks_last_name, 'full_name' => $this->background_checks_full_name, 'date_of_birth' => $this->getBackgroundChecksDateOfBirth(), 'async_update' => $this->background_checks_async_update, ]; }
[ "protected function principalBackgroundCheckFieldsSpec()\n\t{\n\t\treturn new XmlSpec(0, array(\n\t\t\t'firstName' => XmlSpec::getDefaultSpec(),\n\t\t\t'lastName' => XmlSpec::getDefaultSpec(),\n\t\t\t'ssn' => XmlSpec::getDefaultSpec(),\n\t\t\t'dateOfBirth' => XmlSpec::getDefaultSpec(),\n\t\t\t'driversLicense' => XmlSpec::getDefaultSpec(),\n\t\t\t'driversLicenseState' => XmlSpec::getDefaultSpec()\n\t\t));\n\t}", "public function getHealthCheckArray(): array\n {\n $check = $this->check;\n\n if ($check['lastUpdated'] instanceof DateTime) {\n $check['lastUpdated'] = $check['lastUpdated']->format(DateTime::ATOM);\n }\n\n return $check;\n }", "private function getPhpChecksInfo($type)\n {\n $read = $this->filesystem->getDirectoryRead(DirectoryList::VAR_DIR);\n try {\n $jsonData = json_decode($read->readFile(ReadinessCheck::SETUP_CRON_JOB_STATUS_FILE), true);\n if (isset($jsonData[ReadinessCheck::KEY_PHP_CHECKS])\n && isset($jsonData[ReadinessCheck::KEY_PHP_CHECKS][$type])\n ) {\n return $jsonData[ReadinessCheck::KEY_PHP_CHECKS][$type];\n }\n return ['responseType' => ResponseTypeInterface::RESPONSE_TYPE_ERROR];\n } catch (\\Exception $e) {\n return ['responseType' => ResponseTypeInterface::RESPONSE_TYPE_ERROR];\n }\n }", "public function _getCheckMeta() {\n $uri = 'checks';\n if ($this->getOption('subAccount', null, true)) {\n $uri .= '?customerid='.$this->getOption('subAccount');\n }\n $data = $this->curlGetRequest($uri);\n return $data;\n }", "public function getStatusData()\r\n\t{\r\n\t\t$data = array(\r\n\t\t\t'source' => array(\r\n\t\t\t\t'a' => array(\r\n\t\t\t\t\t'selected' => false,\r\n\t\t\t\t\t'preferred' => false,\r\n\t\t\t\t\t'voltage' => false,\r\n\t\t\t\t\t'frequency' => false,\r\n\t\t\t\t\t'status' => false,\r\n\t\t\t\t),\r\n\t\t\t\t'b' => array(\r\n\t\t\t\t\t'selected' => false,\r\n\t\t\t\t\t'preferred' => false,\r\n\t\t\t\t\t'voltage' => false,\r\n\t\t\t\t\t'frequency' => false,\r\n\t\t\t\t\t'status' => false,\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'phaseSynchronization' => false,\r\n\t\t\t'totalLoad' => false,\r\n\t\t\t'totalPower' => false,\r\n\t\t\t'peakLoad' => false,\r\n\t\t\t'energy' => false,\r\n\t\t\t'powerSupplyStatus' => false,\r\n\t\t\t'communicationStatus' => false,\r\n\t\t);\r\n\r\n\t\t$this->hr->get('/status_update.html');\r\n\r\n\t\tif ($this->hr->result) {\r\n\t\t\t// selected source\r\n\t\t\tif (preg_match('/selected source<\\/span>\\s*<span class=\"txt\">source\\s+([a-z])/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$source = strtolower($matches[1]);\r\n\t\t\t\t$data['source'][$source]['selected'] = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// preferred source\r\n\t\t\tif (preg_match('/preferred source<\\/span>\\s*<span class=\"txt\">source\\s+([a-z])/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$source = strtolower($matches[1]);\r\n\t\t\t\t$data['source'][$source]['preferred'] = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// source voltage\r\n\t\t\tif (preg_match('/source voltage \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)\\s*\\/?\\s*([0-9\\.]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['voltage'] = $matches[1];\r\n\t\t\t\t$data['source']['b']['voltage'] = $matches[2];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// frequency\r\n\t\t\tif (preg_match('/source frequency \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)\\s*\\/?\\s*([0-9\\.]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['frequency'] = $matches[1];\r\n\t\t\t\t$data['source']['b']['frequency'] = $matches[2];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// status\r\n\t\t\tif (preg_match('/source status \\(a\\/b\\)<\\/span>\\s*<span class=\"txt\">([a-z]+)\\s*\\/?\\s*([a-z]*)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['source']['a']['status'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t\t$data['source']['b']['status'] = ($matches[2] == 'OK') ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t// phase sync\r\n\t\t\tif (preg_match('/phase synchronization<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['phaseSynchronization'] = ($matches[1] == 'No') ? false : true;\r\n\t\t\t}\r\n\r\n\t\t\t// total load\r\n\t\t\tif (preg_match('/total\\s+load<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['totalLoad'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// total power\r\n\t\t\tif (preg_match('/total\\s+power<\\/span>\\s*<span class=\"txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['totalPower'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// peak load\r\n\t\t\tif (preg_match('/peak\\s+load<\\/span>\\s*<span class=\"l2b txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['peakLoad'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// energy\r\n\t\t\tif (preg_match('/energy<\\/span>\\s*<span class=\"l2b txt\">([0-9\\.]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['energy'] = floatval($matches[1]);\r\n\t\t\t}\r\n\r\n\t\t\t// PS status\r\n\t\t\tif (preg_match('/power supply status<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['powerSupplyStatus'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t}\r\n\r\n\t\t\t// comm status\r\n\t\t\tif (preg_match('/communication status<\\/span>\\s*<span class=\"txt\">([a-z]+)/i', $this->hr->result, $matches)) {\r\n\t\t\t\t$data['communicationStatus'] = ($matches[1] == 'OK') ? true : false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "public function getCheckInfo()\n {\n return $this->check_info;\n }", "private function basicStructure()\n {\n return [\n 'apiVersion' => $this->apiVersion,\n 'context' => $this->context\n ];\n }", "private function workflowMetadataConf()\n {\n return [\n // \"Draft\" status\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'DRAFT',\n 'key' => 'class',\n 'value' => 'btn btn-navigation-primary'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'DRAFT',\n 'key' => 'description',\n 'value' => 'Expression of interest in editing'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'DRAFT',\n 'key' => 'label',\n 'value' => 'Draft'\n ],\n \n // \"Active\" status\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'ACTIVE',\n 'key' => 'class',\n 'value' => 'btn btn-navigation-primary'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'ACTIVE',\n 'key' => 'description',\n 'value' => 'It puts an expression of interest in active status'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'ACTIVE',\n 'key' => 'label',\n 'value' => 'Active'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'ACTIVE',\n 'key' => 'message',\n 'value' => 'Do you want to set the active status?'\n ],\n \n // \"To validate\" status\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'TOVALIDATE',\n 'key' => 'class',\n 'value' => 'btn btn-navigation-primary'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'TOVALIDATE',\n 'key' => 'description',\n 'value' => 'It puts an expression of interest in to validate status'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'TOVALIDATE',\n 'key' => 'label',\n 'value' => 'Validation request'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'TOVALIDATE',\n 'key' => 'message',\n 'value' => 'Do you want to set the validation request status?'\n ],\n \n // \"Relevant\" status\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'RELEVANT',\n 'key' => 'class',\n 'value' => 'btn btn-navigation-primary'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'RELEVANT',\n 'key' => 'description',\n 'value' => 'The expression of interest will be put in the relevant status'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'RELEVANT',\n 'key' => 'label',\n 'value' => 'Relevant'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'RELEVANT',\n 'key' => 'message',\n 'value' => 'Do you want to put the expression of interest in relevant status?'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'RELEVANT',\n 'key' => 'order',\n 'value' => '1'\n ],\n \n // \"Rejected\" status\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'REJECTED',\n 'key' => 'class',\n 'value' => 'btn btn-navigation-primary'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'REJECTED',\n 'key' => 'description',\n 'value' => 'The expression of interest will be rejected'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'REJECTED',\n 'key' => 'label',\n 'value' => 'Rejected'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'REJECTED',\n 'key' => 'message',\n 'value' => 'Do you want to reject the expression of interest?'\n ],\n [\n 'type' => AmosMigrationWorkflow::TYPE_WORKFLOW_METADATA,\n 'workflow_id' => self::WORKFLOW_NAME,\n 'status_id' => 'REJECTED',\n 'key' => 'order',\n 'value' => '1'\n ]\n ];\n }", "protected function getRequestStructure()\n {\n return [\n 'email' => $this->email,\n 'country' => $this->country,\n 'language' => $this->language,\n 'redirect_url' => $this->redirect_url,\n 'reference_id' => $this->reference_id,\n 'document_supported_types' => $this->document_supported_types,\n 'address_supported_types' => $this->address_supported_types,\n 'face' => $this->getVerificationFaceStructure(),\n 'backside_proof_required' => $this->backside_proof_required,\n 'address_backside_proof_required' => $this->address_backside_proof_required,\n 'expiry_date' => $this->getExpiryDate(),\n 'allow_retry' => $this->allow_retry,\n 'verification_mode' => $this->verification_mode,\n 'background_checks' => $this->getVerificationBackgroundChecksStructure(),\n 'document' => $this->getVerificationDocumentStructure()\n ];\n }", "public function getChecks();", "function getJobInformation($guid) {\n if ( is_file(UPLOAD_DIR . \"/$guid/$guid.IDTClientParams.xml\") ) {\n $upload_xml = simplexml_load_file(UPLOAD_DIR . \"/$guid/$guid.IDTClientParams.xml\");\n\n $output = array();\n $output['operator'] = trim($upload_xml->ReportLog->In->Operator);\n $output['email'] = trim($upload_xml->ReportLog->In->{'e-mail'});\n $output['time'] = trim($upload_xml->ReportLog->In->Time);\n $output['camera'] = trim($upload_xml->DeviceLog->In->Camera);\n $output['comment'] = trim($upload_xml->DeviceLog->In->Comment);\n $output['white_point'] = trim($upload_xml->IDTCreationConstraints->In->WhitePoint);\n $output['error_minimization_domain'] = trim($upload_xml->IDTCreationConstraints->In->ErrorMinimizationDomain);\n $output['patch_set'] = trim($upload_xml->IDTCreationConstraints->In->PatchSet);\n\n return $output;\n }\n return false;\n}", "public function get_required_background_properties() {\r\n return $this->required_background_properties;\r\n }", "public function getCheckDefinition();", "function get_status() { \n\n\t\t/* Construct the Array */\n\t\t$array['state'] \t= $this->_httpq->state();\n\t\t$array['volume']\t= $this->_httpq->get_volume();\n\t\t$array['repeat']\t= $this->_httpq->get_repeat();\n\t\t$array['random']\t= $this->_httpq->get_random();\n\t\t$array['track']\t\t= $this->_httpq->get_now_playing();\n\n\t\tpreg_match(\"/song=(\\d+)\\&/\",$array['track'],$matches);\n\t\t$song_id = $matches['1'];\n\t\t$song = new Song($song_id);\n\t\t$array['track_title'] \t= $song->title;\n\t\t$array['track_artist'] \t= $song->get_artist_name();\n\t\t$array['track_album']\t= $song->get_album_name();\n\n\t\treturn $array;\n\n\t}", "private function getBackgroundFields(){\n\t\t$this->_backgroundFields = $this->_dM->complexQuery(\"SELECT internID, id FROM survey_background_questions WHERE \".$this->_language.\" survey_id = '\".$this->_survey['id'].\"' AND is_slide = 0\")->fetchAll();\n\t\t// Save it in the fields array\n\t\tforeach($this->_backgroundFields as $bF){\n\t\t\t$this->_fields['bF_' . $bF['id']] = $bF['internID'];\n\t\t\t$this->_backgroundFillIn[$bF['internID']] = '&'.$bF['internID'];\n\t\t}\n\t}", "public function Create() {\n try {\n\n $json = json_decode(RequestUtil::GetBody());\n\n if (!$json) {\n throw new Exception('The request body does not contain valid JSON');\n }\n\n $provisioningnotifications = new Provisioningnotifications($this->Phreezer);\n\n // TODO: any fields that should not be inserted by the user should be commented out\n\n $provisioningnotifications->Notifid = $this->SafeGetVal($json, 'notifid');\n $provisioningnotifications->Hostname = $this->SafeGetVal($json, 'hostname');\n $provisioningnotifications->Installationip = $this->SafeGetVal($json, 'installationip');\n $provisioningnotifications->Configuredip = $this->SafeGetVal($json, 'configuredip');\n $provisioningnotifications->Startdate = date('Y-m-d H:i:s');\n //$provisioningnotifications->Startdate = date('Y-m-d H:i:s',strtotime($this->SafeGetVal($json, 'startdate')));\n $provisioningnotifications->Status = $this->SafeGetVal($json, 'status');\n $provisioningnotifications->Progress = $this->SafeGetVal($json, 'progress');\n $provisioningnotifications->Image = $this->SafeGetVal($json, 'image');\n $provisioningnotifications->Firmware = $this->SafeGetVal($json, 'firmware');\n $provisioningnotifications->Ram = $this->SafeGetVal($json, 'ram');\n $provisioningnotifications->Cpu = $this->SafeGetVal($json, 'cpu');\n $provisioningnotifications->Diskscount = $this->SafeGetVal($json, 'diskscount');\n $provisioningnotifications->Netintcount = $this->SafeGetVal($json, 'netintcount');\n $provisioningnotifications->Model = $this->SafeGetVal($json, 'model');\n $provisioningnotifications->Serial = $this->SafeGetVal($json, 'serial');\n $provisioningnotifications->Os = $this->SafeGetVal($json, 'os');\n //$provisioningnotifications->Update = date('Y-m-d H:i:s',strtotime($this->SafeGetVal($json, 'update')));\n $provisioningnotifications->Update = date('Y-m-d H:i:s');\n\n $provisioningnotifications->Validate();\n $errors = $provisioningnotifications->GetValidationErrors();\n\n if (count($errors) > 0) {\n $this->RenderErrorJSON('Please check the form for errors', $errors);\n } else {\n // since the primary key is not auto-increment we must force the insert here\n if ($provisioningnotifications->Progress != 0) {\n $provisioningnotifications->Save(True);\n }\n // $provisioningnotifications->Save(true);\n $this->RenderJSON($provisioningnotifications, $this->JSONPCallback(), true, $this->SimpleObjectParams());\n }\n } catch (Exception $ex) {\n $this->RenderExceptionJSON($ex);\n }\n }", "public function data_cron_health_checks() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'+5 minutes',\n\t\t\t\t'good',\n\t\t\t\t__( 'Scheduled events are running' ),\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'-50 minutes',\n\t\t\t\t'recommended',\n\t\t\t\t__( 'A scheduled event is late' ),\n\t\t\t\ttrue,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'-500 minutes',\n\t\t\t\t'recommended',\n\t\t\t\t__( 'A scheduled event has failed' ),\n\t\t\t\tfalse,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'-50 minutes',\n\t\t\t\t\t'-500 minutes',\n\t\t\t\t),\n\t\t\t\t'recommended',\n\t\t\t\t__( 'A scheduled event has failed' ),\n\t\t\t\ttrue,\n\t\t\t\ttrue,\n\t\t\t),\n\t\t);\n\t}", "function hrb_get_notifications_verbiage( $type = '' ) {\n\n\t$verbiages = array(\n\t\t'notification' => __( 'Notification', APP_TD ),\n\t\t'proposal'\t\t=> __( 'Proposals', APP_TD ),\n\t\t'terms'\t\t\t=> __( 'Terms', APP_TD ),\n\t\t'status'\t\t=> __( 'Status', APP_TD ),\n\t\t'action'\t\t=> __( 'Action Required', APP_TD ),\n\t\t'review'\t\t=> __( 'Reviews', APP_TD )\n\t);\n\n\treturn hrb_get_verbiage_values( $verbiages, $type );\n}", "function hrb_get_notifications_verbiage( $type = '' ) {\n\n\t$verbiages = array(\n\t\t'notification' => __( 'Notification', APP_TD ),\n\t\t'proposal' => __( 'Proposals', APP_TD ),\n\t\t'terms' => __( 'Terms', APP_TD ),\n\t\t'status' => __( 'Status', APP_TD ),\n\t\t'action' => __( 'Action Required', APP_TD ),\n\t\t'review' => __( 'Reviews', APP_TD ),\n\t);\n\n\treturn hrb_get_verbiage_values( $verbiages, $type );\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User signup form with link method test.
public function testSignupFormLinkMethod() { $document = $this->createDocument(TRUE, TRUE, [ 'new_users' => [ 'require_method' => 'form_link', ], ]); $this->createDocumentVersion($document, TRUE); $this->drupalGet('user/register'); $this->assertFieldByName('legal_' . $document->id(), NULL, 'Agree checkbox found'); /** @var \Drupal\Core\Url $document_url */ $document_url = $document->toUrl(); $document_path = $document_url->toString(); $this->assertLinkByHref($document_path, 0, 'Link to document found'); // Ensure the field extra field is available for re-ordering. $this->drupalLogin($this->adminUser); $this->drupalGet('admin/config/people/accounts/form-display'); $this->assertText('legal_' . $document->id()); }
[ "public function testCreateSignupPage()\n {\n }", "public function signUpForm()\n {\n \\Http::redirect($this->tplVars['WWW_URL'] . \"index.php#modalSignUp\");\n }", "public function clickOnSignUp()\n {\n $I = $this;\n $I->amonPage(LoginPage::$URL);\n $I->click(LoginPage::$signUp);\n $I->comment(\"Click Succes!\");\n }", "public function testSignup()\n {\n $this->visit('/')\n ->click('Register as Job Seejer')\n ->seePageIs('/register')\n ->see('Register');\n }", "public function sign_up(){\n\t\t \n\t\t//Llamada a la vista\n\t\t$this->view('usuarios/sign_up', []);\n\t}", "public function SignUp()\n\t{\n\t\t\n\t}", "public function signup()\r\n\t{\r\n\t\t$this->setView('new');\r\n\t\t$this->view->set('title', 'Create an account'); \r\n\t\treturn $this->view->output();\r\n\t}", "public function signup_form() {\n $form_elements = array();\n $form_elements[] = $this->form_elements->set_attributes(\"email\");\n $form_elements[] = $this->form_elements->set_attributes(\"password\");\n $form_elements[] = $this->form_elements->set_attributes(\"password\", [\"name\" => \"confirm\", \"id\" => \"confirm\", \"placeholder\" => \"Please confirm Your password\"]);\n $form_elements[] = $this->form_elements->set_attributes(\"submit\");\n $form = new Form($form_elements, './user-signup', \"signup-form\", array(\"email\", \"password\", \"password\"));\n return $form->form_maker();\n }", "public function showSignup()\n {\n //load sign up view\n $this->load->view('signup_form');\n }", "public static function signup() {\n self::render_view('user/signup.html');\n }", "public function testCreateAccountButton() {\n\n $this->visit('/login')\n ->click(trans('login.register_button'))\n ->seePageIs('/register');\n\n }", "public function testRegisterAccountView() {\n $this->visit('/auth/register')\n ->see('form-register');\n }", "public function testRegisterForm()\n {\n $user_created = false;\n\n $name = 'Mr Bean';\n $username = 'MrBean';\n $email_register = 'mr.bean@gmail.com';\n $password_register = 'ABC123doremi29!';\n $password_register_confirmation = $password_register;\n\n $this->browse(function ($browser) use ($name, $username, $email_register, $password_register, $password_register_confirmation) {\n $browser->visit('/login')\n ->type('name', $name)\n ->type('username', $username)\n ->type('emailRegister', $email_register)\n ->type('passwordRegister', $password_register)\n ->type('passwordRegister_confirmation', $password_register_confirmation)\n ->press('Sign me up!')\n ->assertPathIs('/');\n });\n\n $user_found = User::where('username', $username)\n ->where('email', $email_register)\n ->first();\n\n if(isset($user_found)){\n $user_created = true;\n }\n\n $this->assertTrue($user_created);\n\n if($user_created) {\n $this->logout();\n $this->removeUser($user_found->id);\n }\n }", "public function signUp() {\n $areas = $this->userModel->getArea();\n $cities = $this->userModel->getCities();\n $this->view('users/sign_up', $areas, $cities);\n }", "public function signupAction()\n {\n $form = new Application_Form_Signup();\n\n /* set member variables */\n if ($form->isValid($_POST)) {\n $member = new Application_Model_Member();\n $mapper = new Application_Model_MemberMapper();\n $member->setMemberLogin($form->getValue('member_login'));\n $member->setMemberPassword($form->getValue('member_password'));\n $member->setFirstName($form->getValue('first_name'));\n $member->setLastName($form->getValue('last_name'));\n $member->setEmail($form->getValue('email'));\n $member->setBirthday($form->getValue('birthday'));\n $mapper->save($member);\n\n return $this->_helper->redirector('index');\n }\n\n $this->view->form = $form;\n\n }", "public function signup()\n\t{\n\t\t$this->getStatesUrl();\n\t\t\n\t\treturn View::make('users.register_form');\n\t}", "public function testGetSignupPage()\n {\n }", "public function signUpForm(){\n return view(\"auth.signUp\");\n }", "function validate_user_signup()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders table cell with padding.
private function renderCell(array $row, int $column, string $cellFormat): string { $cell = $row[$column] ?? ''; $width = $this->effectiveColumnWidths[$column]; if ($cell instanceof TableCell && $cell->getColspan() > 1) { // add the width of the following columns(numbers of colspan). foreach (range($column + 1, $column + $cell->getColspan() - 1) as $nextColumn) { $width += $this->getColumnSeparatorWidth() + $this->effectiveColumnWidths[$nextColumn]; } } // str_pad won't work properly with multi-byte strings, we need to fix the padding if (false !== $encoding = mb_detect_encoding($cell, null, true)) { $width += \strlen($cell) - mb_strwidth($cell, $encoding); } $style = $this->getColumnStyle($column); if ($cell instanceof TableSeparator) { return sprintf($style->getBorderFormat(), str_repeat($style->getBorderChars()[2], $width)); } $width += Helper::length($cell) - Helper::length(Helper::removeDecoration($this->output->getFormatter(), $cell)); $content = sprintf($style->getCellRowContentFormat(), $cell); $padType = $style->getPadType(); if ($cell instanceof TableCell && $cell->getStyle() instanceof TableCellStyle) { $isNotStyledByTag = !preg_match('/^<(\w+|(\w+=[\w,]+;?)*)>.+<\/(\w+|(\w+=\w+;?)*)?>$/', $cell); if ($isNotStyledByTag) { $cellFormat = $cell->getStyle()->getCellFormat(); if (!\is_string($cellFormat)) { $tag = http_build_query($cell->getStyle()->getTagOptions(), '', ';'); $cellFormat = '<'.$tag.'>%s</>'; } if (str_contains($content, '</>')) { $content = str_replace('</>', '', $content); $width -= 3; } if (str_contains($content, '<fg=default;bg=default>')) { $content = str_replace('<fg=default;bg=default>', '', $content); $width -= \strlen('<fg=default;bg=default>'); } } $padType = $cell->getStyle()->getPadByAlign(); } return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $padType)); }
[ "function GetCellPadding()\n {\n return $this->cMargin;\n }", "protected function generateCell() {\n return \"\";\n }", "public function renderCellLayout()\n {\n $x = $this->oPdf->GetX();\n $y = $this->oPdf->GetY();\n\n //border size BORDER_SIZE\n $this->oPdf->SetLineWidth( $this->getBorderSize() );\n\n if ( !$this->isTransparent() )\n {\n //fill color = BACKGROUND_COLOR\n list ( $r, $g, $b ) = $this->getBackgroundColor();\n $this->oPdf->SetFillColor( $r, $g, $b );\n }\n\n //Draw Color = BORDER_COLOR\n list ( $r, $g, $b ) = $this->getBorderColor();\n $this->oPdf->SetDrawColor( $r, $g, $b );\n\n $this->oPdf->Cell( $this->getCellDrawWidth(), $this->getCellDrawHeight(), '', $this->getBorderType(), 0, '', !$this->isTransparent() );\n\n $this->oPdf->SetXY( $x, $y );\n }", "function table_cell ()\n{\n\tstatic $_defaults = array(\n\t\t'align' => 'left'\n\t\t, 'valign' => 'top'\n\t\t, 'value' => ''\n\t\t, 'allowed' => array('Common','abbr','align','axis','char','charoff'\t\n\t\t\t,'colspan','headers','rowspan','scope','valign','width','height'\t\n\t\t\t,'nowrap','bgcolor'\n\t\t)\n\t);\n\tstatic $_simple = array('value');\n\n\t$p = func_get_args();\n\t$p = parse_arguments($p, $_simple, $_defaults);\n\t$attlist = get_attlist($p);\n\n\tif (is_array($p['value']) or is_object($p['value']))\n\t{\n\t\t$p['value'] = implode('',(array)$p['value']);\n\t}\n\n\t$output = \"\\n <td $attlist>{$p['value']}</td>\\n\";\n\treturn $output;\n}", "private function padCellValue($cell, $columnWidth, $alignment = 'centre')\n\t{\n\t\t$pad = $this->paddingChar;\n\n\t\tswitch ($alignment) {\n\t\t\tcase 'centre':\n\t\t\t\t$padding = $this->calculatePaddingCentre($columnWidth, strlen($cell));\n\t\t\t\tbreak;\n\t\t\tcase 'left':\n\t\t\t\t$padding = $this->calculatePaddingLeft($columnWidth, strlen($cell));\n\t\t\t\tbreak;\t\t\t\n\t\t\tcase 'right':\n\t\t\t\t$padding = $this->calculatePaddingRight($columnWidth, strlen($cell));\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$paddingLeft = str_repeat($pad, $padding[0]);\n\t\t$paddingRight = str_repeat($pad, $padding[1]);\n\t\t\n\t\treturn $paddingLeft . $cell . $paddingRight;\n\t}", "public function renderTable();", "private function renderCell(CellInterface $cell, int $colWidth) : string\n {\n $filler = str_repeat(self::CHAR_CELL_PADDING, ($colWidth - $cell->getWidth()));\n if ($cell->getAlign() == Cell::ALIGN_LEFT) {\n $content = self::CHAR_CELL_PADDING . $cell->getValue() . $filler . self::CHAR_CELL_PADDING;\n } else {\n $content = self::CHAR_CELL_PADDING . $filler . $cell->getValue() . self::CHAR_CELL_PADDING;\n }\n return $content;\n }", "static public function print_cell($cell, $cell_width, $spaces_between, $cell_align, $symbol) {\n $str = \"\";\n $align = '+';\n\n if($cell_align == ITPrint::TPALIGN_LEFT) {\n $align = '-';\n }\n $str .= $symbol[\"vborder\"];\n $str .= sprintf(\"%'\".$symbol['space_between'].(int)($spaces_between / 2).\"s\", \"\");\n if($cell_align != ITPrint::TPALIGN_CENTER) {\n $str .= sprintf(\"%'\".$symbol[\"space\"].$align.$cell_width.\"s\", $cell);\n } else {\n $str .= sprintf(\"%'\".$symbol[\"space\"]. (int)(($cell_width - strlen($cell)) / 2).\"s\", \"\");\n $str .= $cell;\n $str .= sprintf(\"%'\".$symbol[\"space\"]. ($cell_width - strlen($cell) - (int)(($cell_width - strlen($cell)) / 2)).\"s\", \"\");\n }\n $str .= sprintf(\"%'\".$symbol['space_between'].(int)($spaces_between / 2).\"s\", \"\");\n return $str;\n }", "function td(){\r\n\t\treturn \"<td {$this->html_attributes}>{$this->content}</td>\";\r\n\t}", "public function renderTableBody()\r\n\t{\r\n\t\t$data = $this->dataProvider->getData();\r\n\t\t$n = count($data);\r\n\t\techo \"<tr><td><div style='overflow: auto'><table class=\\\"{$this->itemsCssClass}\\\">\\n\";\r\n\r\n\t\tif ($n > 0) {\r\n\t\t\tfor($row=0;$row<$n;++$row)\r\n\t\t\t\t$this->renderTableRow($row);\r\n\t\t}\r\n\t\telse {\r\n\t\t\techo '<tr><td colspan=\"'.count($this->columns).'\">';\r\n\t\t\t$this->renderEmptyText();\r\n\t\t\techo \"</td></tr>\\n\";\r\n\t\t}\r\n\t\techo \"</table></div></td></tr>\\n\";\r\n\t}", "public function testRenderCell()\n {\n $output = $this->view->render('cell', false);\n $this->assertSame('<b>10</b>', $output);\n }", "public function renderFooterCell()\n\t{\n\t\techo CHtml::openTag('td',$this->footerHtmlOptions);\n\t\t$this->renderFooterCellContent();\n\t\techo '</td>';\n\t}", "public function renderCell(Message $message, $cell, Layout $layout = null);", "public function renderFilterCell() {\n return Html::tag('td', '<div class=\"filter-container\">' . $this->filter . '</div>', $this->filterOptions);\n }", "public function renderTableBody() {\n\t\t$data = $this->dataProvider->getData();\n\t\t$n = count($data);\n\t\techo \"<tbody>\\n\";\n\t\tif ($n > 0) {\n\t\t\tfor ($row = 0; $row < $n; ++$row) {\n\t\t\t\tif (isset($data[$row][$this->idFieldName])\n\t\t\t\t\t\t&& isset($data[$row][$this->parentIdFieldName])) {\n\t\t\t\t\t$this->renderTableRowWidthId($row,\n\t\t\t\t\t\t\t$data[$row][$this->idFieldName],\n\t\t\t\t\t\t\t$data[$row][$this->parentIdFieldName]);\n\t\t\t\t} else {\n\t\t\t\t\t$this->renderTableRow($row);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\techo '<tr><td colspan=\"' . count($this->columns) . '\">';\n\t\t\t$this->renderEmptyText();\n\t\t\techo \"</td></tr>\\n\";\n\t\t}\n\t\techo \"</tbody>\\n\";\n\t}", "function table_cell($key, $datum) {\n echo \"<td>$datum</td>\";\n }", "public function renderTableBody()\n\t{\n\t\t$data = $this->dataProvider->getData();\n\t\t$n = count($data);\n\t\techo \"<tbody>\\n\";\n\t\t\n\t\tif ($n > 0) {\n\t\t\tfor ($row = 0; $row < $n; ++$row) {\n\t\t\t\t$this->renderTableRow($row);\n\t\t\t}\n\t\t} else {\n\t\t\techo '<tr><td colspan=\"' . count($this->columns) . '\">';\n\t\t\t$this->renderEmptyText();\n\t\t\techo \"</td></tr>\\n\";\n\t\t}\n\t\techo \"</tbody>\\n\";\n\t}", "function format_table_cell($val,$data,&$align,&$comment,&$class) {\n\t$dval = array_key_exists($val,$data) ? str_replace(\"\\r\",\"\",$data[$val]) : \"\";\n\tif ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/\", $dval, $regs))) {\n\t\t$output = date(\"d M Y\",strtotime($dval)); /* DD Mmm YYYY */\n\t\t$comment = substr($dval,11,10);\n\t} else if ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}).([0-9]{3})Z/\", $dval, $regs))) {\n\t\t$output = sprintf(\"%s/%s %s:%s\",$regs[3],$regs[2],$regs[4],$regs[5],$regs[6]);\n\t} else if ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})/\", $dval, $regs))) {\n\t if (date(\"Y-m-d\") == substr($dval,0,10)) {\n\t\t// Date Field (Today)\n \t\t$output = substr($dval,11,10);\n\t } else {\n\t\t// Date Field (Not Today)\n\t\tswitch ($val) {\n\t\t\tcase \"EventTime\":\n\t\t\tcase \"Updated\":\n\t\t\tcase \"allocated\":\n\t\t\tcase \"AcctStartTime\":\n\t\t\t\t$output = sprintf(\"%s/%s %s:%s\",$regs[3],$regs[2],$regs[4],$regs[5],$regs[6]);\n\t\t\t\tbreak;\n\t\t\tcase \"released\":\n\t\t\tcase \"AcctStopTime\":\n\t\t\t\t$output = substr($dval,11,5);\n\t\t\t\tbreak;\n \t\t\tdefault: \n\t\t\t\t// $output = substr($dval,0,10); /* YYYY-MM-DD */\n\t\t\t\t$output = date(\"d M Y\",strtotime($dval)); /* DD Mmm YYYY */\n\t\t\t\t$comment = substr($dval,11,10);\n\t\t}\n\t }\n\t $this->total[$val]=0;\n\t} else if ((!empty($dval)) and (preg_match(\"/([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}/\",$dval, $regs))) {\n\t\t// IPv4 Address\n\t\t$align=\"center\";\n\t\t$output = $dval;\n\t} else if ((isset($dval)) and ($dval<>\".\") and ($dval<>\",\") and (preg_match(\"/(^[$|-]*[0-9|,|.]+$)/\",$dval, $regs))) {\n\t\t// Numeric Field\n\t\tif (!isset($this->total[$val])) $this->total[$val]=0;\n\t\t$number = str_replace(\",\",\"\",str_replace(\"$\",\"\",$dval));\n\t\t$this->total[$val] += $number;\n\t\tswitch ($val) {\n\t\t\tcase \"AcctSessionTime\":\n\t\t\t\t$align = \"right\";\n\t\t\t\t$output=TimeStr($dval);\n\t\t\t\tbreak;\n\t\t\tcase \"AcctOutputOctets\":\n\t\t\tcase \"AcctInputOctets\":\n\t\t\t\t$output=ByteStr($dval);\n\t\t\t\tbreak;\n \t\t\tdefault: \n\t\t\t\t$align=\"right\";\n\t\t\t\tif (array_key_exists($val,$this->format)) {\n\t\t\t\t\tif ($fmat=$this->format[$val]) $output = money_fmat($fmat,$number);\n\t\t\t\t\telse $output=$dval;\n\t\t\t\t} else {\t\n\t\t\t\t\tif (strpos($number,\".\")) $output = number_format($number,2);\n\t\t\t\t\telse switch($val) {\n\t\t\t\t\t\tcase \"MerchantID\":\n\t\t\t\t\t\tcase \"Mobile\":\n\t\t\t\t\t\tcase \"WorkPhone\":\n\t\t\t\t\t\tcase \"HomePhone\":\n\t\t\t\t\t\tcase \"Fax\":\n\t\t\t\t\t\tcase \"PostCode\":\t// don't format these columns\n\t\t\t\t\t\t\t$output=$dval;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$output = number_format(floatval($number));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$vval = \" $val\";\n\t\t\t\tif (strpos($vval,\"time\") or strpos($vval,\"date\")) $comment = @date(\"Y-m-d H:i:s\",$number);\n\t\t}\n\t} else { \n\t\t// Normal Field\n\t\t$output = $dval;\n\t}\n\n\t$output = str_replace(\"(TEST TRANSACTION ONLY)\",\"<b>(TEST)</b>\",$output);\n\n\treturn $output;\n }", "function mpDisplayCellNW( $tag, $class, $value, $encode )\n {\n #\n # Table cell. Normal display\n # table constructor - set cell text font, colour, background colour\n #\n if ( $encode )\n $value = htmlspecialchars( $value );\n #\n if ( $value == \"\")\n\t $value = \"&nbsp;\";\n printf ( \"<$tag class=\\\"%s\\\">&nbsp;$value&nbsp;</$tag>\\n\", $class );\n #\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test if throws an exception if an unsupported algorithm is given.
public function testIfThrowsAnExceptionForUnsupportedAlgos() { new HashKey('unsupported'); }
[ "public function testCheckingForUnsupportedAlgorithm()\n {\n $this->assertFalse(Algorithms::has('foo'));\n }", "public function testUnsupportedAlgorithm()\n {\n $this->expectException(Exception::class);\n new Ubiq\\Algorithm('unsupported-algorithm');\n }", "public function testInvalidAlgorithm()\n {\n try {\n $encoded = JWT::encode(['foo' => 'bar'], 'secret', 'RS256'); // unsupported algo\n } catch (\\Throwable $e) {\n $this->assertTrue(false !== strpos($e->getMessage(), 'Only these algorithm are supported:'));\n } catch (\\Exception $e) {\n $this->assertTrue(false !== strpos($e->getMessage(), 'Only these algorithm are supported:'));\n }\n }", "public function test_validating_with_unsupported_algorithm(): void\n {\n $header = Base64Url::encode(json_encode(['typ' => 'JWT', 'alg' => 'XYZ']));\n $payload = Base64Url::encode(json_encode([]));\n $signature = Base64Url::encode('signature');\n\n $token = sprintf('%s.%s.%s', $header, $payload, $signature);\n $key = ']V@IaC1%fU,DrVI';\n\n $this->expectException(UnsupportedAlgorithmException::class);\n $tokenEncoded = new TokenEncoded($token);\n $tokenEncoded->validate($key);\n }", "public function testCheckingForSupportedAlgorithm()\n {\n foreach (Algorithms::getAll() as $algorithm) {\n $this->assertTrue(Algorithms::has($algorithm));\n }\n }", "public static function checkAlgorithmSupported(string $algorithm)\n {\n if (strtolower($algorithm) === 'none') {\n throw new InsecureTokenException('Unsecure token are not supported: none algorithm provided');\n }\n \n if (! array_key_exists($algorithm, JWT::ALGORITHMS)) {\n throw new UnsupportedAlgorithmException('Invalid algorithm');\n }\n }", "public function testSetAlgorithmFailure(): void\n {\n $bag = Bag::create($this->tmpdir);\n $bag->addAlgorithm('sha1');\n $bag->addAlgorithm('SHA-224');\n $this->assertArrayEquals(['sha512', 'sha1', 'sha224'], $bag->getAlgorithms());\n $this->expectException(BagItException::class);\n $this->expectExceptionMessage(\"Algorithm bad-algorithm is not supported.\");\n $bag->setAlgorithm(\"bad-algorithm\");\n }", "public static function hasAlgorithm($algorithm) {}", "public function test_encoding_with_incorrect_key_format_for_given_algorithm() : void\n {\n $this->expectException(SigningFailedException::class);\n \n $key = ']V@IaC1%fU,DrVI';\n \n $exception = false;\n\n $tokenDecoded = new TokenDecoded(['alg' => JWT::ALGORITHM_RS256], []);\n $tokenEncoded = $tokenDecoded->encode($key);\n }", "public function test_building_encoded_token_with_missing_algorithm(): void\n {\n $header = Base64Url::encode(json_encode(['typ' => 'JWT']));\n $payload = Base64Url::encode(json_encode([]));\n $signature = Base64Url::encode('signature');\n \n $token = sprintf('%s.%s.%s', $header, $payload, $signature);\n \n $this->expectException(UndefinedAlgorithmException::class);\n new TokenEncoded($token);\n }", "public function testIncorrectMethod()\n {\n $this->specify('Throws exception about incorrect method.', function () {\n $this->expectException(InvalidArgumentException::class);\n $cipher = new CipherDES(998);\n });\n }", "public function algorithmIsSupported(string $algorithm): bool\n {\n $internal_name = $this->getHashName($algorithm);\n return $this->hashIsSupported($internal_name);\n }", "public function encryptionCryptGetSetHashAlgoUnknown(UnitTester $I)\n {\n $I->wantToTest('Encryption\\Crypt - setHashAlgorithm() - unknown');\n $I->expectThrowable(\n new Exception(\n \"The hash algorithm 'xxx-yyy-zzz' is not supported on this system.\"\n ),\n function () {\n $crypt = new Crypt();\n\n $crypt->setHashAlgorithm('xxx-yyy-zzz');\n }\n );\n }", "public function testModeWithUnsupportedMode()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->createExpression()->setMode('foobar');\n }", "function hash_check(string $algorithm = null): string\n{\n // check algorithm\n if ($algorithm === null || // not defined\n array_search($algorithm, hash_algos(), true) === false) {\n $algorithm = array_search('sha256', hash_algos(), true) ? 'sha256' : current(hash_algos());\n }\n\n if (!$algorithm) {\n return false;\n }\n\n return $algorithm;\n}", "public function cryptGetSetHashAlgoUnknown(UnitTester $I)\n {\n $I->wantToTest('Crypt - setHashAlgo() - unknown');\n $I->expectThrowable(\n new Exception(\n 'The hash algorithm \"xxx-yyy-zzz\" is not supported on this system.'\n ),\n function () {\n $crypt = new Crypt();\n\n $crypt->setHashAlgo('xxx-yyy-zzz');\n }\n );\n }", "public function testFailAuthorizationOnInvalidCredentialsAlgorithm()\n {\n $credentialsFunc = $this->credentialsFunc;\n\n $credentialsFunc('123456', function ($err = null, $credentials1 = null) use ($credentialsFunc) {\n $this->assertNull($err);\n\n $options = [\n 'credentials' => $credentials1\n ];\n\n $auth = Client::message('example.com', 8080, 'some message', $options);\n $this->assertNotEmpty($auth);\n\n $errFunc = function ($id, $callback) {\n $callback(null, ['key' => '123', 'algorithm' => '456']);\n };\n\n Server::authenticateMessage('example.com', 8080, 'some message', $auth, $errFunc, [], function ($err = null, $credentials2 = null) {\n $this->assertNotNull($err);\n $this->assertEquals('Unknown algorithm', $err->getMessage());\n });\n });\n }", "public static function isAlgSupported(string $algorithm): bool\n {\n return (bool) \\in_array($algorithm, self::getSupportedAlgs(), true);\n }", "public function testValidationCaseForSettingAnInvalidCipherOutputFormat()\n {\n $crypter = $this->getAsymmetricEncryptionAlgorithmInstanceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $crypter->setCipherFormat(['wrong']);\n } else {\n $hasThrown = null;\n\n try {\n $crypter->setCipherFormat(['wrong']);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Form for transferring an email from one question to another
function vopros_email_transfer_form($form, &$form_state, $email) { // Don't allow transfering emails that doesn't belong to a question. if (!$email->question_id) { $form['message'] = array( '#markup' => t('This email cannot be transferred'), ); return $form; } // Ensure this include file is loaded when the form is rebuilt from the cache. $form_state['build_info']['files']['form'] = drupal_get_path('module', 'vopros_question') . '/includes/vopros_question.admin.inc'; module_load_include('inc', 'vopros_question', 'includes/vopros_question.admin'); $question = vopros_question_new(array( 'question_title' => $email->subject, 'question_content' => $email->email_content, 'user_email' => $email->email, 'channel' => 'mail', )); $form = vopros_question_question_form($form, $form_state, $question); $form['email'] = array( '#type' => 'value', '#value' => $email, ); $form['#validate'] = array('vopros_question_question_form_validate'); $form['#submit'] = array('vopros_question_question_form_submit', 'vopros_email_transfer_form_submit'); return $form; }
[ "public function MailForm(){\n\n\t\tif (JRequest::getCmd('task') == 'recommend' ) {\n\n\t\t\t/*OSP 2012-03-14 ...Track #375; allowed by setting */\n\t\t\tif (rsConfig::get('recommend_unauth', 0) == '0')\n\t\t\t{\n\t\t\t\t$user = JFactory::getUser();\n\t\t\t\tif (empty($user->id))\n\t\t\t\t{\n\t\t\t\t\trsInfo(RText::_('YOU MUST LOGIN FIRST'));\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$view = $this->getView('recommend', 'html');\n\t\t} else {\n\t\t\t$view = $this->getView('askquestion', 'html');\n\t\t}\n\n\t\t/* Set the layout */\n\t\t$view->setLayout('form');\n\n\t\t// Display it all\n\t\t$view->display();\n\t}", "public function _replyToSendFormEmail() {\n \n if ( self::$_bDoneEmail ) {\n return;\n }\n self::$_bDoneEmail = true;\n\n $_sTransient = isset( $_GET['transient'] ) ? $_GET['transient'] : '';\n if ( ! $_sTransient ) {\n return;\n }\n $_aFormEmail = $this->oUtil->getTransient( $_sTransient );\n $this->oUtil->deleteTransient( $_sTransient );\n if ( ! is_array( $_aFormEmail ) ) {\n return;\n }\n\n $_oEmail = new AdminPageFramework_FormEmail( \n $_aFormEmail['email_options'], \n $_aFormEmail['input'], \n $_aFormEmail['section_id'] \n );\n $_bSent = $_oEmail->send();\n\n exit;\n \n }", "function bibdk_modal_heimdal_write_email_form() {\n $form_state = _bibdk_modal_set_form_state();\n\n $output = bibdk_modal_form_wrapper('bibdk_heimdal_verify_email_form', $form_state);\n\n $commands = array();\n if (empty($form_state['executed']) && empty($form_state['submitted'])) {\n $commands = $output;\n }\n elseif (empty($form_state['executed']) && !empty($form_state['submitted'])) {\n $commands[] = bibdk_modal_command_replace_form($output);\n }\n elseif (!empty($form_state['executed']) && !empty($form_state['submitted'])) {\n $commands[] = bibdk_modal_command_reload();\n $commands[] = bibdk_modal_command_dismiss();\n }\n\n bibdk_modal_deliver_output($commands);\n}", "public function sendApprovalEmail($form);", "function fileshare_reply_form_submit(&$form, &$form_state) {\n $fileshare = entity_ui_controller('fileshare')->entityFormSubmitBuildEntity($form, $form_state);\n\n // Apply the new send time\n $fileshare->date_sent = time();\n\n // Apply new read status\n $fileshare->status = 0;\n\n $cc = explode(',', $form_state['values']['carbon']);\n\n $copied = array();\n // Trim the whitespace from all entered email addresses\n foreach ($cc as $index => $email) {\n $email = trim($email);\n if (!empty($email)) {\n $copied[$index] = $email;\n }\n }\n\n $fileshare->data['cc'] = $copied;\n\n fileshare_save($fileshare);\n $form_state['redirect'] = 'messages/inbox';\n}", "public function submit_send_email_my_broker_form(){\r\n\t\tif(($_POST['fcapi'] == \"sendemailmybrokersubmit\")){\r\n\t\t\tglobal $db, $cm, $frontend, $sdeml;\r\n\t\t\t$this->loggedin_consumer_icon_permission(1);\r\n\t\t\t$lno = round($_POST[\"lno\"], 0);\r\n\t\t\t$subject = $_POST[\"subject\"];\r\n\t\t\t$message = $_POST[\"message\"];\r\n\t\t\t$sendmecopy = round($_POST[\"sendmecopy\"], 0);\r\n\t\t\t$email2 = $_POST[\"email2\"];\r\n\t\t\t\r\n\t\t\tif ($sendmecopy != 1){ $sendmecopy = 2; }\r\n\r\n\t\t\t$result = $this->check_yacht_with_return($lno, 1);\r\n\t\t\t$row = $result[0];\r\n\t\t\tforeach($row AS $key => $val){\r\n\t\t\t\t${$key} = $cm->filtertextdisplay($val);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//create the session\r\n\t\t\t$datastring = $cm->session_field_contact_my_broker();\r\n\t\t\t$cm->create_session_for_form($datastring, $_POST);\r\n\t\t\t//end\t\r\n\t\t\t\r\n\t\t\t//field data checking\r\n\t\t\t$red_pg = $cm->folder_for_seo . \"pop-send-email-my-broker/?lno=\" . $lno;\r\n\t\t\t$cm->field_validation($subject, '', 'Subject', $red_pg, '', '', 1, 'fr_');\r\n\t\t\t$cm->field_validation($message, '', 'Message', $red_pg, '', '', 1, 'fr_');\r\n\t\t\tif ($email2 != \"\"){\r\n\t\t\t\theader('Location: ' . $cm->get_page_url(0, \"popsorry\"));\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t//end\r\n\t\t\t\r\n\t\t\t$cm->delete_session_for_form($datastring);\r\n\t\t\t$message = nl2br($message);\r\n\t\t\t\r\n\t\t\t$loggedin_member_id = $this->loggedin_member_id();\r\n\t\t\t$user_det = $cm->get_table_fields('tbl_user', 'concat(fname, \" \", lname) as fullname, email', $loggedin_member_id);\r\n\t\t\t$femail = $user_det[0]['email'];\r\n\t\t\t$fullname = $user_det[0]['fullname'];\r\n\t\t\t\r\n\t\t\t$my_broker_id = $cm->get_common_field_name('tbl_user_to_broker', 'broker_id', $loggedin_member_id, 'user_id');\r\n\t\t\t$user_det = $cm->get_table_fields('tbl_user', 'email', $my_broker_id);\r\n\t\t\t$stemail = $user_det[0]['email'];\r\n\t\t\t\r\n\t\t\t$mail_fm = $cm->admin_email();\r\n\t\t\t$mail_to = $cm->filtertextdisplay($stemail);\r\n\t\t\t$mail_cc = \"\";\r\n\t\t\t$mail_reply = $cm->filtertextdisplay($femail);\r\n\t\t\tif ($sendmecopy == 1){ $mail_cc = $mail_reply; }\r\n\r\n\t\t\t$sdeml->send_email($mail_fm, $mail_to, $mail_cc, $mail_bcc, $mail_reply, $subject, $message, $cm->site_url, $news_footer_u, $attachfile);\t\t\r\n\t\t\t\r\n\t\t\t$_SESSION[\"thnk\"] = $frontend->display_message(16);\r\n\t\t\theader('Location: ' . $cm->get_page_url(0, \"popthankyou\"));\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "function vopros_sms_question_contact_form_submit(&$form, &$form_state) {\n $v = $form_state['values'];\n $question = $v['question'];\n $sms = vopros_sms_new(array(\n 'question_id' => $question->question_id,\n 'uid' => $GLOBALS['user']->uid,\n 'content' => $v['content'],\n 'phone_number' => $v['phone_number'],\n ));\n vopros_sms_save($sms);\n if ($sms->status != 'sent') {\n vopros_sms_send($sms);\n $sms->status = 'sent';\n vopros_sms_save($sms);\n }\n $question->question_status = 'closed';\n $question->question_status_reason = $v['reason'];\n $question->save();\n drupal_set_message(t('The SMS has been sent to @receiver and the question is closed until the user provides feedback', array('@receiver' => $sms->phone_number)), 'warning');\n $form_state['redirect'] = 'admin/vopros/questions';\n}", "function forena_confirm_email($formid, &$form_state, $docs, $count, $prompt_subject, $prompt_body) {\n // Make sure user has permission for email merge.\n if (!user_access('perform email merge')) {\n drupal_access_denied();\n exit();\n }\n // Save arguments away for rebuild\n if (!isset($form_state['storage']['args'])) {\n $form_state['storage']['args'] = array(\n 'docs' => $docs,\n 'count' => $count,\n 'prompt_subject' => $prompt_subject,\n 'prompt_body' => $prompt_body,\n );\n }\n else {\n // Retrieve arguements for rebuild case\n extract($form_state['storage']['args']);\n }\n if ($docs) {\n $values = @$form_state['values'];\n if ($prompt_subject) {\n $form['subject'] = array(\n '#type' => 'textfield',\n '#title' => t('Subject'),\n '#default_value' => @$values['subject'],\n\n );\n }\n\n if ($prompt_body) {\n $form['body'] = array(\n '#type' => 'text_format',\n '#title' => t('Message'),\n '#default_value' => @$values['body'],\n '#format' => variable_get('forena_email_input_format', filter_default_format())\n\n );\n }\n\n\n if (!variable_get('forena_email_override', FALSE)) {\n $form['send'] = array(\n '#type' => 'radios',\n '#title' => t('Send Email'),\n '#options' => array('send' => 'email to users',\n 'test' => 'emails to me (test mode)'),\n '#default_value' => 'test',\n );\n }\n $form['max'] = array(\n '#type' => 'textfield',\n '#title' => 'Only send first',\n '#description' => 'In test mode only, limits the number of messages to send',\n '#default_value' => 1,\n '#size' => 3,\n );\n\n $form_state['storage']['docs'] = $docs;\n $form_state['storage']['count'] = $count;\n }\n return confirm_form($form, t('Send mail to users'), 'forena', t('Send email to %count users?', array('%count' => $count)));\n}", "function airui_form_install_configure_submit($form, FormStateInterface $form_state) {\n $site_mail = $form_state->getValue('site_mail');\n ContactForm::load('feedback')->setRecipients([$site_mail])->trustData()->save();\n}", "public function getChangeEmailForm();", "public function emailEnviarAction() {\n\n parent::noTemplate();\n\n $aDados = $this->getRequest()->getParams();\n $oForm = new Contribuinte_Form_NotaEmail();\n $oForm->populate($aDados);\n\n $this->view->form = $oForm;\n }", "public function replyEnquirySubmit() {\n if (isset($this->post['submit'])) {\n $enquiry = $this->enquiriesTable->retrieveRecord('id', $this->get['id'])[0];\n\n $errors = [];\n\n if ($this->post['reply']['message'] == '')\n $errors[] = 'Your message cannot be blank.';\n \n if (count($errors) == 0) {\n $this->post['reply']['message'] = htmlspecialchars(strip_tags($this->post['reply']['message']), ENT_QUOTES, 'UTF-8');\n \n $this->enquiryRepliesTable->save($this->post['reply']);\n \n $enquiryValues = [\n 'id' => $enquiry->id,\n 'answered' => 1\n ];\n\n $this->enquiriesTable->save($enquiryValues);\n \n $template = 'admin/replysuccess.html.php';\n\n $variables = [\n 'enquiry' => $enquiry\n ];\n }\n else {\n $template = 'admin/reply.html.php';\n\n $variables = [\n 'errors' => $errors,\n 'enquiry' => $enquiry\n ]; \n }\n }\n\n return [\n 'layout' => 'sidebarlayout.html.php',\n 'template' => $template,\n 'variables' => $variables,\n 'title' => 'Admin Panel - Enquriries - Reply'\n ];\n }", "private function sendCopy() {\r\n $data = $this->_contactform->getValues();\r\n\r\n $viewParam = array(\r\n 'domain' => $_SERVER['SERVER_NAME'],\r\n 'email' => $data['contactform_email'],\r\n 'subject' => $data['contactform_subject'],\r\n 'message' => nl2br(htmlentities($data['contactform_message']))\r\n );\r\n\r\n $mail = new Portfolio_HtmlTemplateMailer();\r\n $mail->setSubject($data['contactform_subject'])\r\n ->addTo($data['contactform_email'], $data['contactform_name'])\r\n ->setViewParam($viewParam)\r\n ->sendHtmlTemplate('contact_copy.phtml');\r\n }", "function Create_Email_Form ($action,$from, $nam){\n\n\n\t$emailForm = <<<F1\n\t<form method=\"POST\" action=\"$action\" enctype=\"multipart/form-data\">\n <div align=\"center\">\n <table border=\"0\" width=\"500\" style=\"border-width: 0; border-style: solid\" align=\"center\">\n <tr>\n <td colspan=\"2\"><b>From</b></td>\n </tr>\n <tr>\n <td width=\"100\"> E-Mail : </td>\n <td>\n \t<input type=\"text\" name=\"emailfr\" value=\"$from\" style=\"width: 100%; text-align: left\">\n </td>\n </tr>\n <tr>\n <td width=\"100\"> Name : </td>\n <td><input type=\"text\" name=\"namefr\" value=\"$nam\" style=\"width: 100%; text-align: left\"></td>\n </tr>\n <tr><td colspan=\"2\">CC to Self &nbsp;&nbsp;&nbsp;&nbsp;<input type=\"checkbox\" name=\"cc\" value=\"Y\" checked> Yes </td></tr>\n <tr height=\"30\"><td colspan=\"2\"></td></tr>\n <tr>\n <td colspan=\"2\"><b>To</b></td>\n </tr>\n <tr>\n <td width=\"100\"> E-Mail : </td>\n <td><input class=\"left\" type=\"text\" name=\"emailto\" style=\"width: 100%\"></td>\n </tr>\n <tr>\n <td width=\"100\"> Name : </td>\n <td><input type=\"text\" name=\"nameto\" style=\"width: 100%; text-align: left\"></td>\n </tr>\n <tr>\n <td width=\"100\"> Subject : </td>\n <td><input type=\"text\" name=\"subjectfr\" style=\"width: 100%; text-align: left\"></td>\n </tr>\n <tr>\n <td width=\"100\"> Message : </td>\n <td><textarea name=\"message\" cols=\"60\" rows=\"8\"></textarea></td>\n </tr>\n <tr>\n <td nowrap>\n Attachment :\n </td>\n <td>\n \t<input type=\"file\" size=\"50\" name=\"attachment\">\n </td>\n </tr>\n <tr><td> \n Email Format </td><td>\n <input type=\"checkbox\" name=\"html\" value=\"Y\" checked>HTML &nbsp;&nbsp;&nbsp;\n\t<input type=\"checkbox\" name=\"text\" value=\"Y\">Text\n </table>\n\t<br>\n <p><input type=\"button\" value=\"Back\" name=\"back\" style=\"width: 100px\" onClick=\"history.go(-1);\">\n <input type=\"reset\" value=\"Clear\" name=\"clear\" style=\"width: 100px\">\n <input type=\"submit\" value=\"Send\" name=\"send\" style=\"width: 100px\"></p><p>&nbsp;</p>\n \n </div>\n\n</form>\nF1;\n\n\techo $emailForm;\n}", "public function sendContactFormEmailToRecipient(ContactFormSubmission $cfSubmission)\n {\n try\n {\n $recipient = $cfSubmission->getRecipient();\n $purpose = \"youReceivedFromContactForm\";\n \n if(!$recipient)\n {\n $args = $this->mailoolBox->mainRecipientPublisher;\n $recipient = new StoredPublisher([\"name\"=>$args[\"Name\"],\"email\"=>$args[\"Email\"]]);\n $cfSubmission->setRecipient($recipient);\n }\n \n $messageFromForm = $cfSubmission->getMessage();\n $contactFormSender = $cfSubmission->getSender();\n $toolbox = $this->mailoolBox;\n $storedMessage =$this->getPurposedEmail($purpose);\n $mailSender = new KMailSender($toolbox);\n $testFormat = file_get_contents(dirname(__FILE__).'/templateFormats/'.$purpose.'_en.html');\n $tokenFacade = KTokenFacade::create();\n $code = $tokenFacade->createCode($contactFormSender);\n \n $template = new KMailTemplate(\"Heart mind equation\", $testFormat);\n \n $toolbox->logTool->log(\"the following is the message from the form\");\n $toolbox->logTool->showVDump($messageFromForm);\n\n $toolbox->logTool->showVDump($storedMessage);\n $toolbox->logTool->log(\"the following is a purposed message\");\n\n $messageParams = [\"sender\"=>$storedMessage->getAuthorEmail()//$contactFormSender->getEmail()\n ,\"subject\"=>$storedMessage->getTitle() \n ,\"content\"=>$storedMessage->getContent()\n ,\"payLoad\"=>$cfSubmission->getContent()\n ,\"recipientName\"=>$recipient->getName()\n ,\"recipientEmail\"=>$recipient->getEmail() \n ,\"membershipId\"=>$code\n ,\"sourceHost\"=> $toolbox->sourceHost\n ];\n\n \n $toolbox->logTool->log(\"the following is the message params\");\n $toolbox->logTool->showVDump($messageParams);\n\n \n $message = new ExtendedKMailMessage($messageParams,$template);\n \n\n $finalRecipientList = array_merge( $toolbox->itRecipientList,[ $this->mailoolBox->mainRecipientPublisher]);\n $status = $mailSender->sendEMail($finalRecipientList , $message);\n $toolbox->logTool->showVDump($status);\n $toolbox->logTool->log(\"<h1>---------------the staus</h1>\");\n\n\n\n $statusIsGood =isset($status->Messages);\n if(!$statusIsGood)\n {\n throw new \\Exception(\"Mezanmi, ket, the '\".$purpose .\"' message failed check log to get more details\");\n }\n \n \n return 1;// $status;\n }\n catch(\\Exception $ex)\n {\n\n $this->mailoolBox->logTool->showVDump($ex);\n throw $ex;\n }\n \n }", "function pdfbulletin_sendtest_form_submit($form, &$form_state) {\n $subscriptions = array();\n\n $emails = explode(\"\\n\", $form_state['values']['subscribers']);\n foreach ($emails as $email) {\n $email = trim($email);\n if (!empty($email) && valid_email_address($email)) {\n $subscriptions[$email] = $email;\n }\n }\n \n $node = $form_state['values']['node'];\n $pdfbulletin = $node->pdfbulletin;\n $pdfbulletin->subscribers = $subscriptions;\n pdfbulletin_send_email($pdfbulletin, $node);\n\n drupal_set_message('Test message sent.');\n // @todo make this more redirect friendly\n drupal_goto('/pdfbulletin/' . $pdfbulletin->id . '/subscribers');\n}", "public function change_email_form() {\n if ($this->checkLogin('D') == '') {\n redirect('driver');\n } else {\n\n if ($this->lang->line('dash_change_email_address') != '')\n $dash_change_email_address = stripslashes($this->lang->line('dash_change_email_address'));\n else\n $dash_change_email_address = 'Change Email Address';\n\t\t\t$this->data['sideMenu'] = 'email';\n $this->data['heading'] = $dash_change_email_address;\n $this->load->view('driver/driversettings/change_email', $this->data);\n }\n }", "function worx_social_review_email_form_submit($form, $form_state) {\n $params = array();\n $params['body'] = $form_state['values']['email_body']['value'];\n $from = $form_state['values']['email_from'];\n $to = $form_state['values']['email_to'];\n $body = str_replace(\n $search = array(\n '[google]',\n '[yahoo]',\n '[bing]',\n '[yp]',\n '[foursquare]',\n '[urbanspoon]',\n '[ta]',\n ),\n $replace = array(\n variable_get('worx_social_review_google_link', 'Error: No link. Please contact site administrator.'),\n variable_get('worx_social_review_yahoo_link', 'Error: No link. Please contact site administrator.'),\n variable_get('worx_social_review_bing_link', 'Error: No link. Please contact site administrator.'),\n variable_get('worx_social_review_yp_link', 'Error: No link. Please contact site administrator.'),\n variable_get('worx_social_review_foursquare_link', 'Error: No link. Please contact site administrator.'),\n variable_get('worx_social_review_urban_spoon_link', 'Error: No link. Please contact site administrator.'),\n variable_get('worx_social_review_ta_link', 'Error: No link. Please contact site administrator.'),\n ),\n $subject = $params['body']\n );\n $subject = $form_state['values']['email_subject'];\n $message = array(\n 'key' => 'worx_social_review',\n 'to' => $to,\n 'from' => $from,\n 'subject' => $subject,\n 'body' => $body,\n 'headers' => array(\n 'From' => $from,\n 'Sender' => $from,\n 'Return-Path' => $from,\n ),\n );\n $dupe = $message;\n $message = mimemail_prepare_message($message);\n mimemail_mailengine('send', $message);\n $dupe['to'] = 'reviews@worxco.net';\n $dupe = mimemail_prepare_message($dupe);\n mimemail_mailengine('send', $dupe);\n drupal_set_message('Email successfully sent to ' . $form_state['values']['email_to']);\n}", "public function multi_contact_form(){\n\t $this->form = new ContactForm;\n\t /**\n\t * we have to over write the form_prefix value while passing in to create a new post namespace to avoid\n\t * conflicts.\n\t */\n\t $this->form2 = new ContactForm(false, false, array('form_prefix'=>'test_form'));\n\t //we only redirect when both forms validate but error on either\n if($this->form->save() && $this->form2->save()){ \n $data = $this->form->results();\n $this->redirect_to(\"/thanks/\".$data['name']);\n\t } \n $this->use_view = \"new-contact-form\";\n\t }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Format a param doclet as a string.
public function formatParam(array $doclet): string { $name = $doclet['name']; $isOptional = $doclet['optional'] ?? false; $isVariable = $doclet['variable'] ?? false; $isNullable = $doclet['nullable'] ?? false; $default = $doclet['defaultvalue'] ?? null; $type = array_key_exists('type', $doclet) ? $this->formatType($doclet['type']) : 'array'; if ($isVariable) { $type = explode('[]', $type)[0]; return "{$type} ...\${$name}"; } $isArray = $type === 'array' || substr($type, -strlen('[]')) === '[]'; $isString = $type === 'string'; $type = $isNullable ? $type.'|null' : $type; $default = is_null($default) ? 'null' : ($isString ? "'{$default}'" : $default); $suffix = $isOptional ? (' = '.($isArray ? '[]' : $default)) : ''; return "{$type} \${$name}{$suffix}"; }
[ "private function _formatParameter(ReflectionParameter $param)\n {\n $res = '';\n $parts = array();\n if ($class = $param->getClass()) {\n $res = '<{cyan>' . $class->getName() . '<}> ';\n }\n if ($param->isPassedByReference()) {\n $res .= '<{red>&<}>';\n }\n $res .= '<{blue>$' . $param->getName() . '<}>';\n return $res;\n }", "public function renderMethodParam($param,$indent=0,$wrap=78)\n\t{\n\t\t$content=$this->processHtml($param->description);\n\t\t$content=\"[$param->name] ($param->type) \".$content;\n\t\t$content=$this->wrapindent($content,$indent,$wrap);\n\t\t$content=$this->postProcessPretags($content);\n\t\treturn $content;\n\t}", "public function getParamAnnotation()\n {\n $str = ' * @param %s %s';\n\n return sprintf($str, $this->getClassName(), $this->getVariableName());\n }", "public function renderMethodParam($param,$indent=0,$wrap=78)\n {\n $content=$this->processMarkdown($param->description);\n $content=\"[$param->name] ($param->type) \".$content;\n $content=$this->wrapindent($content,$indent,$wrap);\n return $content;\n }", "protected function generateParamDocblock() {\n\t\t$docblock = $this->getDocblock();\n\t\t$tags = $docblock->getTags('param');\n\t\tforeach ($this->parameters as $param) {\n\t\t\t$ptag = $param->getDocblockTag();\n\t\t\t\t\n\t\t\t$tag = $tags->find($ptag, function(ParamTag $tag, ParamTag $ptag) {\n\t\t\t\treturn $tag->getVariable() == $ptag->getVariable();\n\t\t\t});\n\t\t\t\t\t\n\t\t\t// try to update existing docblock first\n\t\t\tif ($tag !== null) {\n\t\t\t\t$tag->setDescription($ptag->getDescription());\n\t\t\t\t$tag->setType($ptag->getType());\n\t\t\t}\n\t\t\t\t\n\t\t\t// ... append if it doesn't exist\n\t\t\telse {\n\t\t\t\t$docblock->appendTag($ptag);\n\t\t\t}\n\t\t}\n\t}", "public function to_param(){\n\t\treturn $this->to_s();\n\t}", "protected function generateParamDocblock(): void\n {\n $docblock = $this->getDocblock();\n $tags = $docblock->getTags('param');\n foreach ($this->parameters as $param) {\n $ptag = $param->getDocblockTag();\n\n $tag = $tags->find($ptag, function (ParamTag $tag, ParamTag $ptag): bool {\n return $tag->getVariable() == $ptag->getVariable();\n });\n\n // try to update existing docblock first\n if (null !== $tag) {\n $tag->setDescription($ptag->getDescription());\n $tag->setType($ptag->getType());\n }\n\n // ... append if it doesn't exist\n else {\n $docblock->appendTag($ptag);\n }\n }\n }", "protected function getFormat(): ParamFormat\n {\n return new class extends AbstractParamFormat {\n public const TYPE_CLASS = StringParameter::class;\n public function getValidationRules(): array\n {\n return [];\n }\n public function __toString(): string\n {\n return parent::__toString();\n }\n };\n }", "protected function generateForParam(ReflectionParameter $param): string\n {\n $name = $param->name;\n $type = $param->getType();\n $type = $this->normalizeType($type);\n\n return $type ? \"$type $$name\" : $name;\n }", "function params_source_to_doc($type_spec)\n{\n\tstatic $zend_params = array(\n\t\t\"l\" => \"int\",\n\t\t\"d\" => \"float\",\n\t\t\"s\" => \"string\",\n\t\t\"b\" => \"bool\",\n\t\t\"r\" => \"resource\",\n\t\t\"a\" => \"array\",\n\t\t\"A\" => \"array\",\n\t\t\"o\" => \"object\",\n\t\t\"O\" => \"object\",\n\t\t\"z\" => \"mixed\",\n\t\t\"Z\" => \"mixed\",\n\t\t\"t\" => \"string\",\n\t\t\"C\" => \"class\",\n\t\t\"h\" => \"array\",\n\t\t\"H\" => \"array\",\n\t\t\"S\" => \"string\",\n\t\t\"f\" => \"callable\",\n\t\t\"x\" => \"string\",\n\t\t\"p\" => \"string\",\n\t\t\n\t\t\"|\" => \"optional\"\n\t);\n\t$return = array();\n\tfor ($i=0; $i < strlen($type_spec); $i++) {\n\t\t$ch = $type_spec[$i];\n\t\tif ($ch != \"/\" && $ch != \"!\" && $ch != \"&\" && $ch != \"^\" && $ch != \"*\" && $ch != \"+\") {\n\t\t\tif (!isset($zend_params[$ch])) {\n\t\t\t\techo \"! Unknown formatting specifier '$ch' in '$type_spec'.\\n\";\n\t\t\t\t$zend_params[$ch] = \"unknown\";\n\t\t\t}\n\t\t\t$return[] = $zend_params[$ch];\n\t\t}\n\t}\n\treturn $return;\n}", "private function getMethodParameter(Param $param)\n {\n $type = $param->type;\n $name = $param->name;\n $default = $param->default;\n\n $paramString = (null !== $type) ? sprintf('%s ', $type) : '';\n $paramString .= sprintf('$%s', $name);\n $paramString .= (null !== $default) ? sprintf(' = %s', $this->getDefaultValue($default)) : '';\n\n return $paramString;\n }", "function format(): string\n\t{\n\t\t$args = func_get_args();\n\n\t\tif (is_array($args[0]))\n\t\t\t$args = $args[0];\n\n\t\treturn vsprintf($args[0], array_slice($args, 1));\n\t}", "public function getParamString() {\n foreach ($this->params as $param) {\n $result .= \"/$param\";\n }\n return $result;\n }", "public function generateActionParamComments()\n {\n /* @var $class ActiveRecord */\n $class = $this->modelClass;\n $pks = $class::primaryKey();\n if (($table = $this->getTableSchema()) === false) {\n $params = [];\n foreach ($pks as $pk) {\n $params[] = '@param ' . (substr(strtolower($pk), -2) == 'id' ? 'integer' : 'string') . ' $' . $pk;\n }\n\n return $params;\n }\n if (count($pks) === 1) {\n return ['@param ' . $table->columns[$pks[0]]->phpType . ' $id'];\n } else {\n $params = [];\n foreach ($pks as $pk) {\n $params[] = '@param ' . $table->columns[$pk]->phpType . ' $' . $pk;\n }\n\n return $params;\n }\n }", "public function format($specifier){}", "private function _formatParametersForURL() {\n\n return self::ADDRESS_FIELD_NAME.'='.$this->_address .\n '&'.self::LAT_LNG_FIELD_NAME.'='.$this->_latlng .\n '&'.self::COMPONENTS_FIELD_NAME.'='.$this->_components .\n '&'.self::LANGUAGE_FIELD_NAME.'='.$this->_language .\n '&'.self::BOUNDS_FIELD_NAME.'='.$this->_bounds .\n '&'.self::REGION_FIELD_NAME.'='.$this->_region .\n '&'.self::SENSOR_FIELD_NAME.'='.$this->_sensor;\n }", "private function getDocblock(): string\n {\n $docblock = $this->stmt->getDocComment();\n\n if ($docblock) {\n $parsed_docblock = DocComment::parsePreservingLength($docblock);\n } else {\n $parsed_docblock = new ParsedDocblock('', []);\n }\n\n $modified_docblock = false;\n\n foreach ($this->new_phpdoc_param_types as $param_name => $phpdoc_type) {\n $found_in_params = false;\n $new_param_block = $phpdoc_type . ' ' . '$' . $param_name;\n\n if (isset($parsed_docblock->tags['param'])) {\n foreach ($parsed_docblock->tags['param'] as &$param_block) {\n $doc_parts = CommentAnalyzer::splitDocLine($param_block);\n\n // If there's no type\n if (($doc_parts[0] ?? null) === '$' . $param_name) {\n // If the parameter has a description add that back\n if (count($doc_parts) > 1) {\n $new_param_block .= \" \". implode(\" \", array_slice($doc_parts, 1));\n }\n\n if ($param_block !== $new_param_block) {\n $modified_docblock = true;\n }\n\n $param_block = $new_param_block;\n $found_in_params = true;\n break;\n }\n\n // If there is a type\n if (($doc_parts[1] ?? null) === '$' . $param_name) {\n // If the parameter has a description add that back\n if (count($doc_parts) > 2) {\n $new_param_block .= \" \". implode(\" \", array_slice($doc_parts, 2));\n }\n\n if ($param_block !== $new_param_block) {\n $modified_docblock = true;\n }\n\n $param_block = $new_param_block;\n $found_in_params = true;\n break;\n }\n }\n unset($param_block);\n }\n\n if (!$found_in_params) {\n $modified_docblock = true;\n $parsed_docblock->tags['param'][] = $new_param_block;\n }\n }\n\n foreach ($this->new_psalm_param_types as $param_name => $psalm_type) {\n $found_in_params = false;\n $new_param_block = $psalm_type . ' ' . '$' . $param_name;\n\n if (isset($parsed_docblock->tags['psalm-param'])) {\n foreach ($parsed_docblock->tags['psalm-param'] as &$param_block) {\n $doc_parts = CommentAnalyzer::splitDocLine($param_block);\n\n if (($doc_parts[1] ?? null) === '$' . $param_name) {\n if ($param_block !== $new_param_block) {\n $modified_docblock = true;\n }\n\n $param_block = $new_param_block;\n $found_in_params = true;\n break;\n }\n }\n unset($param_block);\n }\n\n if (!$found_in_params) {\n $modified_docblock = true;\n $parsed_docblock->tags['psalm-param'][] = $new_param_block;\n }\n }\n\n $old_phpdoc_return_type = null;\n if (isset($parsed_docblock->tags['return'])) {\n $old_phpdoc_return_type = reset($parsed_docblock->tags['return']);\n }\n\n if ($this->is_pure) {\n $modified_docblock = true;\n $parsed_docblock->tags['psalm-pure'] = [''];\n }\n if (count($this->throwsExceptions) > 0) {\n $modified_docblock = true;\n $inferredThrowsClause = array_reduce(\n $this->throwsExceptions,\n fn(string $throwsClause, string $exception) => $throwsClause === ''\n ? $exception\n : $throwsClause.'|'.$exception,\n '',\n );\n if (array_key_exists('throws', $parsed_docblock->tags)) {\n $parsed_docblock->tags['throws'][] = $inferredThrowsClause;\n } else {\n $parsed_docblock->tags['throws'] = [$inferredThrowsClause];\n }\n }\n\n\n if ($this->new_phpdoc_return_type && $this->new_phpdoc_return_type !== $old_phpdoc_return_type) {\n $modified_docblock = true;\n if ($this->new_phpdoc_return_type !== $this->new_php_return_type || $this->return_type_description) {\n //only add the type if it's different than signature or if there's a description\n $parsed_docblock->tags['return'] = [\n $this->new_phpdoc_return_type\n . ($this->return_type_description ? (' ' . $this->return_type_description) : ''),\n ];\n } else {\n unset($parsed_docblock->tags['return']);\n }\n }\n\n $old_psalm_return_type = null;\n if (isset($parsed_docblock->tags['psalm-return'])) {\n $old_psalm_return_type = reset($parsed_docblock->tags['psalm-return']);\n }\n\n if ($this->new_psalm_return_type\n && $this->new_phpdoc_return_type !== $this->new_psalm_return_type\n && $this->new_psalm_return_type !== $old_psalm_return_type\n ) {\n $modified_docblock = true;\n $parsed_docblock->tags['psalm-return'] = [$this->new_psalm_return_type];\n }\n\n if (!$parsed_docblock->tags && !$parsed_docblock->description) {\n return '';\n }\n\n if (!$modified_docblock) {\n return (string)$docblock . \"\\n\" . $this->indentation;\n }\n\n return $parsed_docblock->render($this->indentation);\n }", "public function getTagName ()\n\t{\n\t\treturn 'param';\n\t}", "public static function getCommandLineParameterFmt(): string\n {\n return LightCliFormatHelper::getCommandLineParameterFmt();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates given notifications and returns a list of notification models of all valid notifications.
private function prepareNotifications($notifications) { $result = []; foreach ($notifications as $notificationRecord) { /* @var $notificationRecord \humhub\modules\notification\models\Notification */ try { $baseModel = $notificationRecord->getBaseModel(); if($baseModel->validate()) { $result[] = $baseModel; } else { throw new IntegrityException('Invalid base model found for notification'); } } catch (IntegrityException $ex) { $notificationRecord->delete(); Yii::warning('Deleted inconsistent notification with id ' . $notificationRecord->id . '. ' . $ex->getMessage()); } } return $result; }
[ "public static function filterNotifications( $notifications ) {\n\t\t$remainingNotifications = [];\n\t\tforeach ( $notifications as $notification ) {\n\t\t\t$levels = $notification->level;\n\t\t\tif ( ! is_array( $levels ) ) {\n\t\t\t\t$levels = empty( $notification->level ) ? [ 'all' ] : [ $notification->level ];\n\t\t\t}\n\n\t\t\tforeach ( $levels as $level ) {\n\t\t\t\tif ( ! aioseo()->notices->validateType( $level ) ) {\n\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$remainingNotifications[] = $notification;\n\t\t}\n\t\treturn $remainingNotifications;\n\t}", "public function notifications()\n {\n return $this->morphMany(NekoNotification::class, 'notifiable')->orderBy('created_at', 'desc');\n }", "public function getNotifications()\n {\n return $this->resourceList('Notification');\n }", "public function listUserNotifications()\n {\n $notifications = Notification::where('to_user_id', '=', auth()->id())\n ->orderBy('id', 'desc')\n ->limit(12)\n ->get();\n\n $countNewNotification = Notification::where('to_user_id', '=', auth()->id())\n ->where('is_read', '=', Notification::IS_UNREAD)\n ->count();\n\n return $this->respondSuccessData([\n 'notifications' => $notifications,\n 'countNewNotification' => $countNewNotification,\n ]);\n }", "protected function getNotifications() {\n $this->loadModel('CoNotification');\n \n $copersonid = $this->Session->read('Auth.User.co_person_id');\n \n if(!isset($this->cur_co)) {\n $mycos = $this->Session->read('Auth.User.cos');\n \n if(!empty($mycos)) {\n $n = array();\n \n foreach($mycos as $co) {\n if(!empty($co['co_person_id'])) {\n $n[] = array(\n 'co_id' => $co['co_id'],\n 'co_name' => $co['co_name'],\n 'co_person_id' => $co['co_person_id'],\n 'notifications' => $this->CoNotification->pending($co['co_person_id'], 5)\n );\n }\n }\n\n // XXX we don't use this anywhere, but if we do at some point we probably need to\n // add vv_all_notification_count\n $this->set('vv_all_notifications', $n);\n }\n } else {\n if(!empty($copersonid)) {\n $this->set('vv_my_notifications', $this->CoNotification->pending($copersonid, 5));\n $this->set('vv_my_notification_count', $this->CoNotification->pending($copersonid, 0));\n $this->set('vv_co_person_id_notifications', $copersonid);\n }\n }\n }", "protected function getNotifications()\n {\n $result = $this->api->getNotifications($this->timestamp);\n if (isset($result['error'])) {\n echo $result['error'].\"\\n\";\n return [];\n }\n\n return $result;\n }", "public function save($notifications=[]) {\n\n if(!is_array($notifications)) {\n $notifications=[$notifications];\n }\n\n /** @var Notification $notification */\n foreach($notifications AS $key=>$notification) {\n\n if(count($notification->getUsers())>0) {\n\n /** @var User $user */\n foreach($notification->getUsers() AS $user) {\n $n=clone $notification;\n $n->setUser($user);\n $n->setUsers([]);\n $notifications[]=$n;\n }\n\n unset($notifications[$key]);\n }\n }\n\n /** @var Notification $notification */\n foreach($notifications AS $notification) {\n\n $notification->createHash();\n $this->em->persist($notification);\n\n foreach ($notification->getNotificationRelations() AS $notificationRelation) {\n $this->em->persist($notificationRelation);\n }\n\n if ($this->config['send_notification_immediately'] === true) {\n $this->dispatcher->sendNotification($notification);\n $notification->setSent(true);\n }\n }\n\n $this->em->flush();\n return $notifications;\n }", "public function getForNotifications()\n {\n $date = new \\DateTime();\n $date->sub(new \\DateInterval('PT5M')); // last 5 minutes\n\n $query = $this->createQueryBuilder('s')\n ->where('s.is_notification_sent = :notification_sent\n AND s.is_deleted = :deleted\n AND s.created_at >= :datetime')\n ->setParameter('notification_sent', false)\n ->setParameter('deleted', false)\n ->setParameter('datetime', $date)\n ->addOrderBy('s.created_at', 'ASC')\n ->getQuery();\n \n return $query->getResult();\n }", "protected function getNotifications() {\n\t\t$dbr = wfGetDB( DB_SLAVE );\n\t\t$logEntrySelectQuery = DatabaseLogEntry::getSelectQueryData();\n\t\t$logFilter = array( 'log_type' => 'notifytranslators' );\n\t\t$lastMonthTimeStamp = $dbr->timestamp( strtotime( '-1 month' ) );\n\t\t$logFilter += array(\n\t\t\t\t\"log_timestamp > $lastMonthTimeStamp\",\n\t\t\t);\n\t\t$logEntrySelectQuery['conds'] = $logFilter;\n\t\t$logs = $dbr->select(\n\t\t\t$logEntrySelectQuery['tables'],\n\t\t\t$logEntrySelectQuery['fields'],\n\t\t\t$logEntrySelectQuery['conds'],\n\t\t\t__METHOD__,\n\t\t\tarray( 'ORDER BY' => 'log_timestamp DESC' ),\n\t\t\t$logEntrySelectQuery['join_conds']\n\t\t\t);\n\n\t\t$notifications = array();\n\t\tforeach ( $logs as $row ) {\n\t\t\t$logEntry = DatabaseLogEntry::newFromRow( $row );\n\t\t\t$logParams = $logEntry->getParameters();\n\t\t\tif ( $logParams[1] && strtotime( $logParams[1] ) < time() ) {\n\t\t\t\t// Deadline already expired\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$translatablePage = $logEntry->getTarget()->getPrefixedText();\n\t\t\tif ( isset( $notifications[$translatablePage] ) ) {\n\t\t\t\t// An older notification about the same page.\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$notifications[$translatablePage] = array(\n\t\t\t\t'languages' => $logParams[0],\n\t\t\t\t'deadline' => $logParams[1],\n\t\t\t\t'priority' => $logParams[2],\n\t\t\t\t'announcedate' => wfTimestamp( TS_RFC2822, $logEntry->getTimestamp() ),\n\t\t\t\t'announcer' => $logEntry->getPerformer(),\n\t\t\t\t'translatablepage' => $logEntry->getTarget()\n\t\t\t\t);\n\t\t}\n\t\treturn $this->sort( $notifications );\n\t}", "public function getNotifications(): array\n {\n return $this->notifications;\n }", "public function allNotifications()\n {\n //$process = Auth::user();\n //return $process->notifications;\n }", "public function setNotifications($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Io\\Token\\Proto\\Common\\Notification\\Notification::class);\n $this->notifications = $arr;\n\n return $this;\n }", "public function allCheckNotificationsRequest()\n {\n\n $resourcePath = '/api/check/notifications';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('auth-livewatch-token');\n if ($apiKey !== null) {\n $headers['auth-livewatch-token'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getCurrentNotifications($notifications)\n {\n $ids = [];\n foreach ($notifications as $notification) {\n $id = $notification->id;\n $data = $notification->data;\n $endDate = Carbon::parse($data['end_date']);\n if ($endDate < Carbon::now())\n array_push($ids, $id);\n }\n // Filter notifications, remove that are ended\n return $notifications->except($ids);\n }", "public function getAllNotifications()\n {\n $notifications = EmailAndNotification::with('children')->whereNull('parent_id')->get();\n return response()->json($notifications, 200);\n }", "public function notifications()\n {\n return $this\n ->hasMany(Notification::class, Constants::FLD_NOTIFICATIONS_RESOURCE_ID)\n ->ofType(Constants::NOTIFICATION_TYPE_TEAM);\n }", "public function get_all() {\n\t\t\treturn $this->notifications;\n\t\t}", "public function get_notifications() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,1);\n \n // Get all notifications\n $get_notifications = $this->notifications->get_templates(0);\n \n if ( $get_notifications ) {\n \n echo json_encode([\n 'notification' => $get_notifications,\n 'time' => time()\n ]);\n \n }\n \n }", "public function getNotificationList()\n {\n try {\n $notifications = \\DB::select('SELECT * FROM AdminNotification order by id desc limit 5');\n\n return response()->json(['status' => 200, 'list' => $notifications], 200);\n } catch (QueryException $e) {\n return response()->json(['status' => 200], 200);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the [pos_cur4] column value.
public function getPosCur4() { return $this->pos_cur4; }
[ "public function getRposCur4()\n {\n return $this->rpos_cur4;\n }", "public function setPosCur4($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->pos_cur4 !== $v) {\n $this->pos_cur4 = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_POS_CUR4] = true;\n }\n\n return $this;\n }", "public function getPosCur3()\n {\n return $this->pos_cur3;\n }", "public function getPosCur()\n {\n return $this->pos_cur;\n }", "public function getPosCur1()\n {\n return $this->pos_cur1;\n }", "public function getCursorV(): int\n {\n return $this->getCursor()[0];\n }", "public function setPosCur3($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->pos_cur3 !== $v) {\n $this->pos_cur3 = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_POS_CUR3] = true;\n }\n\n return $this;\n }", "public function getPosCurTmp()\n {\n return $this->pos_cur_tmp;\n }", "public function filterByPosCur4($posCur4 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($posCur4)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliMemberTmpTableMap::COL_POS_CUR4, $posCur4, $comparison);\n }", "function get_current_column_number() {\n\t\treturn xml_get_current_column_number($this->parser);\n\t}", "public function getCurUsedCell()\n {\n return $this->CurUsedCell;\n }", "public function getPos()\n {\n return $this->getValue(self::POS);\n }", "public function getField4()\n {\n return $this->field4;\n }", "public function getCodPos(){\r\n\t return($this->codPos);\r\n\t}", "function GetColumnAt($pos){}", "public function getQnaPointVal() {\n\t\treturn ($this->qnaPointVal);\n\t}", "public function currval() {\n\t\t\tif ($this->database->isConnected()) {\n\t\t\t\t$query = \"SELECT \" . $this->schema . \".\" . $this->name . \".CURRVAL FROM DUAL\";\n\t\t\t\t$stid = $this->database->executeRead($query);\n\t\t\t\t$results = $this->database->getResults($stid);\n\t\t\t\tforeach ($results as $row) {\n\t\t\t\t\treturn $row['NEXTVAL'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "public function currentCurserPosition()\n {\n $pos = null;\n if ( $this->isConnected() ) {\n $pos = ftell($this->_stream);\n }\n return $pos;\n }", "function read_xref_start_value() {\n\t\t//------------------------------\n\t\t\t$buffer=$this->get_buffer();\n\t\t\t$chunks = preg_split('/\\bxref\\b/', $buffer, -1, PREG_SPLIT_OFFSET_CAPTURE);\n\t\t\treturn intval($chunks[1][1])-4; //-4 , relative to end of xref\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable debug mode for this client.
public function disable_debug() { $this->debug = $this->handler->debug = FALSE; }
[ "public function disableDebugMode() {\n $this->debug_mode = FALSE;\n }", "public function disableDebug() {\n \t$this->debug = false;\n }", "public function disableDebug() {}", "public function disableDebug();", "public function disableDebug(){\n if( ! $this->debug ) return;\n $this->debug = NULL;\n }", "function turnOffDebugMode()\n {\n $this->debugmode = false;\n }", "function DebugOff() {\n $this->debug = false;\n }", "public static function setDebugOff() {\r\n self::$debug = false;\r\n }", "function debugOff()\n\t{\n\t\t$this->bDebug = false;\n\t}", "function debugOff()\r\n\t{\r\n\t\t$this->bDebug = false;\r\n\t}", "public function disableDebug(){\n\t\treturn $this->oauth->disableDebug();\n\t}", "public function disableLogging() {\n $this->debug = false;\n }", "public function disable_dev_mode() {\n $this->dev_mode = false;\n }", "public function enableDebugMode() {}", "public function disable() {\n\t\t$this->isActiveClient = false;\n\t}", "public function disableLogging() {\n $this->debug = false;\n $this->utxoFinder->disableLogging();\n }", "protected function disable_tsf_debugging() {\n\n\t\t$debug = $this->get_tsf_debug_states();\n\n\t\t$debug[1] and \\the_seo_framework()->the_seo_framework_debug = false;\n\t\t$debug[2] and \\the_seo_framework()->the_seo_framework_debug_hidden = false;\n\t}", "public function clearDebugFlag() \n\t{\n\t\t$this->debugFlag = false;\n\t}", "public function deactivate_devmode() {\r\n\t\t$this->options->set( 'cloudflare_devmode', 'off' );\r\n\t\t$this->options_api->set( 'settings', $this->options->get_options() );\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the event that corresponds to oid
function get_event_by_oid($oid) { $events_table = SQL_PREFIX . 'events'; $occurrences_table = SQL_PREFIX . 'occurrences'; $users_table = SQL_PREFIX . 'users'; $cats_table = SQL_PREFIX . 'categories'; $query = "SELECT " . $this->get_event_fields() .", `username`, `name`, `bg_color`, `text_color`\n" ."FROM `$events_table`\n" ."LEFT JOIN `$occurrences_table` USING (`eid`)\n" ."LEFT JOIN `$users_table` ON `uid` = `owner`\n" ."LEFT JOIN `$cats_table` USING (`catid`)\n" ."WHERE `oid` = '$oid'\n"; $sth = $this->dbh->query($query) or $this->db_error(__('Error in get_event_by_oid'), $query); $result = $sth->fetch_assoc() or soft_error(__("Event doesn't exist with oid") . ": $oid"); return $result; }
[ "function get_event_by_oid($oid)\n\t{\n\t\t$events_table = SQL_PREFIX . 'events';\n\t\t$occurrences_table = SQL_PREFIX . 'occurrences';\n\t\t$users_table = SQL_PREFIX . 'users';\n\t\t$cats_table = SQL_PREFIX . 'categories';\n\n\t\t$query = \"SELECT \" . $this->get_event_fields()\n\t\t\t.\", `username`, `name`, `bg_color`, `text_color`\\n\"\n\t\t\t.\"FROM `$events_table`\\n\"\n\t\t\t.\"LEFT JOIN `$occurrences_table` USING (`eid`)\\n\"\n\t\t\t.\"LEFT JOIN `$users_table` ON `uid` = `owner`\\n\"\n\t\t\t.\"LEFT JOIN `$cats_table` USING (`catid`)\\n\"\n\t\t\t.\"WHERE `oid` = '$oid'\\n\";\n\n\t\t$sth = $this->dbh->query($query)\n\t\t\tor $this->db_error(_('Error in get_event_by_oid'),\n\t\t\t\t\t$query);\n\n\t\t$result = $sth->fetch_assoc()\n\t\t\tor soft_error(_(\"Event doesn't exist with oid\")\n\t\t\t\t\t. \": $oid\");\n\n\t\treturn $result;\n\t}", "public function get_event_by_id($id);", "public function getEvent_id() {\n return $this->getValue('event_id');\n }", "public function getEventid()\n {\n return $this->eventid;\n }", "public function get_event_id(){\n\t\treturn $this->event_id;\n\t}", "public function getEventID() {\n return($this->eventID);\n }", "public function getEventById($id)\n {\n return Event::find($id);\n }", "public function get_event_by_id($id)\r\n {\r\n $this->db->where('eventid', $id);\r\n return $this->db->get('tblevents')->row();\r\n }", "public function getEventoId()\n {\n return $this->evento_id;\n }", "public function getEventID() {\n return $this->_getField(\"eventID\", 0, 2);\n }", "function getEventID() {\n\t\treturn $this->_EventID;\n\t}", "public function get_event() {\n\n\t\t$topic = explode( '.', $this->get( 'topic' ) );\n\t\treturn apply_filters( 'llms_rest_webhook_get_event', isset( $topic[1] ) ? $topic[1] : '', $this->get( 'id' ) );\n\n\t}", "public function getEventId()\n {\n return strval($this->source['event_id']);\n }", "public function getEventById($id);", "public function getId(){\n\t\treturn $this->EventId;\n\t}", "public function getEventId()\n {\n return $this->event_id;\n }", "public function getEventId()\n {\n }", "public function getEventoId()\r\n {\r\n return $this->Evento_id;\r\n }", "public function getEventId() {\n\t\treturn ($this->eventId);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the preSharedKey property value. This is the preshared key for WPA Personal WiFi network.
public function getPreSharedKey(): ?string { $val = $this->getBackingStore()->get('preSharedKey'); if (is_null($val) || is_string($val)) { return $val; } throw new \UnexpectedValueException("Invalid type found in backing store for 'preSharedKey'"); }
[ "public function getSharedKey(): string\n {\n return $this->sharedKey;\n }", "public function getPublicShareKey() {\n\t\treturn $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.publicKey', Encryption::ID);\n\t}", "public function getSharedKey() {\n return null;\n }", "public function getSharedKey();", "public function getPresharedKey()\n {\n return $this->getConfigData('preshared_key');\n }", "function osc_recaptcha_public_key() {\n return (getPreference('recaptchaPubKey'));\n }", "protected function _getEncryptionKey()\n {\n return (string) Mage::getConfig()->getNode('global/crypt/key');\n }", "public function getPubKey()\n {\n return $this->pub_key;\n }", "public function getPublicRsaKey()\n {\n return config('__tech.form_encryption.default_rsa_public_key',\n config('tech-config.form_encryption.default_rsa_public_key'));\n }", "public function get_wpa_key_management()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! $this->is_loaded)\n $this->_load_config();\n\n $wpa_key_mgmt = empty($this->config['wpa_key_mgmt']) ? '' : $this->config['wpa_key_mgmt'];\n\n return $wpa_key_mgmt;\n }", "public function getPubKey()\n {\n return $this->pubKey;\n }", "public function getClientKey()\n {\n return $this->client_key;\n }", "public function getInitialKey()\n {\n return $this->toBinary() & hex2bin(self::KEY_INITIAL_MASK);\n }", "public function getClientKey()\n {\n return $this->clientKey;\n }", "private function getCryptKey() {\n\t\t$config = SecureConfiguration::getInstance()->getTokenCryptKey();\n\t\treturn $config ? $config : 'ssaTokenProvider';\n\t}", "public function public_key() {\n\t\tif ( $this->is_test() ) {\n\t\t\treturn $this->settings['test_public_key'];\n\t\t}\n\n\t\treturn $this->settings['live_public_key'];\n\t}", "public function getEncodeCryptKey()\n {\n return $this->_encode_crypt_key;\n }", "private function get_public_key() {\n return $this->_key_pair['public_key'];\n }", "public function getClientKey()\n {\n return $this->getParameter('clientKey');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve content from backup
public function getBackupContent() { $itemIdentifier = $this->request->getParam('bc_identifier'); $itemName = $this->request->getParam('item'); $itemType = $this->request->getParam('bc_type'); $storeId = $this->request->getParam('store_id'); if (!is_null($storeId)) { $path = $this->backupManager->getBackupPathByStoreId($itemType, $itemIdentifier, (int)$storeId) . DIRECTORY_SEPARATOR . $itemName; } else { $path = $this->backupManager->getBackupPath($itemType, $itemIdentifier) . DIRECTORY_SEPARATOR . $itemName; } return $this->file->readData($path); }
[ "public function backupGet()\n {\n $this->terminusExec('backup:create', [self::SITENAME . '.dev'], ['element', 'db']);\n $this->terminusExec('backup:get', [self::SITENAME . '.dev'], ['to', self::DUMP_FILE]);\n }", "function list_backups() {\n\n // Get response from the server.\n $resp = $this->curl_call('act=backups');\n $resp = unserialize($resp);\n return $resp['backups'];\n }", "public function getBackupList () {\r\n\t$this->ensureLoggedIn();\r\n\r\n\treturn $this->request(array('req' => 'getbackuplist'));\r\n\t}", "public function getBackups()\n\t{\n $data = [];\n \n $req = self::getBdd()->query('SELECT * FROM backup');\n\n while($results = $req->fetch())\n {\n $informations = [\n \"id\" => $results[\"id\"],\n \"date\" => $results[\"dateBackup\"],\n \"comment\" => $results[\"commentBackup\"]\n ];\n\n array_push($data, $informations);\n }\n\n return $data;\n }", "public function getBackups () {\r\n $this->ensureLoggedIn();\r\n\r\n return $this->request(array('req' => 'getbackups'));\r\n }", "public function viewbackup()\n\t{\n\t\tglobal $currentIndex;\n\n\t\tif (!($object = $this->loadObject()))\n\t\t\treturn;\n\t\tif ($object->id)\n\t\t{\n\t\t\t$url = $object->getBackupURL();\n\t\t\techo '<div class=\"conf confirm\"><img src=\"../img/admin/ok.gif\" />&nbsp;'.$this->l('Beginning download ...').'</div>';\n\t\t\techo '<br />'.$this->l('Back-up file should automatically download.');\n\t\t\techo '<br /><br />'.$this->l('If not,').' <b><a href=\"'.$url.'\">'.$this->l('please click here!').'</a></b>';\n\t\t\techo '<iframe width=\"0\" height=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"'.$url.'\"></iframe>';\n\t\t\techo '<br /><br /><br /><a href=\"'.$currentIndex.'&token='.$this->token.'\"><img src=\"../img/admin/arrow2.gif\" /> '.$this->l('Back to list').'</a><br />';\n\t\t}\n\t\telseif ($object->error)\n\t\t\t$this->_errors[] = $object->error;\n\t\t$this->displayErrors();\n\t}", "public function getBackups()\r\n {\r\n check_ajax_referer('kb-read');\r\n $request = Utilities::getRequest();\r\n $postId = $request->request->get('post_id', null);\r\n\r\n if (is_null($postId)) {\r\n return new AjaxErrorResponse('No post id provided', []);\r\n }\r\n\r\n $environment = Utilities::getPostEnvironment($postId);\r\n $backupManager = new BackupDataStorage2($environment);\r\n $items = array_map(function ($row) {\r\n unset($row->value);\r\n return $row;\r\n }, $backupManager->getAll());\r\n return new AjaxSuccessResponse('Backups retrieved', $items);\r\n\r\n }", "public function getBackups()\n {\n $this->checkServer();\n\n $response = $this->callApi('get', '/server/'.$this->server);\n $storageId = $response['data']->server->storage_devices->storage_device[0]->storage;\n\n $response = $this->callApi('get', '/storage/'.$storageId);\n $backups = $response['data']->storage->backups->backup;\n\n $index = 1;\n foreach ($backups as $back) {\n $res = $this->callApi('get', '/storage/'.$back);\n $backup = $res['data']->storage;\n if ($backup->origin == $storageId && !empty($storageId)) {\n $output[] = [\n $index,\n date('d-m-Y H:i:s', strtotime($backup->created)),\n ucfirst($backup->access),\n ucfirst($backup->state),\n $backup->title,\n $backup->size,\n '<button class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#confirm-restore\" data-record-id=\"'.$backup->uuid.'\" data-record-title=\"'.$index.'\" ><i class=\"btn-icon fa fa-refresh fa-lg\"></i></button>\n <button class=\"btn btn-danger deleteBackup\" data-record-id=\"'.$backup->uuid.'\" data-record-title=\"'.$index.'\" data-toggle=\"modal\" data-target=\"#confirm-delete\"><i class=\"btn-icon fa fa-trash fa-lg\"></i></button>',\n ];\n ++$index;\n }\n }\n\n $backups['data'] = (!empty($output)) ? $output : [];\n\n return $backups;\n }", "public function getBackup()\n {\n return $this->backup;\n }", "public function get_backup_details() {\n\t\tglobal $updraftplus;\n\t\t\n\t\t$backup_history = UpdraftPlus_Backup_History::get_history();\n\t\t$backupable_entities = $updraftplus->get_backupable_file_entities();\n\t\t$sets = 0;\n\t\t$uploaded = 0;\n\t\t\n\t\tforeach ($backupable_entities as $key => $info) {\n\t\t\tforeach ($backup_history as $backup) {\n\t\t\t\tif (isset($backup[$key]) && isset($backup[$key.'-size'])) {\n\t\t\t\t\t$sets += count($backup[$key]);\n\t\t\t\t\t$uploaded += $backup[$key.'-size'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$uploaded = round($uploaded / 1048576, 1);\n\n\t\treturn array('uploaded' => $uploaded, 'sets' => $sets);\n\t}", "function hosting_site_get_backup($bid) {\n return db_query(\"SELECT bid, site, web_server, filename, description, size, timestamp FROM {hosting_site_backups} WHERE bid = :bid\", array(':bid' => $bid))->fetchAssoc();\n}", "public function getBackupData()\n {\n return $this->createQueryBuilder('obj')\n ->select('obj.id as id')\n ->addSelect('obj.name as name')\n ->addSelect('obj.color as color')\n ->addSelect('obj.serviceId as service_id')\n ->addSelect('obj.slug as slug')\n ->addSelect('obj.level as level')\n ->getQuery()\n ->getArrayResult();\n }", "public function show_raw_backup_and_file_list() {\n\t\tif (false === ($updraftplus_admin = $this->_load_ud_admin())) return new WP_Error('no_updraftplus');\n\n\t\t/*\n\t\t\tNeed to remove the pre tags as the modal assumes a <pre> is for a new box.\n\t\t\tThis cause issues specifically with fetch log events. Do this by passing true\n\t\t\tto the method show_raw_backups\n\t\t */\n\t\t\n\t\t$response = $updraftplus_admin->show_raw_backups(true);\n\n\t\treturn $response['html'];\n\t}", "public function getContents()\n {\n }", "public function db_backups()\n {\n $backup = $this->services['backups'];\n $backups = $backup->setBackupPath($this->settings['working_directory'])->getAllBackups($this->settings['storage_details']);\n $backup_meta = $backup->getBackupMeta($backups);\n \n $variables = array(\n 'settings' => $this->settings,\n 'backup_meta' => $backup_meta,\n 'backups' => $backups,\n 'errors' => $this->errors,\n 'menu_data' => ee()->backup_pro->get_dashboard_view_menu(),\n 'method' => $this->platform->getPost('method')\n );\n \n ee()->view->cp_page_title = ee()->lang->line('database_backups');\n ee()->jquery->tablesorter('#database_backups table', '{headers: {8: {sorter: false}, 0: {sorter: false}, 1: {sorter: false}, 2: {sorter: false}, 3: {sorter: false}}, widgets: [\"zebra\"], sortList: [[4,1]]}');\n ee()->javascript->compile();\n \n return array(\n 'body' => ee()->load->view('database_backups', $variables, true),\n 'heading' => $this->services['lang']->__('database_backups'),\n 'breadcrumb' => array(\n ee('CP/URL', 'addons/settings/backup_pro')->compile() => lang('backup_pro_module_name'),\n ee('CP/URL', 'addons/settings/backup_pro/index')->compile() => lang('home_bp_dashboard_menu')\n )\n );\n }", "public function backupList()\n {\n return $this->getService()->resourceList('Backup', $this->getUrl('backups'), $this);\n }", "abstract function PerformBackup();", "public function getNewsBackupContentByID($intNewsContentBackupID)\n\t{\n\t\t$strQuery = $this->select()\n\t\t\t\t\t->setIntegrityCheck(false)\n\t\t\t\t\t->from('news_content_backup')\n\t\t\t\t\t->where('news_content_backup_id = ?', $intNewsContentBackupID);\n\n\t\treturn $this->returnData($strQuery, 'array', 'fetchRow');\n\t}", "public function getAgendaBackupContentByID($intAgendaContentBackupID)\n\t{\n\t\t$strQuery = $this->select()\n\t\t\t\t\t->setIntegrityCheck(false)\n\t\t\t\t\t->from('agenda_content_backup')\n\t\t\t\t\t->where('agenda_content_backup_id = ?', $intAgendaContentBackupID);\n\n\t\treturn $this->returnData($strQuery, 'array', 'fetchRow');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WordPress login page logo url title
function custom_login_logo_title() { return get_bloginfo( 'name' ); }
[ "function custom_login_logo_url_title() {\n\t\treturn get_bloginfo( 'name' );\n\t}", "function klyp_admin_login_logo_url_title()\n{\n return 'Site by Klyp';\n}", "function bcl_login_logo_url_title() {\n return '10up | finely crafted websites and tools';\n}", "public function change_login_logo_title() \n {\n return get_bloginfo(\"name\");\n }", "function pxls_login_logo_title() {\n\treturn \"Powered by WordPress and PXLS:Themes\";\n}", "function my_login_imgtitle() {\n\treturn get_bloginfo('title', 'display');\n}", "function custom_logo_login_url() {\n return home_url();\n}", "function anomous_login_logo_url() {\n\treturn home_url();\n}", "function login_logo_url() {\n\treturn home_url();\n}", "public function custom_login_logo() {\n\t echo '<style type=\"text/css\">\n\t .login h1 a { background-size:auto; width:100%; height:150px; background-position:center center; background-image:url('.get_bloginfo('template_directory').'/public/images/logos/admin-logo.svg) !important; }\n\t </style>';\n\t}", "function ZPDBRAND_login_logo() {\n $logo_url = ZPDBRAND_PLUGIN_URL . 'img/zpd-login-logo.png';\n echo \"\n\t<style>\n\tbody.login #login h1 a {\n\t\tbackground: url('\" . $logo_url . \"') no-repeat scroll center top transparent !important;\n\t\theight: 64px;\n\t\twidth: 100%;\n\t}\n\t</style>\n\t\";\n}", "function my_login_logo_url() {\n return network_home_url();\n}", "public function custom_login_logo() {\n\t\techo '<style type=\"text/css\">\n\t\th1 a { background-image: url('.get_bloginfo('template_directory').'/assets/img/logo.svg) !important;\n\t\t background-size: 100% !important;\n\t\t width: 100% !important;\n\t\t height: 125px !important;\n\t\t pointer-events: none;\n\t\t}\n\t\t</style>';\n\t}", "function ts_admin_login_logo() {\n $admin_logo = ts_get_option( 'slupy_adminlogo' );\n if ( $admin_logo ) {\n $admin_logo = wp_get_attachment_image_src( $admin_logo, 'full' );\n echo '<style type=\"text/css\">\n body.login div#login h1 a {\n background-image: url(\"'.esc_url( $admin_logo[0] ).'\");\n padding-bottom: 70px;\n width: auto;\n background-size: 100%;\n }\n </style>';\n }\n }", "private function print_login_logo() {\n\t\t\t$logo_url = get_header_image();\n\t\t\tif ( $logo_url ) {\n\t\t\t\t$logo_url_stylesheet = '<style type=\"text/css\">';\n\t\t\t\t$logo_url_stylesheet .= '#login h1 a, .login h1 a {background-image: url(';\n\t\t\t\t$logo_url_stylesheet .= $logo_url;\n\t\t\t\t$logo_url_stylesheet .= ')}';\n\t\t\t\t$logo_url_stylesheet .= '</style>';\n\t\t\t\techo $logo_url_stylesheet;\n\t\t\t}\n\t\t}", "function my_login_logo_one() { \r\n\tget_template_part ('inc/img/set-logo');\r\n\t}", "public function change_login_logo_url()\n {\n return get_home_url();\n }", "public function logo_url_title() {\r\n $title = get_bloginfo( 'name', 'display' );\r\n return $title;\r\n }", "public function set_login_logo_alt() {\n return get_option( 'blogname' );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
After submitting the registration form, the user is redirected to a confirmation page. This action simply display a static page defined in bag_login.views.registration_completed
public function registrationCompletedAction() { $view = $this->container->getParameter('bag_login.views'); $settings = $this->container->getParameter('bag_login.email'); return $this->render($view['registration_completed'], array('sendActivationEmail' => $settings['require_account_verification'])); }
[ "public function showRegistrationForm()\n {\n if (!empty($_SESSION['LoginStatus']))\n header('Location: /account');\n else\n View::renderTemplate('register.html');\n }", "public function confirmRegister()\n {\n // Check exist of session\n if (!Session::has('newMember')) {\n return redirect()->route('member.form.check.register');\n }\n\n if (count(Session::get('newMember')) <= 1) {\n return redirect()->route('member.form.register');\n }\n\n // Get data form session\n $member = Session::get('newMember');\n $limeUser = LimeUser::where('e_mail', $member['mail'])->first();\n $registerPolicy = Policy::getRegisterPolicyLink($limeUser, User::TYPE_LIME_NORMAL);\n\n return view('member.confirm-register', compact('member', 'registerPolicy'));\n }", "private function _signUpPageRequested()\n {\n $this->utility->redirect('signup');\n }", "public function goToRegisterForm()\n {\n if($this->logController->checkIfIsLoggedIn(true, 'error', \"Vous possédez déjà un compte.\")) {\n $this->displayer->displayLocation('profil');\n } elseif($this->post->get('submit')) { \n if($this->validation->checkInputValidity('user', $this->post)) {\n $this->logController->register($this->post, $this->date);\n $this->displayer->displayLocation('accueil');\n }\n }\n return $this->displayer->displayRegister($this->post);\n }", "function finishRegistration(){\n if($this->set_initial_password($_POST[\"username\"], $_POST[\"password\"])){\n $this->redirect(\"/login/?registration=true\");\n } else {\n $this->redirect(\"/register/?failed=true\");\n }\n }", "protected function showRegFormFilled() \n { \n $success = $this->saveUserData();\n if ($success == true)\n {\n echo ' thank you so much for registering!';\n }\n else\n {\n echo ' but registration failed!';\n }\n }", "public function load_registration_success() {\n\t\t$data['title'] = 'Success Page';\n\t\t$data['message'] = 'Your account has been created';\n\t\t$this->load->view('template/header', $data);\n\t\t$this->load->view('template/navigation');\n\t\t$this->load->view('template/leftNavigation');\n\t\t$this->load->view('login/success_view',$data);\n\t\t$this->load->view('template/footer');\n\t}", "public function showRegistrationForm()\n {\n abort_unless(config('access.registration'), 404);\n\n return view('frontend.auth.register');\n }", "private function showPageRegistration()\n {\n if ($this->feedback) {\n echo $this->feedback . \"<br/><br/>\";\n }\n echo '<div class=\"container\"><div class=\"row\"><div class=\"col-md-6 col-md-offset-3 text-center\">';\n\n echo '<h2>Registrar usuario</h2>';\n\n echo '<form method=\"post\" action=\"' . $_SERVER['SCRIPT_NAME'] . '?action=register\" name=\"registerform\" class=\"form-custom2\">';\n echo '<div class=\"form-group\">';\n echo '<label for=\"login_input_username\">Username (solo letras y numeros, de 2 a 64 caracteres)</label>';\n echo '<input id=\"login_input_username\" type=\"text\" class=\"form-control\" pattern=\"[a-zA-Z0-9]{2,64}\" name=\"user_name\" required />';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label for=\"login_input_email\">Correo electronico (El de la empresa xfa :))</label>';\n echo '<input id=\"login_input_email\" type=\"email\" class=\"form-control\" name=\"user_email\" required />';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label for=\"login_input_password_new\">Password (min. 6 caracteres)</label>';\n echo '<input id=\"login_input_password_new\" class=\"login_input form-control\" type=\"password\" name=\"user_password_new\" pattern=\".{6,}\" required autocomplete=\"off\" />';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<label for=\"login_input_password_repeat\">Repetir password</label>';\n echo '<input id=\"login_input_password_repeat\" class=\"login_input form-control\" type=\"password\" name=\"user_password_repeat\" pattern=\".{6,}\" required autocomplete=\"off\" />';\n echo '</div>';\n echo '<div class=\"form-group\">';\n echo '<input type=\"submit\" name=\"register\" class=\"btn btn-success\" value=\"Registrar\" />';\n echo '</div>';\n echo '</form>';\n\n echo '<a href=\"' . $_SERVER['SCRIPT_NAME'] . '\"><i class=\"fa fa-home\"></i> Home</a>';\n\n echo '</div></div></div>';\n }", "public function redirectSignUp() {\r\n\t\t$this->load->view(\"SignUp\");\r\n\t}", "function confirmation_redirect() {\n if (!SwpmFbForm::is_form_submitted() || $this->form->is_fatal() || !$this->form->is_valid()) {\n return;\n }\n\n global $wpdb;\n\n $form_id = ( isset($_REQUEST['form_id']) ) ? (int) esc_html($_REQUEST['form_id']) : '';\n\n // Get forms\n $order = sanitize_sql_orderby('form_id DESC');\n $forms = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order\", $form_id));\n\n foreach ($forms as $form) :\n // If text, return output and format the HTML for display\n if ('page' == $form->form_success_type) {\n $page = get_permalink($form->form_success_message);\n wp_redirect($page);\n exit();\n }\n // If redirect, redirect to the URL\n elseif ('redirect' == $form->form_success_type) {\n wp_redirect(esc_url($form->form_success_message));\n exit();\n }\n\n endforeach;\n }", "function registration_notification(){\t\t\n\t\t \n\t\t\n\t\t$this->load->view('user/user_confirmation');\n\t}", "public function showRegistrationForm()\n {\n abort_unless(config('access.registration'), 404);\n\n return view('auth.register');\n }", "public function registration()\n\t{\n\t\t$this->load->view('header_login.php');\n\t\t$this->load->view('registration.php');\n\t\t$this->load->view('footer.php');\n\t}", "public function onRegistrationSuccess(FormEvent $event) {\n\n //set $url var to equal router object and set route to home page...\n $url = $this->router->generate('home');\n\n //set $response var to equal new RedirectResponse passing the $url var...\n $response = new RedirectResponse($url);\n\n //set FormEvent $event object's response to $response var...\n $event->setResponse($response);\n\n }", "private function showPageRegistration()\n {\n if ($this->mesaj) {\n echo $this->mesaj . \"<br/><br/>\";\n }\n\n echo '<h2>Registration</h2>';\n\n echo '<form method=\"post\" action=\"' . $_SERVER['SCRIPT_NAME'] . '?action=register\" name=\"registerform\">';\n echo '<label for=\"login_input_username\">Username (only letters and numbers, 2 to 64 characters)</label>';\n echo '<input id=\"login_input_username\" type=\"text\" pattern=\"[a-zA-Z0-9]{2,64}\" name=\"user_name\" required />';\n echo '<label for=\"login_input_email\">User\\'s email</label>';\n echo '<input id=\"login_input_email\" type=\"email\" name=\"user_email\" required />';\n echo '<label for=\"login_input_password_new\">Password (min. 6 characters)</label>';\n echo '<input id=\"login_input_password_new\" class=\"login_input\" type=\"password\" name=\"user_password_new\" pattern=\".{6,}\" required autocomplete=\"off\" />';\n echo '<label for=\"login_input_password_repeat\">Repeat password</label>';\n echo '<input id=\"login_input_password_repeat\" class=\"login_input\" type=\"password\" name=\"user_password_repeat\" pattern=\".{6,}\" required autocomplete=\"off\" />';\n echo '<input type=\"submit\" name=\"register\" value=\"Register\" />';\n echo '</form>';\n\n echo '<a href=\"' . $_SERVER['SCRIPT_NAME'] . '\">Homepage</a>';\n }", "public function redirectToConfirmation()\n {\n // Check if user went through the payment preparation detail and completed it\n $detail = unserialize($this->context->cookie->express_checkout);\n\n if (!empty($detail['payer_id']) && !empty($detail['token'])) {\n $values = ['get_confirmation' => true];\n \\Tools::redirect(\\Context::getContext()->link->getModuleLink('paypal', 'incontextconfirm', $values));\n }\n }", "public function signupAction()\n {\n if ($this->isGranted()) {\n return $this->redirectToAction();\n }\n\n $form = new FormHandler();\n\n if ($form->handle($this->getRequest())) {\n $request = new SignupRequest();\n $request = RequestWrapper::wrap($request, $form->getDataCollection());\n\n $response = $this->userSignupService->process($request);\n\n if ($response->isSuccess()) {\n $this->addFlash('success', 'Account created successfully. Check your mailbox for confirmation mail.');\n\n return $this->redirectToAction();\n }\n\n $this->addFlash('danger', 'Something went wrong.');\n }\n\n return $this->render('user/signup.html.twig');\n }", "public function registerFormAction()\n {\n $this->templater->show($this->controllName, 'RegisterForm', null);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ function to add new model
function add_model($params) { $this->db->insert('model', $params); return $this->db->insert_id(); }
[ "public function newModel();", "public function setNewModel();", "abstract protected function createNewModel();", "public function add() {\n\t\t$model = $this->model;\n\t\t$instance = new $model ();\n\t\t$this->operate_ ( $instance, function ($instance) {\n\t\t\t$this->_setValuesToObject ( $instance, URequest::getDatas () );\n\t\t\treturn DAO::insert ( $instance );\n\t\t}, \"inserted\", \"Unable to insert the instance\", [ ] );\n\t}", "function addModel($p_sxml_node, $p_id) {\n $models = new PluginFusioninventoryModelInfos;\n $mib_networking = new PluginFusioninventoryMib;\n\n $models->getFromDB($p_id);\n $sxml_model = $p_sxml_node->addChild('MODEL');\n $sxml_model->addAttribute('ID', $p_id);\n $sxml_model->addAttribute('NAME', $models->fields['name']);\n $mib_networking->oidList($sxml_model,$p_id);\n }", "public abstract function create(\\Modler\\Model $model);", "public function add(ModelInterface $model);", "public function newEntryModel();", "public function add($testModelId);", "public function create($model){\n \n }", "public function createModel()\n {\n }", "function add_model($text)\n {\n $query=$this->db2->query(\"INSERT INTO buses_model VALUES ('','$text')\");\n if($query)\n return 1;\n else\n return 0;\n }", "private function addModel($model)\n {\n $object = new $model($this->app);\n\n $this->containerModels[$model] = $object;\n }", "public function dbCreateModel() {\n $this->model->createModel(\n $_POST['brand'],\n $_POST['title'],\n $_POST['subtitle'],\n $_POST['description'],\n $_POST['creationMethod'],\n $_POST['modelPath'],\n $_POST['modelTitle'],\n $_POST['pageUrl']\n );\n $this->load->view('messageView', 'Created new model ' . $_POST['title']);\n }", "protected function createModel()\r\n {\r\n $this->geamGenerate('model');\r\n }", "function AddArticleModel($modelName, $index)\r\n\t{\r\n\t\treturn $this->SQL->Query(\"INSERT INTO `articlemodel` ( `T_MODELNAME` , `T_CREATE_TIME` , `T_ORDER` ) VALUES ('$modelName', now(), $index);\");\r\n\t}", "public function add_book(){\n $this->BookModel->add_book();\n }", "public function add()\n {\n $sql = \"INSERT INTO printer (make,model) VALUES (?,?)\";\n $this->dbObj->runQuery($sql, array(\n $this->getMake(),\n $this->getModel()\n ));\n }", "public function save(\\Modler\\Model $model){}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get next quote to be posted.
public function getNext() { $unpublished = $this->getUnpublishedApprovedQuotes(); $sorted = []; foreach ($unpublished as $quote) { $weight = (int) $quote->get('field_weight')->getString(); $sorted[$weight] = $quote; } ksort($sorted); return array_shift($sorted); }
[ "public function next()\n {\n return $this->post->getNextOf($this->entity);\n }", "public function getNext()\n {\n return $this->get('Next');\n }", "public function getNext() {\n return $this->get(self::NEXT);\n }", "private function getNext() {\n $this->index++;\n $this->currentToken = $this->tokens[$this->index];\n return $this->currentToken;\n }", "public function getNextToken()\n {\n $this->next();\n\n return $this->valid() ? $this->current() : null;\n }", "protected function getNext() {\n\t\t$this->index++;\n\t\tif($this->index < count($this->chain)) {\n\t\t\treturn $this->chain[$this->index];\n\t\t}\n\t}", "public function getNextToken()\n {\n return $this->_fields['NextToken']['FieldValue'];\n }", "public function getNextToken() \n {\n return $this->_fields['NextToken']['FieldValue'];\n }", "public function getNextToken() \n {\n return $this->fields['NextToken']['FieldValue'];\n }", "public function nextPost()\n {\n return self::isPublished()\n ->where('id', '>', $this->id)\n ->orderBy('id', 'asc')\n ->first()\n ;\n }", "function getNext() {\n $this->current = $this->current->link;\n $result = $this->current->data;\n\n return $result;\n }", "protected function _getNextStepPayment()\n {\n return $this->_nextPage[$this->code];\n }", "public function getNextToken()\r\r\n {\r\r\n return $this->nextToken;\r\r\n }", "public function getNextFieldValue()\n\t{\n\t\treturn $this->nextFieldValue; \n\n\t}", "public function next()\n {\n return $this->banner->getNextOf($this->entity);\n }", "function get_next() {\n\t\t$next = $this->db->fetch_row();\n\t\treturn $next;\n\t}", "public function getNextQueueItem() {\n $select = db_select($this->og_controller->queue_table, 'queue');\n $select->condition('queue.processed', 0);\n $select->fields('queue', array('entity_type', 'entity_id'));\n $select->range(0, 1);\n\n if ($item = $select->execute()->fetchObject()) {\n return new Dumper_Data_QueueItem($this->og_controller->og_node->nid, $item->entity_type, $item->entity_id);\n }\n\n return FALSE;\n }", "public function getNextQuestionNo()\n {\n return $this->nextQuestionNo;\n }", "protected function fetchNextQueue()\n {\n $this->queues->next();\n return $this->queues->current();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if comments for projects should be opened.
function _hrb_clarification_open( $open, $post_id = 0 ) { global $post; $post_id = $post_id ? $post_id : $post->ID; if ( HRB_PROJECTS_PTYPE != get_post_type( $post_id ) ) { return $open; } // clarification comments are only available for published projects if ( 'publish' != get_post_status( ! $post_id ) ) { return false; } return $open; }
[ "protected function canComment()\n\t{\n\t\treturn $this->getPost() \n\t\t\t&& $this->getPost()->getCommentStatus() === 'open';\n\t}", "public function isCommentsAllowed(): bool;", "public function isAllowComments()\n {\n return ((int) $this->get('AllowComments')) === 1;\n }", "function wpdocs_comments_open( $open, $post_id ) {\n $post = get_post( $post_id );\n if (get_post_meta($post->ID, 'Allow Comments', true)) {\n $open = true;\n }\n return $open;\n}", "public function hasCommentsLink()\n {\n if (is_single() || post_password_required() || (!comments_open() || !get_comments_number())) {\n return false;\n }\n\n return true;\n }", "public function hasComments() : bool;", "public function commentsAreOpen( ) : self\n {\n return $this->commentStatus( Post::COMMENTS_OPEN );\n }", "public function isCommentable();", "public function is_comments_popup()\n {\n }", "public function hasComment();", "function learndash_assignments_comments_open( $open, $post_id ) {\n\tif ( learndash_get_post_type_slug( 'assignment' ) === get_post_type( $post_id ) ) {\n\t\t$comment_status = LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Assignments_CPT', 'comment_status' );\n\t\tif ( 'yes' === $comment_status ) {\n\n\t\t\tif ( empty( $open ) ) {\n\t\t\t\tif ( is_numeric( $post_id ) ) {\n\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t$wpdb->query(\n\t\t\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\t\t\"UPDATE $wpdb->posts SET comment_status = %s WHERE ID = %d\",\n\t\t\t\t\t\t\t'open',\n\t\t\t\t\t\t\t$post_id\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$open = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$open = false;\n\t\t}\n\t}\n\n\treturn $open;\n}", "function allow_comment(){\r\n global $post;\r\n\t$comment_status = $post->comment_status;\r\n\tif ($comment_status == 'open')\r\n \treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "public function hasComments()\n {\n $xpath = new DOMXPath($this->ownerDocument);\n $xpath->registerNamespace('ini', $this->namespaceURI);\n\n return $xpath->query('child::comment()')->length > 0;\n }", "public function isCommentsEnabled(): bool\n {\n if ($this->appState->getAreaCode() === Area::AREA_FRONTEND\n && !$this->config->getValue(self::CONFIG_PATH_COMMENTS_FRONTEND)\n || $this->appState->getAreaCode() === Area::AREA_ADMINHTML\n && !$this->config->getValue(self::CONFIG_PATH_COMMENTS_ADMINHTML)\n ) {\n return false;\n }\n\n return true;\n }", "function tt_get_comments_status()\n{\n\tglobal $post;\n\t//do this only in page, to force comment open for all pages in WordPress posts table,\n\t//let showing of comments template decide by our theme's custom post meta only\n\tif (is_page()) {\n\t\t$_post = get_post($post->ID);\n\t\t//if by default page comments is closed, we set to open.\n\t\tif ($_post->comment_status == 'closed') {\n\t\t\t$update_post = array();\n\t\t\t$update_post['ID'] = $post->ID;\n\t\t\t$update_post['comment_status'] = 'open';\n\t\t\t$update_post['ping_status'] = 'open';\n\t\t\twp_update_post($update_post);\n\t\t}\n\t}\n}", "public function isCommentsEnabled() {\n\t\treturn $this->getParams()->get('config.enable_comments', 1);\n\t}", "protected function comments_allowed()\n {\n return apply_filters('pmg_core_allow_comments', true);\n }", "public function isComment() {}", "function fre_access_workspace($project){\n global $user_ID;\n // check freelancer was accepted on project\n $bid_id = get_post_meta($project->ID, \"accepted\", true);\n $bid = get_post($bid_id);\n \n // current user is not project owner, or working on\n if (!$bid_id || ($user_ID != $project->post_author && $user_ID != $bid->post_author) ) {\n return false;\n }\n return true;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
////////////////// Show Activated Comments ////////////////////
public function activeComments() { $comments = Comment::allActiveComments(); return view('admin.comments',compact('comments')); }
[ "public function show_comments()\n\t{\n\t\t$items_per_page = $this->input->get('items_per_page', config::get('pagination.default.items_per_page', '*'));\n\t\t$this->template->content = $this->add_view('extinfo/all_comments');\n\t\t$this->template->js_header = $this->add_view('js_header');\n\t\t$this->template->css_header = $this->add_view('css_header');\n\t\t$this->template->content->host_comments = $this->_comments(true, false, 'host', true, $items_per_page);\n\t\t$this->template->content->service_comments = $this->_comments(true, true, 'service', true, $items_per_page);\n\t\t$this->template->title = $this->translate->_('Monitoring » All comments');\n\t}", "function show_comments($params)\n {\n global $TMS;\n\n \n $TMS->AddMassReplace('_send_comments_form',array('tread'=>$params[0],'Marker'=>$params[2],'CobjectId'=>$params[1]));\n $TMS->parseSection('_send_comments_form',true); \n if($c=$this->_get_comments(array('tread'=>$params[0],'CobjectId'=>$params[1])))\n {\n $TMS->AddMassReplace('_comments',array('tread'=>$params[0],'CobjectId'=>$params[1]));\n \n if(is_array($c))\n {\n foreach ($c as $comment)\n {\n $TMS->AddMassReplace('_comment',$comment);\n $TMS->parseSection('_comment',true);\n } \n $TMS->parseSection('_comments',true);\n \n }elseif($c==1)\n {\n $TMS->parseSection('_tread_not_active',true); \n \n }elseif($c==2)\n {\n $TMS->parseSection('_object_not_active',true); \n } \n }\n }", "public function comments()\n {\n $task = $this->getTask();\n $commentSortingDirection = $this->userMetadataCacheDecorator->get(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, 'ASC');\n\n $this->response->html($this->template->render('CommentTooltip:board/tooltip_comments', array(\n 'task' => $task,\n 'comments' => $this->commentModel->getAll($task['id'], $commentSortingDirection)\n )));\n }", "public function actionList()\n {\n $criteria=new CDbCriteria;\n $criteria->condition='t.status='.Comment::STATUS_PENDING;// MFM 1.1 migration Comment to t\n\n $pages=new CPagination(Comment::model()->count($criteria));\n $pages->pageSize=self::PAGE_SIZE;\n $pages->applyLimit($criteria);\n\n $comments=Comment::model()->with('post')->findAll($criteria);\n\n $this->pageTitle=Yii::t('lan','Comments Pending Approval');\n $this->render('list',array(\n 'comments'=>$comments,\n 'pages'=>$pages,\n ));\n }", "function exodus_comments_link() {\n\n\t// Show if comments open or closed but already have comments; hide if password protected\n\tif ( exodus_show_comments() ) {\n\n\t\t$scroll_class = is_singular() ? 'exodus-scroll-to-comments' : ''; // full post only\n\n\t\tcomments_popup_link(\n\t\t\t__( '0 Comments', 'exodus' ),\n\t\t\t__( '1 Comment', 'exodus' ),\n\t\t\t__( '% Comments', 'exodus' ), // % is correct (not %s) - http://codex.wordpress.org/Function_Reference/comments_popup_link\n\t\t\t$scroll_class,\n\t\t\t'' // show nothing when comments off\n\t\t);\n\n\t}\n\n}", "function view_comment()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t$comment_id = $this->input->get('comment_id');\n\t\t$this->view_comments('', '', '', array($comment_id));\n\t}", "function all_business_get_slider_post_comments($type = 'post', $show = true) {\r\n\tif (comments_open()) {\r\n\t\tif ($type == 'post') {\r\n\t\t\t$out = '<a class=\"cmsmasters_post_comments cmsmasters_theme_icon_custom_comment\" href=\"' . esc_url(get_comments_link()) . '\" title=\"' . esc_attr__('Comment on', 'all-business') . ' ' . esc_attr(get_the_title()) . '\">' . \r\n\t\t\t\t'<span>' . esc_html(get_comments_number()) . '</span>' . \r\n\t\t\t'</a>';\r\n\t\t} elseif ($type == 'project') {\r\n\t\t\t$out = '<a class=\"cmsmasters_post_comments cmsmasters_theme_icon_custom_comment\" href=\"' . esc_url(get_comments_link()) . '\" title=\"' . esc_attr__('Comment on', 'all-business') . ' ' . esc_attr(get_the_title()) . '\">' . \r\n\t\t\t\t'<span>' . esc_html(get_comments_number()) . '</span>' . \r\n\t\t\t'</a>';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif ($show) {\r\n\t\t\techo $out;\r\n\t\t} else {\r\n\t\t\treturn $out;\r\n\t\t}\r\n\t}\r\n}", "function wp_dashboard_recent_comments_control() {}", "public function display_comments()\n\t{\n\t\tif ( $this->config('comments_template') )\n\t\t\trequire_once( $this->config('comments_template') );\n\t\telse require_once('template.php');\n\t}", "public function showCommentsInHistory()\n {\n return Mage::getStoreConfigFlag('customer/wf_customerbalance/show_comments_in_frontend_history');\n }", "function p2_recent_comments()\r\n{\r\n\r\n\t$comments = get_comments(array(\r\n\t\t'number' => 5,\r\n\t\t'status' => 'approve'\r\n\t));\r\n\t\r\n\tif ( count($comments) > 0 )\r\n\t{\r\n?>\r\n\t<ul>\r\n\t\r\n<?php foreach ( $comments as $comment ): ?>\r\n\t\t<li><?php echo $comment->comment_author ?> on <a href=\"<?php echo get_permalink($comment->comment_post_ID) ?>\"><?php echo get_the_title($comment->comment_post_ID) ?></a></li>\r\n<?php endforeach; ?>\r\n\t\r\n\t</ul>\r\n<?php\r\n\t\r\n\t}\r\n\telse\r\n\t{\r\n?>\r\n\t<p>No comments yet.</p>\r\n<?php\r\n\t}\r\n\r\n}", "public function is_comments_popup()\n {\n }", "function charity_abovecommentslist() {\n do_action('charity_abovecommentslist');\n}", "function listAllComments()\n{\n $commentManager = new CommentManager();\n\n $reportedComments = $commentManager->getReportedComments();\n $newComments = $commentManager->getNewComments();\n require('view/backend/commentsView.php');\n}", "public function dashboardComments() {\n $comments = $this->commentDAO->getAllComments();\n require('./view/backend/dashboard_comments.php');\n }", "function viewEditorDecisionComments($monograph) {\n\t\tif (HookRegistry::call('SeriesEditorAction::viewEditorDecisionComments', array(&$monograph))) return;\n\n\t\timport('classes.submission.form.comment.EditorDecisionCommentForm');\n\n\t\t$commentForm = new EditorDecisionCommentForm($monograph, Validation::isEditor()?ROLE_ID_EDITOR:ROLE_ID_SERIES_EDITOR);\n\t\t$commentForm->initData();\n\t\t$commentForm->display();\n\t}", "public static function display() {\n\t\t$wp_list_table = new Plugin_Comments( array(\n\t\t\t'comment_type' => 'internal-note',\n\t\t) );\n\t\twp_nonce_field( 'get-comments', 'add_comment_nonce', false );\n\t\t?>\n\t\t<p class=\"hide-if-no-js\" id=\"add-new-comment\">\n\t\t\t<a class=\"button\" href=\"#commentstatusdiv\"><?php _e( 'Add note', 'wporg-plugins' ); ?></a>\n\t\t</p>\n\t\t<?php\n\t\t$wp_list_table->display( true );\n\t\twp_comment_trashnotice();\n\t}", "function quebx_view_comments($entity, $add_comment = true, array $vars = array()) {\n\tif (!($entity instanceof ElggEntity)) {\n\t\treturn false;\n\t}\n\n\t$vars['entity'] = $entity;\n\t$vars['show_add_form'] = $add_comment;\n\t$vars['class'] = elgg_extract('class', $vars, \"{$entity->getSubtype()}-comments\");\n\n\t$output = elgg_trigger_plugin_hook('comments', $entity->getType(), $vars, false);\n\tif ($output) {\n\t\treturn $output;\n\t} else {\n\t\treturn elgg_view('page/elements/comments', $vars);\n\t}\n}", "public function isShowCustomerCommentEnabled() {\n return Mage::getStoreConfig ( 'onestepcheckout/display_option/display_comments', $this->getOrder ()->getStore () );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the plusieurs mois.
public function getPlusieursMois(): ?bool { return $this->plusieursMois; }
[ "public function getMois()\n {\n return $this->mois;\n }", "public function getMoisEnLettre() : string\n {\n $lesMois = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'];\n return $lesMois[$this->getMois() - 1];\n }", "public function getMissionMillesime() {\n return $this->missionMillesime;\n }", "public function getMarqueur_time()\n {\n return $this->marqueur_time;\n }", "function listMois() {\n return array(\n \"01\" => \"janvier\",\n \"02\" => \"fevrier\",\n \"03\" => \"mars\",\n \"04\" => \"avril\",\n \"05\" => \"mai\",\n \"06\" => \"juin\",\n \"07\" => \"juillet\",\n \"08\" => \"aout\",\n \"09\" => \"septembre\",\n \"10\" => \"octobre\",\n \"11\" => \"novembre\",\n \"12\" => \"decembre\"\n );\n}", "public function getMunten() {\r\n return $this->munten;\r\n }", "public function getMoisFiche() {\n return $this->moisFicheFrais;\n }", "public function get_monto()\n {\n return $this->monto;\n }", "public function getM()\n {\n return $this->m;\n }", "function getMois($date){\r\n\t\t@list($jour,$mois,$annee) = explode('/',$date);\r\n\t\tif(strlen($mois) == 1){\r\n\t\t\t$mois = \"0\".$mois;\r\n\t\t}\r\n\t\treturn $annee.$mois;\r\n}", "public function getTpMoisAnnee() {\n return $this->tpMoisAnnee;\n }", "public function getColVentasMostrador()\n {\n return $this->colVentasMostrador;\n }", "public function premierJourduMois(): \\DateTime\n {\n return new \\DateTime(\"{$this->annee}-{$this->mois}-01\");\n }", "public function getMinutes()\n {\n return ($this->hours * 60) + $this->minutes;\n }", "public function getMar()\n {\n return $this->mar;\n }", "public function minute()\n {\n return $this->minutes();\n }", "public static function getMoraleModifier() {\n\t\treturn self::moraleModifier;\n\t}", "public function getMai()\n {\n return $this->mai;\n }", "function getMonth () {\r\n\t\t\treturn $this->_dateNow(\"%m\");\r\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Output a tag_name XML tag from a given tag object
function wxr_tag_name( $tag ) { if ( empty( $tag->name ) ) return; echo '<wp:tag_name>' . wxr_cdata( $tag->name ) . '</wp:tag_name>'; }
[ "function automatic_exporter_wxr_tag_name( $tag ) {\n\t\tif ( empty( $tag->name ) )\n\t\t\treturn;\n\n\t\techo '<wp:tag_name>' . automatic_exporter_wxr_cdata( $tag->name ) . '</wp:tag_name>';\n\t}", "function output_tag($name='',$content='',$attrs='')\n{\n echo tag($name,$content,$attrs);\n}", "function tag($name);", "public function tag()\n\t{\n\t\t$out = '<' . $this->element_name;\n\t\t\n\t\tforeach ( $this->html_attributes() as $property => $value )\n\t\t\tif ( $value or $property == 'alt' )\n\t\t\t\t$out .= \" $property=\\\"$value\\\"\";\n\t\t\n\t\tif ( $this->is_empty )\n\t\t\treturn $out . ' />';\n\t\t\t\t\t\n\t\t$out .= '>' . $this->newline();\n\t\t\t\t\n\t\tforeach ( $this->contents as $item )\n\t\t\t\n\t\t\tif ( $item instanceof soo_html )\n\t\t\t\t$out .= $item->tag();\t\t\n\t\t\telse\n\t\t\t\t$out .= $item;\n\t\t\n\t\treturn $out . $this->newline() . \"</$this->element_name>\" . $this->newline();\n\t}", "function tag($tag_name, $tag_content) {\n return '<'.$tag_name.'>'.$tag_content.'</'.$tag_name.'>';\n }", "function _xmlTagify($obj, $depth = 0) {\n // Safety \n if ($depth > 50) return '';\n\n $xml = '';\n foreach ($obj as $tag => $data) {\n switch (gettype($data)) {\n case 'object':\n case 'array':\n $xml .= \"<{$tag}>\" . $this->_xmlTagify($data, $depth + 1) . \"</{$tag}>\";\n break;\n default:\n $xml .= \"<{$tag}>\" . $this->_xmlEscape($data) . \"</{$tag}>\";\n break;\n }\n }\n\n return $xml;\n }", "function in_tag (&$obj,$tag,$attrs=array()){$this->tag($tag,$obj->output(TRUE),$attrs);}", "public static function tag() {\n\n\t\t$args = self::__prepareArguments( func_get_args() );\n\t\t$tag = self::_createTag( $args[\"nodename\"] );\n\n\t\tif ( isset( $args[\"attributes\"] ) ) {\n\n\t\t\tforeach ( $args[\"attributes\"] as $id => $attr ) {\n\n\t\t\t\tif ( $attr[\"type\"] === \"attribute\" ) {\n\n\t\t\t\t\t$attribute = $attr[\"key\"];\n\t\t\t\t\tif ( ! $attribute ) $attribute = \"+\";\n\t\t\t\t\tif ( is_numeric( $attribute ) ) $attribute = \"+\".$attribute;\n\t\t\t\t\t$tag->{ $attribute }( (string) $attr[\"data\"] );\n\n\t\t\t\t} elseif ( $attr[\"type\"] === \"append\" ) {\n\n\t\t\t\t\tif ( ! is_object( $attr[\"data\"] ) ) $tag->append( (string) $attr[\"data\"] );\n\t\t\t\t\telse $tag->append( $attr[\"data\"] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $tag;\n\t}", "function zensus_xmlclose_tag($tag_name)\n{\n $xml_tag_string = \"</\" . $tag_name . \">\\n\";\n return $xml_tag_string;\n}", "function tag($name='',$content='',$attrs='')\n{\n return \"<${name} ${attrs}>${content}</${name}>\";\n}", "function tag_display_name($tagobject, $html=TAG_RETURN_HTML) {\n\n global $CFG;\n\n if(!isset($tagobject->name)) {\n return '';\n }\n\n if (empty($CFG->keeptagnamecase)) {\n //this is the normalized tag name\n $textlib = textlib_get_instance();\n $tagname = $textlib->strtotitle($tagobject->name);\n } else {\n //original casing of the tag name\n $tagname = $tagobject->rawname;\n }\n\n if ($html == TAG_RETURN_TEXT) {\n return $tagname;\n } else { // TAG_RETURN_HTML\n return htmlspecialchars($tagname);\n }\n}", "function tag($name='',$content='',$attrs='')\n {\n return \"<${name} ${attrs}>${content}</${name}>\";\n }", "private function displayTag($tagName)\n { ?>\n <label class=\"text-white tags\">\n <?php echo $tagName ?>\n <input type=\"checkbox\" name=\"<?php echo $tagName ?>\" class=\"custom-checkbox\"/>\n </label>\n <?php\n }", "public final function startTag() : string\n {\n return $this->name ? '<' . $this->name . $this->attributes() . (static::$xhtml && $this->isEmpty ? ' />' : '>') : '';\n }", "public function get_tag();", "function writeElement($tag, $value)\r\n{\r\n writeStartTag($tag);\r\n echo htmlspecialchars($value);\r\n writeCloseTag($tag);\r\n}", "function FF_TagSelectXML($v_TagID=0,$v_TagName=''){return '<tag-select><ID>'.$v_TagID.'</ID><name>'.$v_TagName.'</name></tag-select>';}", "function output_single_tag($name='', $attrs='')\n {\n echo single_tag($name,$attrs);\n }", "public static function tag() {\n\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\techo self::get_tag( ...func_get_args() );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if received data is correct
public function checkReceivedData($result, $data){ return false; }
[ "protected function hasIncomingData()\n {\n if (is_resource($this->innerStream)) {\n $this->readBytes = 0;\n\n return true;\n }\n\n if ($this->socket === null) {\n $this->createSocket();\n } elseif ($this->socket === false) {\n throw new \\Kafka\\Exception(\n \"Kafka channel could not be created.\"\n );\n }\n\n if (!$this->readable) {\n throw new \\Kafka\\Exception(\n \"Request has not been sent - maybe a connection problem.\"\n );\n $this->responseSize = null;\n }\n\n if ($this->responseSize === null) {\n $bytes32 = @fread($this->socket, 4);\n if (!$bytes32) {\n $this->close();\n throw new \\Kafka\\Exception\\EndOfStream(\n \"Could not read kafka response header.\"\n );\n }\n $this->responseSize = current(unpack('N', $bytes32));\n $bytes16 = $this->read(2);\n $errorCode = current(unpack('n', $bytes16));\n if ($errorCode != 0) {\n throw new \\Kafka\\Exception(\n \"Kafka response channel error code: $errorCode\"\n );\n }\n }\n\n //has the request been read completely ?\n if ($this->responseSize < 0) {\n throw new \\Kafka\\Exception(\n \"Corrupt response stream!\"\n );\n } elseif ($this->responseSize == 0) {\n $this->readable = false;\n $this->responseSize = null;\n\n return false;\n } else {\n $this->readBytes = 0;\n\n return true;\n }\n }", "public function isErrorReceived(): bool\n {\n if ((isset($this->decodedData['ok']) && $this->decodedData['ok'] === true)) {\n return false;\n }\n\n return true;\n }", "protected function receiveHeader()\r\n {\r\n if(strlen($this->bufferData) > 8)\r\n {\r\n $header = substr($this->bufferData,0,8);\r\n $this->waitingFor = intval($header);\r\n $this->bufferData = substr($this->bufferData,8);\r\n $this->headerReceived = true;\r\n return strlen($this->bufferData) > 0;\r\n }\r\n return false;\r\n }", "protected function emitData()\n {\n if ($this->data === '')\n {\n return false;\n }\n \n if ($this->readChunkSize === null || $this->readChunkSize < 0)\n {\n $send = $this->data;\n $this->data = '';\n }\n else\n {\n $send = substr($this->data, 0, $this->readChunkSize);\n $this->data = substr($this->data, $this->readChunkSize);\n }\n \n if(strlen($send) >0)\n {\n $this->emit('data', [$send]);\n }\n \n return strlen($this->data) >0;\n }", "public function testIsReadyToreadExceptionnalDataReturnsTrueIfStreamChanged()\n {\n runkit_function_redefine('stream_select', '', self::STREAM_SOCKET_RETURN_ONE);\n\n $method = $this->stream_socket_reflection->getMethod('is_ready_to_read_exceptional_data');\n $method->setAccessible(TRUE);\n\n $property = $this->stream_socket_reflection->getProperty('handle');\n $property->setAccessible(TRUE);\n //to prevent the method to try to create the handle\n $property->setValue($this->stream_socket, fopen('./test.txt', 'a'));\n\n $return = $method->invokeArgs($this->stream_socket, array(FALSE, FALSE, TRUE));\n\n $this->assertTrue($return);\n\n unlink('./test.txt');\n }", "public function testSampleData() {\n if (isset($this->sampleData) && strlen($this->sampleData) === $this->sampleDataLength) {\n $this->pass(\"The sample data exists and appears to be the correct length.\");\n }\n else {\n $this->fail(\"The sample data is missing or damaged.\");\n }\n }", "public function isData()\n {\n return $this->opcode & 0x0 === 0x00;\n }", "public function detectError()\n {\n $size = $this->_fill();\n \n $pos = strpos($this->buffer, \"\\x00\\x01\", $this->pos);\n if(false === $pos || $this->padded($pos))\n return false;\n \n if($pos == $size - 2)\n {\n //Command Protocol error\n $this->read();\n return $this->read();\n }\n else\n {\n //Query Command Protocol error\n $this->read();\n $this->readSingle();\n return $this->read();\n }\n \n }", "private function\tcheckHandshake(string $data)\n\t{\n\t\t// Verify info_hash.\n\t\tif (substr($data, 28, 20) === substr($this->state['handshake'], 28, 20))\n\t\t{\n\t\t\t$this->state['handshake'] = 'ok';\n\t\t\t$this->notify('handshake-ok');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->conn->close();\n\t\t\t$this->notify('handshake-ko');\n\t\t}\n\t}", "public function testIsReadyToreadExceptionnalDataReturnsFalseIfStreamNotChanged()\n {\n runkit_function_redefine('stream_select', '', self::STREAM_SOCKET_RETURN_ZERO);\n\n $method = $this->stream_socket_reflection->getMethod('is_ready_to_read_exceptional_data');\n $method->setAccessible(TRUE);\n\n $property = $this->stream_socket_reflection->getProperty('handle');\n $property->setAccessible(TRUE);\n //to prevent the method to try to create the handle\n $property->setValue($this->stream_socket, fopen('./test.txt', 'a'));\n\n $return = $method->invokeArgs($this->stream_socket, array(FALSE, FALSE, TRUE));\n\n $this->assertFalse($return);\n\n unlink('./test.txt');\n }", "function isDataValid()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function data()\n {\n $error = '';\n\n if( $this->Connected()\n AND $this->SendData('DATA')\n AND substr($error = $this->getData(), 0, 3) === '354' ){\n \n return true;\n\n }\n \n throw new SMTPException(trim(substr($error, 3)));\n }", "public function validate($data) {\n $result = parent::validate($data);\n if ($result !== true) {\n return $result;\n }\n $runningmethod = get_config('antivirus_clamav', 'runningmethod');\n if ($runningmethod === 'unixsocket') {\n $socket = stream_socket_client('unix://' . $data, $errno, $errstr, ANTIVIRUS_CLAMAV_SOCKET_TIMEOUT);\n if (!$socket) {\n return get_string('errorcantopensocket', 'antivirus_clamav', \"$errstr ($errno)\");\n } else {\n // Send PING query to ClamAV socket to check its running state.\n fwrite($socket, \"nPING\\n\");\n $response = stream_get_line($socket, 4);\n fclose($socket);\n if ($response !== 'PONG') {\n return get_string('errorclamavnoresponse', 'antivirus_clamav');\n }\n }\n }\n return true;\n }", "private function isBodyFullyReceived() {\n\t\treturn $this->getBodyLength() <= strlen($this->getResponseBody());\n\t}", "function checkIntegrity()\n {\n\t\t$this->_logger->log(__METHOD__);\n\t\t\n\t\t// sometimes arrived message can contain casual symbols before @ or after $\n\t\t// we should strip them to work with clear message\n $occurances_at = strpos($this->message_obj->message, '@');\n $occurances_dl = strpos($this->message_obj->message, '$');\n\t\t\n if (($occurances_at !== false) && ($occurances_dl !== false))\n\t\t{\n $this->message_obj->message = substr($this->message_obj->message, $occurances_at);\n \n $len = strlen($this->message_obj->message);\n $occurances_dl = ($len - strpos($this->message_obj->message, '$') - 1)*(-1);\n \n if ($occurances_dl)\n\t\t\t{\n $this->message_obj->message = substr($this->message_obj->message, 0, $occurances_dl);\n }\n } \n \n\t\t// check if arrived message - is line from Rain Datalogger's log OR is regular message\n $rg_log_pattern = '/^\\d{2}\\/\\d{2}\\/\\d{2},\\d{2}:\\d{2},\\d{3},\\d{0,5}$/';\n \n if (preg_match($rg_log_pattern, $this->message_obj->message))\n\t\t{\n $this->_message_type = 'rg_log';\n $this->_type = 'rain';\n } \n\t\telse\n\t\t{\n $this->_message_type = 'message';\n }\n \n\t\t$this->_logger->log(__METHOD__ .' Message type detected', array('type' => $this->_message_type));\n \n // if arrived message - is regular message \n if ($this->_message_type == 'message')\n\t\t{\n // message must start with @\n if (substr($this->message_obj->message, 0, 1) != '@')\n\t\t\t{\n $this->pushError('start_missed', 'Record does not start with @');\n }\n\n\t\t\t// message must end with $\n if (substr($this->message_obj->message, -1, 1) != '$')\n\t\t\t{\n $this->pushError('end_missed', 'Record does not end with $');\n }\n\n if (!$this->errors)\n\t\t\t{\n\t\t\t\t// Rain DataLogger's message has R at 22nd position\n if (substr($this->message_obj->message, 21, 1) == 'R')\n\t\t\t\t{\n $this->_type = 'rain';\n $this->_header = substr($this->message_obj->message, 0, 21);\n }\n\t\t\t\telse\n\t\t\t\t{\n $this->_type = 'aws';\n $this->_header = substr($this->message_obj->message, 0, 19);\n }\n\n\t\t\t\t// footer - is last 8 symbols of message without first and last symbols\n $this->_footer = substr($this->message_obj->message, -9, -1);\n \n\t\t\t\t// crc source - is CRC code of other part of the message\n $compare_with_crc = substr($this->message_obj->message, 1, -9);\n \n\t\t\t\t$check_str = It::prepareCRC($compare_with_crc);\n \n\t\t\t\tif ($check_str !== $this->_footer)\n\t\t\t\t{\n $this->pushError('crc_wrong', 'CRC code is incorrect');\n }\n }\n }\n \n if (!$this->errors)\n\t\t{\n \t// RG log line, AWS and Rain messages have different position of date and time\n\t\t\t// RG message also has battery voltage value without specific sensor\n\t\t\t// station ID is located just after date and time substrings, so we can get it by the way\n if ($this->_message_type == 'rg_log')\n\t\t\t{\n $this->_tx_date = str_replace('/', '', substr($this->message_obj->message, 0, 8));\n $this->_tx_time = str_replace(':', '', substr($this->message_obj->message, 9, 5));\n \n\t\t\t\t$this->rg_battery_voltage = substr($this->message_obj->message, 15, 3);\n\t\t\t\t\n $this->_body = substr($this->message_obj->message, 19);\n \n $this->getStation('', $this->message_obj->station_id);\n }\n\t\t\telse\n\t\t\t{\n if ($this->_type == 'aws')\n\t\t\t\t{\n\t\t\t\t\t// starts from 20s symbol and discards 9 symbols from end (CRC)\n $this->_body = substr($this->message_obj->message, 19, -9); \n \n\t\t\t\t\t$this->_tx_date = substr($this->message_obj->message, 7, 6);\n $this->_tx_time = substr($this->message_obj->message, 13, 4);\n\n $station_id = substr($this->message_obj->message, 2, 5);\n } \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// starts from 22d symbol and discards 9 symbols from end (CRC)\n $this->_body = substr($this->message_obj->message, 21, -9);\n\t\t\t\t\t\n $this->_tx_date = substr($this->message_obj->message, 6, 6);\n $this->_tx_time = substr($this->message_obj->message, 12, 4);\n $this->rg_battery_voltage = substr($this->message_obj->message, 16, 3);\n\n $station_id = substr($this->message_obj->message, 2, 4);\n }\n\t\t\t\t\n $this->getStation($station_id);\n }\n // Check length string of DATE & TIME\n // Good if strlen(date + time) == 6 + 4 and date + time is numeric\n if (empty($this->_tx_date)\n || empty($this->_tx_time)\n || strlen($this->_tx_date . $this->_tx_time) != 10\n || !is_numeric($this->_tx_date . $this->_tx_time)\n ){\n $this->pushError('date_format', 'Time or date is incorrect:' . $this->_tx_date . $this->_tx_time);\n }\n }\n }", "function checkIntegrity()\n {\n\t\t$this->_logger->log(__CLASS__.' '.__METHOD__);\n\t\t\n\t\t// sometimes arrived message can contain casual symbols before @ or after $\n\t\t// we should strip them to work with clear message\n $occurances_at = strpos($this->message, '@');\n $occurances_dl = strpos($this->message, '$');\n\t\t\n if (($occurances_at !== false) && ($occurances_dl !== false))\n\t\t{\n $this->message = substr($this->message, $occurances_at);\n \n $len = strlen($this->message);\n $occurances_dl = ($len - strpos($this->message, '$') - 1)*(-1);\n \n if ($occurances_dl)\n\t\t\t{\n $this->message = substr($this->message, 0, $occurances_dl);\n }\n } \n \n\t\t// check if arrived message - is line from Rain Datalogger's log OR is regular message\n $rg_log_pattern = '/^\\d{2}\\/\\d{2}\\/\\d{2},\\d{2}:\\d{2},\\d{3},\\d{0,5}$/';\n \n if (preg_match($rg_log_pattern, $this->message))\n\t\t{\n $this->_message_type = 'rg_log';\n $this->_type = 'rain';\n } \n\t\telse\n\t\t{\n $this->_message_type = 'message';\n }\n \n\t\t$this->_logger->log(__CLASS__.' '.__METHOD__ .' Message type detected', array('type' => $this->_message_type));\n \n // if arrived message - is regular message \n if ($this->_message_type == 'message')\n\t\t{\n // message must start with @\n if (substr($this->message, 0, 1) != '@')\n\t\t\t{\n $this->pushError('start_missed', 'Record does not start with @');\n }\n\n\t\t\t// message must end with $\n if (substr($this->message, -1, 1) != '$')\n\t\t\t{\n $this->pushError('end_missed', 'Record does not end with $');\n }\n\n if (!$this->errors)\n\t\t\t{\n\t\t\t\t// Rain DataLogger's message has R at 22nd position\n if (substr($this->message, 21, 1) == 'R')\n\t\t\t\t{\n $this->_type = 'rain';\n $this->_header = substr($this->message, 0, 21);\n }\n\t\t\t\telse\n\t\t\t\t{\n $this->_type = 'aws';\n $this->_header = substr($this->message, 0, 19);\n }\n\n\t\t\t\t// footer - is last 8 symbols of message without first and last symbols\n $this->_footer = substr($this->message, -9, -1);\n \n\t\t\t\t// crc source - is CRC code of other part of the message\n $compare_with_crc = substr($this->message, 1, -9);\n \n\t\t\t\t$check_str = It::prepareCRC($compare_with_crc);\n \n\t\t\t\tif ($check_str !== $this->_footer)\n\t\t\t\t{\n $this->pushError('crc_wrong', 'CRC code is incorrect');\n }\n }\n }\n \n if (!$this->errors)\n\t\t{\n \t// RG log line, AWS and Rain messages have different position of date and time\n\t\t\t// RG message also has battery voltage value without specific sensor\n\t\t\t// station ID is located just after date and time substrings, so we can get it by the way\n if ($this->_message_type == 'rg_log')\n\t\t\t{\n $this->_tx_date = str_replace('/', '', substr($this->message, 0, 8));\n $this->_tx_time = str_replace(':', '', substr($this->message, 9, 5));\n \n\t\t\t\t$this->rg_battery_voltage = substr($this->message, 15, 3);\n\t\t\t\t\n $this->_body = substr($this->message, 19);\n }\n\t\t\telse\n\t\t\t{\n if ($this->_type == 'aws')\n\t\t\t\t{\n\t\t\t\t\t// starts from 20s symbol and discards 9 symbols from end (CRC)\n $this->_body = substr($this->message, 19, -9);\n \n\t\t\t\t\t$this->_tx_date = substr($this->message, 7, 6);\n $this->_tx_time = substr($this->message, 13, 4);\n\n $this->station_id = substr($this->message, 2, 5);\n } \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// starts from 22d symbol and discards 9 symbols from end (CRC)\n $this->_body = substr($this->message, 21, -9);\n\t\t\t\t\t\n $this->_tx_date = substr($this->message, 6, 6);\n $this->_tx_time = substr($this->message, 12, 4);\n $this->rg_battery_voltage = substr($this->message, 16, 3);\n\n $this->station_id = substr($this->message, 2, 4);\n }\n\n }\n // Check length string of DATE & TIME\n // Good if strlen(date + time) == 6 + 4 and date + time is numeric\n if (empty($this->_tx_date)\n || empty($this->_tx_time)\n || strlen($this->_tx_date . $this->_tx_time) != 10\n || !is_numeric($this->_tx_date . $this->_tx_time)\n ){\n $this->pushError('date_format', 'Time or date is incorrect:' . $this->_tx_date . $this->_tx_time);\n }\n\n $this->sensor_values = $this->parseSensorsValues($this->_body);\n }\n }", "protected function _validateReceivedHeader( $data ) {\n\t\tif ( $this->received_auth_header != $this->_buildAuthString( $data ) ) {\n\t\t\tthrow new Exception( 'Invalid data received from the API' );\n\t\t}\n\t}", "public function log_check()\n {\n if(@socket_recvfrom($this->socket, $buffer, 2048, 0, $from, $port))\n {\n //echo(\"got one from $from, $port -->$buffer\\n\");\n // parse buffer int [type] [filename] [timestamp] [data]\n $packet=explode(\" \",$buffer,3);\n \n if(\"F\"===$packet[0])\n {\n // Flush\n if(defined('LOGGERVERBOSE')) echo(\"Flush Request for $packet[1]\\n\");\n flush($packet[1]);\n }\n else if(\"L\"===$packet[0])\n {\n // Got a log entry, queue it up if all data is there.\n if( isset($packet[1]) && isset($packet[2]) )\n {\n // Call Insert to insert this entry\n $this->log_insert($packet[1],$packet[2]);\n }\n }\n }\n }", "public function checkResponse()\n {\n $this->setUpValidator();\n $this->setUpStorage();\n $this->setUpGenerator();\n $this->sendClientRequest();\n $this->validateResponse();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION : DELETE "hotel"
function deleteHotel($hotel_id) { $sql = "DELETE FROM hotel "; $sql .= "WHERE hotel_sec = '".$hotel_sec."' "; mysql_query($sql) or die("SQL : ".$sql."<br>ERROR : ". mysql_error()); return mysql_affected_rows(); }
[ "public function deleted(Hotel $hotel)\n {\n //\n }", "function delete() {\n\t\tglobal $DB_LINK, $db_table_restaurants;\n\t\t$sql = \"DELETE from $db_table_restaurants WHERE restaurant_id=\" . $DB_LINK->addq($_GET['restaurant_id'], get_magic_quotes_gpc());\n\t\t$rc = $DB_LINK->Execute($sql);\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\t}", "public function DeleteHotelAction($idhotel)\n {\n $em=$this->getDoctrine()->getManager();\n $hotel = $em->getRepository('MyAppEspritBundle:Hotel')->find($idhotel);\n $em->remove($hotel);\n $em->flush();\n return $this->redirectToRoute('my_app_esprit_displayhotel');\n }", "public function deleteVehicle($id){\n$response=$this->getDb()->query('DELETE FROM vehiculeList WHERE id = '.$id);\n}", "function supprimer_vehicule($idU)\n{\n\n require ('./modele/connect.php');\n\n $req = $pdo->prepare('DELETE FROM vehicule WHERE id_vehicule = :id_vehicule');\n $req->bindParam(':id_vehicule', $idU);\n $req->execute();\n\n}", "function deleteVoter($id){\n\n}", "public function deleteRoom(){\n }", "function delete_reservation($reservation_id) {\n global $db;\n $query = 'DELETE FROM room_reservations\n WHERE reservation_id = :reservation_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':reservation_id', $reservation_id);\n $statement->execute();\n $statement->closeCursor();\n }", "public function delete(){\r\n\t\t//delete\r\n\t\t$this->conn->setData(\"DELETE from room where roomNumber = :num\",array(\r\n\t\t\":num\"=> $this->roomNumber\r\n\t\t));\r\n\t}", "function deleteLeague();", "function delete_inventory_booking_location($primary_key){\n $tables = array('booking', 'inventories');\n $this->db->where('location_id', $primary_key);\n $this->db->delete($tables);\n \n }", "public function delete($lunch) { ; }", "function deleteRooms()\n {\n $rooms_table = Db::getInstance()->prefix . 'hoa_rooms';\n Db::getInstance()->query(\"DELETE FROM $rooms_table\");\n }", "public function delete(Food $food){\r\n $stmt = $this->db->prepare(\"DELETE FROM food WHERE id_food = ?\");\r\n $stmt->execute(array($food->getIdFood()));\r\n }", "public function delete($id = -1){\n\n $delete = $this\n ->db\n ->where(\"id\",$id)\n ->delete(\"personel\");\n\n echo $delete;\n }", "function m_deleteCity()\n {\n $this->obDb->query = \"DELETE FROM \".POSTAGECITY. \" WHERE iCityId=\".$this->request['id'];\n $this->obDb->updateQuery();\n $this->obDb->query =\"DELETE FROM \".POSTAGECITYDETAILS. \" WHERE fCityId=\".$this->request['id']; \n $this->obDb->updateQuery();\n $this->libFunc->m_mosRedirect(SITE_URL.\"admin/adminindex.php?action=settings.postageEditor&mode=cities\");\n exit;\n }", "function deleteDogGuestListEntry(){\n\n }", "public function delete($tipo_equipo);", "function deleteBicycleOutlet($id){\r\n \t$query =\"DELETE FROM bicycle_outlet WHERE id='\".$id.\"'\";\r\n \t$result = mysql_query($query) or trigger_error(mysql_error().\" \".$query);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the cum tranche2 si.
public function getCumTranche2Si(): ?float { return $this->cumTranche2Si; }
[ "public function getCumTranche2() {\n return $this->cumTranche2;\n }", "public function getCumTrCCaisse2() {\n return $this->cumTrCCaisse2;\n }", "public function getCumTrACaisse2() {\n return $this->cumTrACaisse2;\n }", "public function getCumTotSi() {\n return $this->cumTotSi;\n }", "public function getCumBaseTrCCaisse2() {\n return $this->cumBaseTrCCaisse2;\n }", "public function getCumTrancheDSansSi() {\n return $this->cumTrancheDSansSi;\n }", "public function getCumTrancheASansSi() {\n return $this->cumTrancheASansSi;\n }", "public function getCumTrancheC() {\n return $this->cumTrancheC;\n }", "public function getCumTrancheBSansSi() {\n return $this->cumTrancheBSansSi;\n }", "public function getCumBaseTrD1Caisse2() {\n return $this->cumBaseTrD1Caisse2;\n }", "public function getCumTrBCaisse1() {\n return $this->cumTrBCaisse1;\n }", "public function getCumTrACaisse1() {\n return $this->cumTrACaisse1;\n }", "public function setCumTranche2Si($cumTranche2Si) {\n $this->cumTranche2Si = $cumTranche2Si;\n return $this;\n }", "public function getCumPlafondSs2() {\n return $this->cumPlafondSs2;\n }", "public function getCumTrancheAsi() {\n return $this->cumTrancheAsi;\n }", "public function getCumPlaf1Caisse2() {\n return $this->cumPlaf1Caisse2;\n }", "public function getCumPlaf2Caisse1() {\n return $this->cumPlaf2Caisse1;\n }", "public function getCumBrutCaisse2() {\n return $this->cumBrutCaisse2;\n }", "public function getCumTrCCaisse3() {\n return $this->cumTrCCaisse3;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to generate OTP
function generateNumericOTP() { $n=6; // Take a OTPgenerator string which consist of // all numeric digits $OTPgenerator = "1357902468"; $linkGenerator = "abcd13579fghijklmnop02468eqrstuvwxyz"; // Iterate for n-times and pick a single character // from OTPgenerator and append it to $result // Login for generating a random character from OTPgenerator // ---generate a random number // ---take modulus of same with length of OTPgenerator (say i) // ---append the character at place (i) from OTPgenerator to result $result = ""; for ($i = 1; $i <= $n; $i++) { $result .= substr($OTPgenerator, (rand()%(strlen($OTPgenerator))), 1); } // Return result return $result; }
[ "public function createOTP();", "public function generateOTP()\n {\n return mt_rand(100000, 999999);\n }", "function generateOTP()\n {\n $order_id = JFactory::getApplication()->input->getInt('order_id', null, 'array');\n $diffusion_id = JFactory::getApplication()->input->getInt('diffusion_id', null, 'array');\n \n $orderdiffusion = JTable::getInstance('orderdiffusion', 'Easysdi_shopTable');\n $keys = array();\n $keys['order_id'] = (int) $order_id;\n $keys['diffusion_id'] = (int) $diffusion_id;\n $orderdiffusion->load($keys);\n \n $otp = Easysdi_coreHelper::pwd(128);\n \n //Generate the One Time Password\n if ($orderdiffusion->otp == \"\"){\n $orderdiffusion->otp = md5($otp);\n $orderdiffusion->store();\n \n //Send the password by email\n Easysdi_shopHelper::notifyCustomerOTP($order_id,$otp);\n }\n die();\n }", "public function genarateOTP(){\n\t\t$this->checkoutSession->setRandOtp('');\n\t\t$this->checkoutSession->setRandOtpStartTime('');\n\t\t$six_digit_random_number = mt_rand(100000, 999999);\n\t\t$this->checkoutSession->setRandOtp($six_digit_random_number);\n\t\t$this->checkoutSession->setRandOtpStartTime(time());\n\t}", "public function genrateOTP()\n {\n $genratr = '9571480326';\n $OTP = '';\n for ($i = 1; $i <= 6; $i++) {\n $OTP .= substr($genratr, (mt_rand() % (strlen($genratr))), 1);\n }\n return $OTP;\n }", "public function generateOtpCode()\n {\n $digits = $this->otp_code_length;\n $otp_code = str_pad(rand(0, pow(10, $digits)-1), $digits, '0', STR_PAD_LEFT);\n\n /**\n * make sure we get the exact length\n */\n if (strlen((string)$otp_code) != $digits) {\n return $this->generateOtpCode();\n }\n\n return $otp_code;\n }", "function smsgatewaycenter_com_OTP($length = 4, $chars = '0123456789'){\n $chars_length = (strlen($chars) - 1);\n $string = $chars{rand(0, $chars_length)};\n for ($i = 1; $i < $length; $i = strlen($string)){\n $r = $chars{rand(0, $chars_length)};\n if ($r != $string{$i - 1}) $string .= $r;\n }\n return $string;\n }", "public static function generateOtp()\n {\n $string = '0123456789';\n $string_shuffled = str_shuffle($string);\n $OTP = substr($string_shuffled, 1, 6);\n return $OTP;\n }", "public function getOTP()\n {\n $now = Carbon::now();\n $lifetime = 300; // 5 minutes\n $periods = intdiv($now->timestamp - $now->copy()->startOfDay()->timestamp, $lifetime);\n $unique = $now->toDateString() . $lifetime * $periods . $this->phone;\n $password = hash_hmac('sha512', $unique, config('app.key'));\n\n return substr(strtoupper($password), 0, 5);\n }", "public function generate_powr_token(){\n $alphabet = 'abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789';\n $pass = array(); //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 10; $i++) { //Add 10 random characters\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n $pass_string = implode($pass) . time(); //Add the current time to avoid duplicate keys\n return $pass_string; //turn the array into a string\n }", "public function createOTP()\n {\n return $this->getOTPHandler()->create();\n }", "function send_otp($email,$name)\n\n{\n\n $otp = mt_rand(100000, 999999);\n $msg = \"hello $name otp for Solve to Unlock registration: $otp\";\n if(mail($email,\"Otp for registration\",$msg))\n {\n return $otp;\n }\n\n else return 0;\n\n}", "function getOTP($key){\n\n /** Getting Time **/\n $time=$this->getTime10sec();\n\n /** Setting OpenSSL Encrypt variables **/\n $method = \"AES-256-CFB8\";\n $iv=2707201820180727;\n\n /** Encrypting */\n $encrypted = openssl_encrypt($time,$method,$key,0, $iv);\n\n /** Passing the encrypted string in hex */\n $hex = $this->strToHex($encrypted);\n\n /** Passing the hex into dec and taking only the last 6 digits */\n $dec = hexdec($hex);\n $dec = $dec / 1111111111111111111111111;\n $dec = $dec * $time;\n $dec = (int)$dec;\n $decLength=strlen($dec);\n $decLengthMinusSix=$decLength-7;\n $decLastSix = substr($dec,$decLengthMinusSix);\n\n /** Returning the 7 digits OTP code **/\n return $decLastSix;\n }", "public function testGenerate()\n {\n $otp = Yii::$app->otp;\n $auth = new Authenticator();\n\n $otp->create();\n $secret = $otp->getSecret();\n $this->assertInternalType('string', $secret);\n $auth->setSecret($secret);\n $this->assertTrue($otp->confirm($auth->code()));\n $code = $otp->generate();\n $this->assertInternalType('string', $code);\n $this->assertEquals($otp->digits, strlen($code));\n $this->assertTrue($auth->verify($code));\n }", "function createTicketID(){\n\t\t$chars = 'ABCDEFGHIJKLMNOPQRSTUVWZYZ0123456789';\n\t\tsrand((double)microtime()*1000000);\n\t\t$i = 0;\n\t\t$pass = '' ;\n\t\twhile ($i <= 7) {\n\t\t\t$num = rand() % 33;\n\t\t\t$tmp = substr($chars, $num, 1);\n\t\t\t$pass = $pass . $tmp;\n\t\t\t$i++;\n\t\t}\n\t\treturn $pass;\n\t}", "private function generarPassword() {\r\n $minusculas = \"abcdefghijklmnopqrstuvwxyz\";\r\n $mayusculas = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n $numeros = \"1234567890\";\r\n $may = \"\";\r\n $min = \"\";\r\n $num = \"\";\r\n for ($i = 0; $i < 11; $i++) {\r\n $min .= substr($minusculas, rand(0, 26), 1);\r\n $may .= substr($mayusculas, rand(0, 26), 1);\r\n $num .= substr($numeros, rand(0, 10), 1);\r\n }\r\n $password = substr($may, 0, 2) . substr($min, 0, 5) . '-' . substr($num, 0, 3);\r\n return $password;\r\n }", "public function generatePassword() {\n // Make sure that parameters don't overlap in such a way as to make\n // validation impossible.\n $this->_sanitizeInputs();\n // Initialise variable.\n $password = '';\n // Add lower case letters.\n $lowerLetters = 'aeiubdghjmnpqrstvxyz';\n if ($this->forgot_pass['minLowerCase'] != 0) {\n for ($i = 0; $i < $this->forgot_pass['minLowerCase']; ++$i) {\n $password .= $lowerLetters[(rand() % strlen($lowerLetters))];\n }\n }\n // Add upper case letters.\n $upperLetters = 'AEUBDGHJLMNPQRSTVWXYZ';\n if ($this->forgot_pass['minUpperCase'] != 0) {\n for ($i = 0; $i < $this->forgot_pass['minUpperCase']; ++$i) {\n $password .= $upperLetters[(rand() % strlen($upperLetters))];\n }\n }\n // Add letters.\n if (($this->forgot_pass['minLowerCase'] + $this->forgot_pass['minUpperCase']) < ($this->forgot_pass['minLetters'])) {\n $password .= $lowerLetters[(rand() % strlen($lowerLetters))];\n }\n // Add numbers.\n $numbers = '23456789';\n if ($this->forgot_pass['minNumbers'] != 0) {\n for ($i = 0; $i < $this->forgot_pass['minNumbers']; ++$i) {\n $password .= $numbers[(rand() % strlen($numbers))];\n }\n }\n // Add symbols using the symbols array.\n if ($this->forgot_pass['maxSymbols'] != 0) {\n $symbols = implode('', $this->forgot_pass['allowedSymbols']);\n if ($this->forgot_pass['minSymbols'] != 0 && strlen($symbols) > 0) {\n for ($i = 0; $i < $this->forgot_pass['minSymbols']; ++$i) {\n $password .= $symbols[(rand() % strlen($symbols))];\n }\n }\n }\n // If the created password isn't quite long enough then add some lowercase\n // letters to the password string.\n if (strlen($password) < $this->forgot_pass['minLength']) {\n while (strlen($password) < $this->forgot_pass['minLength']) {\n $password .= $lowerLetters[(rand() % strlen($lowerLetters))];\n }\n }\n // Shuffle the characters in the password.\n $password = str_shuffle($password);\n // Return the password string.\n return $password;\n }", "public static function generate_password(){\n\n\t\t$pass = mt_rand(100000, 900000);\n\t\t$pass = md5($pass + time());\n\t\t$pass = mb_strcut($pass, 1, 7);\n\n\t\treturn $pass;\n\n\t}", "protected function generate() {\n $characters = '123456789abcdefghijklmnpqrstuvwxyz';\n $string = '';\n $max = strlen($characters) - 1;\n for ($p = 0; $p < $this->codeLength; $p++) {\n $string .= $characters[mt_rand(0, $max)];\n }\n return $string;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the workProfilePasswordPreviousPasswordBlockCount property value. Number of previous work profile passwords to block. Valid values 0 to 24
public function setWorkProfilePasswordPreviousPasswordBlockCount(?int $value): void { $this->getBackingStore()->set('workProfilePasswordPreviousPasswordBlockCount', $value); }
[ "public function setPasswordPreviousPasswordBlockCount($val)\n {\n $this->_propDict[\"passwordPreviousPasswordBlockCount\"] = intval($val);\n return $this;\n }", "public function getWorkProfilePasswordPreviousPasswordBlockCount()\n {\n if (array_key_exists(\"workProfilePasswordPreviousPasswordBlockCount\", $this->_propDict)) {\n return $this->_propDict[\"workProfilePasswordPreviousPasswordBlockCount\"];\n } else {\n return null;\n }\n }", "public function setPasscodePreviousPasscodeBlockCount($val)\n {\n $this->_propDict[\"passcodePreviousPasscodeBlockCount\"] = intval($val);\n return $this;\n }", "public function setPasswordPreviousPasswordBlockCount(?int $value): void {\n $this->getBackingStore()->set('passwordPreviousPasswordBlockCount', $value);\n }", "public function getPasswordPreviousPasswordBlockCount()\n {\n if (array_key_exists(\"passwordPreviousPasswordBlockCount\", $this->_propDict)) {\n return $this->_propDict[\"passwordPreviousPasswordBlockCount\"];\n } else {\n return null;\n }\n }", "public function setPinPreviousBlockCount($val)\n {\n $this->_propDict[\"pinPreviousBlockCount\"] = intval($val);\n return $this;\n }", "public function getPasscodePreviousPasscodeBlockCount()\n {\n if (array_key_exists(\"passcodePreviousPasscodeBlockCount\", $this->_propDict)) {\n return $this->_propDict[\"passcodePreviousPasscodeBlockCount\"];\n } else {\n return null;\n }\n }", "public function setPreviousPinBlockCount(?int $value): void {\n $this->getBackingStore()->set('previousPinBlockCount', $value);\n }", "public function setPinPreviousBlockCount(?int $value): void {\n $this->getBackingStore()->set('pinPreviousBlockCount', $value);\n }", "public function getPreviousPinBlockCount()\n {\n if (array_key_exists(\"previousPinBlockCount\", $this->_propDict)) {\n return $this->_propDict[\"previousPinBlockCount\"];\n } else {\n return null;\n }\n }", "public function getPinPreviousBlockCount()\n {\n if (array_key_exists(\"pinPreviousBlockCount\", $this->_propDict)) {\n return $this->_propDict[\"pinPreviousBlockCount\"];\n } else {\n return null;\n }\n }", "public function setWorkProfilePasswordSignInFailureCountBeforeFactoryReset($val)\n {\n $this->_propDict[\"workProfilePasswordSignInFailureCountBeforeFactoryReset\"] = intval($val);\n return $this;\n }", "public function getPasswordPreviousPasswordCountToBlock(): ?int {\n $val = $this->getBackingStore()->get('passwordPreviousPasswordCountToBlock');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'passwordPreviousPasswordCountToBlock'\");\n }", "public function setPasswordMaximumAttemptCount($val)\n {\n $this->_propDict[\"passwordMaximumAttemptCount\"] = intval($val);\n return $this;\n }", "public function setMaximumPreAuthenticationAttempts($val)\n {\n $this->_propDict[\"maximumPreAuthenticationAttempts\"] = intval($val);\n return $this;\n }", "public function setWorkProfilePasswordSignInFailureCountBeforeFactoryReset(?int $value): void {\n $this->getBackingStore()->set('workProfilePasswordSignInFailureCountBeforeFactoryReset', $value);\n }", "public function setPasscodeSignInFailureCountBeforeWipe($val)\n {\n $this->_propDict[\"passcodeSignInFailureCountBeforeWipe\"] = intval($val);\n return $this;\n }", "public function setNumberOfPreviousSessions($a_num)\n\t{\n\t\t$this->session_prev = $a_num;\n\t}", "public function setWorkProfilePasswordMinimumLength(?int $value): void {\n $this->getBackingStore()->set('workProfilePasswordMinimumLength', $value);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
true if currently handling an error / err_global_handler NUMBER STRING FILE LINE CONTEXT Handler for all categories of errors.
function err_global_handler($num, $str, $file, $line, $context) { global $err_handler_log; global $err_handler_display; global $err_handling_error; // PHP5.1RC* a bit overzealous about strict errors, even if not set to display: if (version_compare(phpversion(), "5.0") >= 0 && $num == E_STRICT) { return; } $err_handling_error = true; if (isset($err_handler_log) && $num != E_USER_NOTICE) $err_handler_log($num, $str, $file, $line, $context); if (isset($err_handler_display)) $err_handler_display($num, $str, $file, $line, $context); else $err_handler_log($num, "no error display handler set", $file, $line, $context); exit(1); }
[ "function _isdef_error_handler( $errno, $errstr, $errfile, $errline, $errcontext ) {\n $GLOBALS['_isdef_error_detected'] = TRUE;\n return TRUE;\n}", "public static function isErrorHandlingEnabled()\n {\n return self::$errHandling;\n }", "function pmf_error_handler($level, $message, $filename, $line, $context)\n{\n // Sanity check\n // Note: when DEBUG mode is true we want to track any error!\n if (\n // 1. the @ operator sets the PHP's error_reporting() value to 0\n (!DEBUG && (0 == error_reporting()))\n // 2. Honor the value of PHP's error_reporting() function\n || (!DEBUG && (0 == ($level & error_reporting())))\n ) {\n // Do nothing\n return true;\n }\n\n // Cleanup potential sensitive data\n $filename = (DEBUG ? $filename : basename($filename));\n\n $errorTypes = array(\n E_ERROR => 'error',\n E_WARNING => 'warning',\n E_PARSE => 'parse error',\n E_NOTICE => 'notice',\n E_CORE_ERROR => 'code error',\n E_CORE_WARNING => 'core warning',\n E_COMPILE_ERROR => 'compile error',\n E_COMPILE_WARNING => 'compile warning',\n E_USER_ERROR => 'user error',\n E_USER_WARNING => 'user warning',\n E_USER_NOTICE => 'user notice',\n E_STRICT => 'strict warning',\n E_RECOVERABLE_ERROR => 'recoverable error',\n E_DEPRECATED => 'deprecated warning',\n E_USER_DEPRECATED => 'user deprecated warning',\n );\n $errorType = 'unknown error';\n if (isset($errorTypes[$level])) {\n $errorType = $errorTypes[$level];\n }\n\n // Custom error message\n $errorMessage = sprintf(\n '<br><strong>phpMyFAQ %s</strong> [%s]: %s in <strong>%s</strong> on line <strong>%d</strong><br>',\n $errorType,\n $level,\n $message,\n $filename,\n $line\n );\n\n if (ini_get('display_errors')) {\n print $errorMessage;\n }\n if (ini_get('log_errors')) {\n error_log(sprintf('phpMyFAQ %s: %s in %s on line %d',\n $errorType,\n $message,\n $filename,\n $line)\n );\n }\n\n switch ($level) {\n // Blocking errors\n case E_ERROR:\n case E_PARSE:\n case E_CORE_ERROR:\n case E_COMPILE_ERROR:\n case E_USER_ERROR:\n // Prevent processing any more PHP scripts\n exit();\n break;\n // Not blocking errors\n default:\n break;\n }\n\n return true;\n}", "function handleError()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlers = atkconfig('error_handlers', array('mail'=>array('mailto' => atkconfig('mailreport'))));\n\tforeach ($errorHandlers as $key => $value)\n\t{\n\t\tif (is_numeric($key))\n\t\t$key = $value;\n\t\t$errorHandlerObject = atkErrorHandlerBase::get($key, $value);\n\t\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n\t}\n}", "function sp_error_handler($errno, $errstr, $errfile, $errline)\n{\n // @ used\n if (error_reporting() === 0) {\n return false;\n }\n\n $e = new ErrorException($errstr, 0, $errno, $errfile, $errline);\n sp_exception_handler($e);\n\n return true;\n}", "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n\t// Build the error message:\n\t$message = \"An error occurred in script '$e_file' on line $e_line:\\n$e_message\\n\";\n\t\n\t// Add the backtrace:\n\t$message .= \"<pre>\" .print_r(debug_backtrace(), 1) . \"</pre>\\n\";\n\t\n\t// Or just append $e_vars to the message:\n\t//\t$message .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n\";\n\n\tif (!LIVE) { // Show the error in the browser.\n\t\t\n\t\techo '<div class=\"error\">' . nl2br($message) . '</div>';\n\n\t} else { // Development (print the error).\n\n\t\t// Send the error in an email:\n\t\terror_log ($message, 1, CONTACT_EMAIL, 'From:admin@centcloud.com');\n\t\t\n\t\t// Only print an error message in the browser, if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\n\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div>';\n\t\t}\n\n\t} // End of $live IF-ELSE.\n\t\n\treturn true; // So that PHP doesn't try to handle the error, too.\n\n}", "function vg_error_handler($errno, $errstr, $errfile, $errline)\n{\n\tglobal $page;\n\n\t$mask = ini_get('error_reporting');\n\n\t$class = 'error';\n\n\t// If mask for this error is not enabled, return silently\n\tif (!($errno & $mask)) {\n\t\treturn true;\n\t}\n\n\t// Remove any preceding path until viewgit's directory\n\t$file = $errfile;\n\t$file = strstr($file, 'viewgit/');\n\n\t$message = \"$file:$errline $errstr [$errno]\";\n\n\tswitch ($errno) {\n\t\tcase E_ERROR:\n\t\t\t$class = 'error';\n\t\t\tbreak;\n\t\tcase E_WARNING:\n\t\t\t$class = 'warning';\n\t\t\tbreak;\n\t\tcase E_NOTICE:\n\t\tcase E_STRICT:\n\t\tdefault:\n\t\t\t$class = 'info';\n\t\t\tbreak;\n\t}\n\n\t$page['notices'][] = array(\n\t\t'message' => $message,\n\t\t'class' => $class,\n\t);\n\n\treturn true;\n}", "function MyErrHandler($errno, $errstr, $errfile, $errline, $errcontext, $errbacktrace = false, $bypassinternal = true, $errsavefile = 'php_errors.log')\n{\n // Return to PHP error handler if this error code\n // is not included in error_reporting bitmask.\n if (!(error_reporting() & $errno)) {\n return false;\n }\n\n // In case there's no timezone set or not present in php.ini\n // we will set this to UTC here and suppress any nagging.\n date_default_timezone_set(@date_default_timezone_get());\n\n $filename = (!isset($errsavefile) || empty($errsavefile)) ? 'php_errors.log' : trim($errsavefile);\n $error_string = date(\"Y-m-d H:i:s\");\n\n /**\n * The below values are used to build up a bitmask that specifies which errors to\n * report. You can use the bitwise operators to combine these values or mask out\n * certain types of errors. Note that only '|', '~', '!', '^' and '&' will be\n * understood within php.ini. You may use these constant names in php.ini but not\n * outside of PHP, like in httpd.conf, where you'd use the bitmask values instead.\n */\n switch ($errno) {\n\n // Fatal run-time errors. These indicate errors that can not be recovered from,\n // such as a memory allocation problem. Execution of the script is halted.\n case E_ERROR:\n $error_string .= \"** FATAL ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Error on line $errline in file $errfile\";\n break;\n\n // Run-time warnings (non-fatal errors). Execution of the script is not halted.\n case E_WARNING:\n $error_string .= \"** WARNING ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Warning on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Compile-time parse errors. Parse errors should only be generated by the parser.\n case E_PARSE:\n $error_string .= \"** PARSE ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Parse exception on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Run-time notices. Indicate that the script encountered something that could\n // indicate an error, but could also happen in the normal course of running a script.\n case E_NOTICE:\n $error_string .= \"** NOTICE ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Notice on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Fatal errors that occur during PHP's initial startup. This is like an E_ERROR,\n // except it is generated by the core of PHP.\n case E_CORE_ERROR:\n $error_string .= \"** CORE_ERROR ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Core error on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Warnings (non-fatal errors) that occur during PHP's initial startup. This is like\n // an E_WARNING, except it is generated by the core of PHP.\n case E_CORE_WARNING:\n $error_string .= \"** CORE_WARNING ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Core warning on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Fatal compile-time errors. This is like an E_ERROR, except it is generated by\n // the Zend Scripting Engine.\n case E_COMPILE_ERROR:\n $error_string .= \"** COMPILE_ERROR ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Compile error on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Compile-time warnings (non-fatal errors). This is like an E_WARNING, except it\n // is generated by the Zend Scripting Engine.\n case E_COMPILE_WARNING:\n $error_string .= \"** COMPILE_WARNING ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Compile warning on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // User-generated error message. This is like an E_ERROR, except it is generated in\n // PHP code by using the PHP function trigger_error().\n case E_USER_ERROR:\n $error_string .= \"** USER_ERROR ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" User error on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // User-generated notice message. This is like an E_WARNING, except it is generated in\n // PHP code by using the PHP function trigger_error().\n case E_USER_WARNING:\n $error_string .= \"** USER_WARNING ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" User warning on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // User-generated notice message. This is like an E_NOTICE, except it is generated in\n // PHP code by using the PHP function trigger_error().\n case E_USER_NOTICE:\n $error_string .= \"** USER_NOTICE ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" User notice on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Enable to have PHP suggest changes to your code which will ensure the best\n // interoperability and forward compatibility of your code. NOTE: This option\n // is *not* included in E_ALL until PHP 5.4.\n case E_STRICT:\n $error_string .= \"** STRICT ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Strict exception on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Run-time notices. Enable this to receive warnings about code that will not\n // work in future versions of PHP.\n case E_DEPRICATED:\n $error_string .= \"** DEPRICATED ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Depricated exception on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // User-generated warning message. This is like an E_DEPRECATED, except it is\n // generated in PHP code by using the PHP function trigger_error().\n case E_USER_DEPRICATED:\n $error_string .= \"** USER_DEPRICATED ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" User depricated exception on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // Catchable fatal error. It indicates that a probably dangerous error occurred,\n // but did not leave the Engine in an unstable state. If the error is not caught\n // by a user defined handle (see also set_error_handler()), the application aborts\n // as it was an E_ERROR.\n case E_RECOVERABLE_ERROR:\n $error_string .= \"** RECOVERABLE_ERROR ** [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Recoverable error on line \" . $errline . \" in file \" . $errfile;\n break;\n\n // All errors and warnings, as supported, except of level E_STRICT prior to PHP 5.4.0.\n // This case also falls through to the default case for any errors not handled here.\n case E_ALL:\n default:\n $error_string .= \"** Unknown error type: [\" . $errno . \"] \" . $errstr . \"\\r\\n\" .\n \" Unknown error on line \" . $errline . \" in file \" . $errfile;\n break;\n }\n\n $error_string .= \", PHP \" . PHP_VERSION . \" (\" . PHP_OS . \")\\r\\n\" .\n \"The variable context was: \" . var_export($errcontext, true) . \"\\r\\n\";\n\n if ($errbacktrace == true) {\n $error_string .= \" BACKTRACE: \" . var_export(debug_backtrace(), true) . \"\\r\\n\";\n }\n\n @file_put_contents(date(\"Ymd\") . '-' . $filename, $error_string, FILE_APPEND | LOCK_EX);\n\n $error_string = '';\n\n // These are serious errors so the script needs to\n // die() here. Otherwise the function will return\n // execution back to the next statement after the\n // error-causing line of code.\n if ($errno == E_USER_ERROR ||\n $errno == E_ERROR || \n $errno == E_PARSE ||\n $errno == E_CORE_ERROR ||\n $errno == E_COMPILE_ERROR)\n {\n exit(1);\n }\n\n // Don't execute PHP internal error handler.\n if ($bypassinternal == true) {\n return true;\n }\n\n // Otherwise, execute PHP internal error handler.\n return false;\n}", "public function IsErrorEnabled();", "private function runEnableErrors()\n {\n global $_php_error_is_ini_enabled;\n\n if ($_php_error_is_ini_enabled) {\n $catchSurpressedErrors = &$this->catchSurpressedErrors;\n $self = $this;\n\n // all errors \\o/ !\n error_reporting($this->defaultErrorReportingOn);\n @ini_set('html_errors', false);\n\n if (ErrorHandler::isIIS()) {\n @ini_set('log_errors', false);\n }\n\n set_error_handler(\n function ($code, $message, $file, $line, $context) use ($self, &$catchSurpressedErrors) {\n /*\n * DO NOT! log the error.\n *\n * Either it's thrown as an exception, and so logged by the exception handler,\n * or we return false, and it's logged by PHP.\n *\n * Also DO NOT! throw an exception, instead report it.\n * This is because if an operation raises both a user AND\n * fatal error (such as require), then the exception is\n * silently ignored.\n */\n if ($self->isOn()) {\n /*\n * When using an @, the error reporting drops to 0.\n */\n if (error_reporting() !== 0 || $catchSurpressedErrors) {\n $ex = new \\ErrorException($message, $code, 0, $file, $line);\n\n $self->reportException($ex);\n }\n } else {\n return false;\n }\n },\n $this->defaultErrorReportingOn\n );\n\n set_exception_handler(\n function ($ex) use ($self) {\n if ($self->isOn()) {\n $self->reportException($ex);\n } else {\n return false;\n }\n }\n );\n\n if (!$self->isShutdownRegistered) {\n if ($self->catchClassNotFound) {\n $classException = &$self->classNotFoundException;\n $autoloaderFuns = ErrorHandler::$SAFE_AUTOLOADER_FUNCTIONS;\n\n /*\n * When this is called, the key point is that we don't error!\n *\n * Instead we record that an error has occurred,\n * if we believe one has, and then let PHP error as normal.\n * The stack trace we record is then used later.\n *\n * This is done for two reasons:\n * - functions like 'class_exists' will run the autoloader, and we shouldn't error on them\n * - on PHP 5.3.0, the class loader registered functions does *not* return closure objects, so we can't do anything clever.\n *\n * So we watch, but don't touch.\n */\n spl_autoload_register(\n function ($className) use ($self, &$classException, &$autoloaderFuns) {\n if ($self->isOn()) {\n $classException = null;\n\n // search the stack first, to check if we are running from 'class_exists' before we error\n if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {\n $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n } else {\n $trace = debug_backtrace();\n }\n $error = true;\n\n foreach ($trace as $row) {\n if (isset($row['function'])) {\n $function = $row['function'];\n\n // they are just checking, so don't error\n if (in_array($function, $autoloaderFuns, true)) {\n $error = false;\n break;\n // not us, and not the autoloader, so error!\n } else {\n if (\n $function !== '__autoload' &&\n $function !== 'spl_autoload_call' &&\n strpos($function, 'php_error\\\\') === false\n ) {\n break;\n }\n }\n }\n }\n\n if ($error) {\n $classException = new \\ErrorException(\n \"Class '$className' not found\",\n E_ERROR,\n 0,\n __FILE__,\n __LINE__\n );\n }\n }\n }\n );\n }\n\n $self->isShutdownRegistered = true;\n }\n }\n }", "public function isError()\n {\n if (strcasecmp($this->attributes['type'], self::ERROR) == 0) {\n return true;\n }\n return false;\n }", "public function isError()\n {\n return $this->getName() === 'error';\n }", "function isError() {\n return ERROR_CLASS == $this->classType();\n }", "function behat_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {\n global $OUTPUT;\n\n // Only after something has been writen.\n if (!$OUTPUT->has_started()) {\n return false;\n }\n\n // If is preceded by an @ we don't show it.\n if (!error_reporting()) {\n return true;\n }\n\n // This error handler receives E_ALL | E_STRICT, running the behat test site the debug level is\n // set to DEVELOPER and will always include E_NOTICE,E_USER_NOTICE... as part of E_ALL, if the current\n // error_reporting() value does not include one of those levels is because it has been forced through\n // the moodle code (see fix_utf8() for example) in that cases we respect the forced error level value.\n $respect = array(E_NOTICE, E_USER_NOTICE, E_STRICT, E_WARNING, E_USER_WARNING);\n foreach ($respect as $respectable) {\n\n // If the current value does not include this kind of errors and the reported error is\n // at that level don't print anything.\n if ($errno == $respectable && !(error_reporting() & $respectable)) {\n return true;\n }\n }\n\n // Using the default one in case there is a fatal catchable error.\n default_error_handler($errno, $errstr, $errfile, $errline, $errcontext);\n\n switch ($errno) {\n case E_USER_ERROR:\n $errnostr = 'Fatal error';\n break;\n case E_WARNING:\n case E_USER_WARNING:\n $errnostr = 'Warning';\n break;\n case E_NOTICE:\n case E_USER_NOTICE:\n case E_STRICT:\n $errnostr = 'Notice';\n break;\n case E_RECOVERABLE_ERROR:\n $errnostr = 'Catchable';\n break;\n default:\n $errnostr = 'Unknown error type';\n }\n\n // Wrapping the output.\n echo '<div class=\"phpdebugmessage\" data-rel=\"phpdebugmessage\">' . PHP_EOL;\n echo \"$errnostr: $errstr in $errfile on line $errline\" . PHP_EOL;\n echo '</div>';\n\n // Also use the internal error handler so we keep the usual behaviour.\n return false;\n}", "function ocportal_error_handler($errno,$errstr,$errfile,$errline)\n{\n\tif (error_reporting()==0) return false; // This actually tells if @ was used oddly enough. You wouldn't figure from the PHP docs.\n\n\tif ($errno==E_USER_ERROR) $errno=E_ERROR;\n\tif ($errno==E_PARSE) $errno=E_ERROR;\n\tif ($errno==E_CORE_ERROR) $errno=E_ERROR;\n\tif ($errno==E_COMPILE_ERROR) $errno=E_ERROR;\n\tif ($errno==E_CORE_WARNING) $errno=E_WARNING;\n\tif ($errno==E_COMPILE_WARNING) $errno=E_WARNING;\n\tif ($errno==E_USER_WARNING) $errno=E_WARNING;\n\tif ($errno==E_USER_NOTICE) $errno=E_NOTICE;\n\n\tswitch ($errno)\n\t{\n\t\tcase E_ERROR:\n\t\tcase E_WARNING:\n\t\tcase E_NOTICE:\n\t\t\t@ob_end_clean(); // We can't be doing output buffering at this point\n\t\t\tif (!$GLOBALS['SUPPRESS_ERROR_DEATH'])\n\t\t\t{\n\t\t\t\tfatal_exit('PHP ['.strval($errno).'] '.$errstr);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tattach_message(protect_from_escaping($errstr),'warn');\n\t\t\t}\n\t}\n\n\treturn false;\n}", "function customErrorHandler($errno, $errstr, $errfile, $errline) {\n\t$show = false;\n\tif (defined('WP_SUPER_DEBUG') && WP_SUPER_DEBUG == true) {\n\t\t$show = true;\n\t}\n\tif (!$show && error_reporting() == 0) {\n\t\treturn true;\n\t}\n\tif (stripos($errfile, 'plugins'.DS) === false) {\n\t\t$show = true;\n\t}\n\t$passable = array(E_RECOVERABLE_ERROR, E_STRICT, E_DEPRECATED);\n\tif ($show && !in_array($errno, $passable)) {\n\t\tdebug($errstr, $errline, $errfile);\n\t}\n\treturn true;\n}", "function it_returns_false_when_error_suppressed_in_php_8()\n {\n /**\n * Based on manual testing and:\n * @link https://www.php.net/manual/en/language.operators.errorcontrol.php#125938\n */\n $oldLevel = error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR);\n\n $this->errorHandler(E_WARNING, 'error message', 'file', 1)->shouldBe(false);\n\n error_reporting($oldLevel);\n }", "function error_handler( $p_type, $p_error, $p_file, $p_line, $p_context ) {\r\n\t\tglobal $g_error_parameters, $g_error_handled, $g_error_proceed_url;\r\n\t\tglobal $g_lang_overrides;\r\n\t\tglobal $g_error_send_page_header;\r\n\r\n\t\t# check if errors were disabled with @ somewhere in this call chain\r\n\t\tif ( 0 == error_reporting() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$t_lang_pushed = false;\r\n\r\n\t\t# flush any language overrides to return to user's natural default\r\n\t\tif ( function_exists( 'db_is_connected' ) ) {\r\n\t\t\tif ( db_is_connected() ) {\r\n\t\t\t\tlang_push( lang_get_default() );\r\n\t\t\t\t$t_lang_pushed = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$t_short_file\t= basename( $p_file );\r\n\t\t$t_method_array = config_get( 'display_errors' );\r\n\t\tif ( isset( $t_method_array[$p_type] ) ) {\r\n\t\t\t$t_method = $t_method_array[$p_type];\r\n\t\t} else {\r\n\t\t\t$t_method\t\t= 'none';\r\n\t\t}\r\n\r\n\t\t# build an appropriate error string\r\n\t\tswitch ( $p_type ) {\r\n\t\t\tcase E_WARNING:\r\n\t\t\t\t$t_error_type = 'SYSTEM WARNING';\r\n\t\t\t\t$t_error_description = $p_error;\r\n\t\t\t\tbreak;\r\n\t\t\tcase E_NOTICE:\r\n\t\t\t\t$t_error_type = 'SYSTEM NOTICE';\r\n\t\t\t\t$t_error_description = $p_error;\r\n\t\t\t\tbreak;\r\n\t\t\tcase E_USER_ERROR:\r\n\t\t\t\t$t_error_type = \"APPLICATION ERROR #$p_error\";\r\n\t\t\t\t$t_error_description = error_string( $p_error );\r\n\t\t\t\tbreak;\r\n\t\t\tcase E_USER_WARNING:\r\n\t\t\t\t$t_error_type = \"APPLICATION WARNING #$p_error\";\r\n\t\t\t\t$t_error_description = error_string( $p_error );\r\n\t\t\t\tbreak;\r\n\t\t\tcase E_USER_NOTICE:\r\n\t\t\t\t# used for debugging\r\n\t\t\t\t$t_error_type = 'DEBUG';\r\n\t\t\t\t$t_error_description = $p_error;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t#shouldn't happen, just display the error just in case\r\n\t\t\t\t$t_error_type = '';\r\n\t\t\t\t$t_error_description = $p_error;\r\n\t\t}\r\n\r\n\t\t$t_error_description = nl2br( $t_error_description );\r\n\r\n\t\tif ( 'halt' == $t_method ) {\r\n\t\t\t$t_old_contents = ob_get_contents();\r\n\t\t\t# ob_end_clean() still seems to call the output handler which\r\n\t\t\t# outputs the headers indicating compression. If we had\r\n\t\t\t# PHP > 4.2.0 we could use ob_clean() instead but as it is\r\n\t\t\t# we need to disable compression.\r\n\t\t\tcompress_disable();\r\n\r\n\t\t\tif ( ob_get_length() ) {\r\n\t\t\t\tob_end_clean();\r\n\t\t\t}\r\n\r\n\t\t\t# don't send the page header information if it has already been sent\r\n\t\t\tif ( $g_error_send_page_header ) {\r\n\t\t\t\thtml_page_top1();\r\n\t\t\t\thtml_page_top2();\r\n\t\t\t}\r\n\r\n\t\t\tPRINT '<br /><div align=\"center\"><table class=\"width50\" cellspacing=\"1\">';\r\n\t\t\tPRINT \"<tr><td class=\\\"form-title\\\">$t_error_type</td></tr>\";\r\n\t\t\tPRINT \"<tr><td><p class=\\\"center\\\" style=\\\"color:red\\\">$t_error_description</p></td></tr>\";\r\n\r\n\t\t\tPRINT '<tr><td><p class=\"center\">';\r\n\t\t\tif ( null === $g_error_proceed_url ) {\r\n\t\t\t\tPRINT lang_get( 'error_no_proceed' );\r\n\t\t\t} else {\r\n\t\t\t\tPRINT \"<a href=\\\"$g_error_proceed_url\\\">\" . lang_get( 'proceed' ) . '</a>';\r\n\t\t\t}\r\n\t\t\tPRINT '</p></td></tr>';\r\n\r\n\t\t\tif ( ON == config_get( 'show_detailed_errors' ) ) {\r\n\t\t\t\tPRINT '<tr><td>';\r\n\t\t\t\terror_print_details( $p_file, $p_line, $p_context );\r\n\t\t\t\tPRINT '</td></tr>';\r\n\t\t\t\tPRINT '<tr><td>';\r\n\t\t\t\terror_print_stack_trace();\r\n\t\t\t\tPRINT '</td></tr>';\r\n\t\t\t}\r\n\t\t\tPRINT '</table></div>';\r\n\r\n\t\t\tif ( $g_error_handled && !is_blank( $t_old_contents ) ) {\r\n\t\t\t\tPRINT '<p>Previous non-fatal errors occurred. Page contents follow.</p>';\r\n\r\n\t\t\t\tPRINT '<div style=\"border: solid 1px black;padding: 4px\">';\r\n\t\t\t\tPRINT $t_old_contents;\r\n\t\t\t\tPRINT '</div>';\r\n\t\t\t}\r\n\r\n\t\t\thtml_page_bottom1();\r\n\t\t\texit();\r\n\t\t} else if ( 'inline' == $t_method ) {\r\n\t\t\tPRINT \"<p style=\\\"color:red\\\">$t_error_type: $t_error_description</p>\";\r\n\t\t} else {\r\n\t\t\t# do nothing\r\n\t\t}\r\n\r\n\t\tif ( $t_lang_pushed ) {\r\n\t\t\tlang_pop();\r\n\t\t}\r\n\r\n\t\t$g_error_parameters = array();\r\n\t\t$g_error_handled = true;\r\n\t\t$g_error_proceed_url = null;\r\n\t}", "public function isErr(): bool\n {\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CREATE /editar.php/materials/create Parametros por URL: Identificador del objeto multimedia
public function executeCreate() { $this->material = new Material(); $this->material->setMmId($this->getRequestParameter('mm')); $this->material->setMatTypeId(MatTypePeer::getDefaultSelId()); $this->langs = sfConfig::get('app_lang_array', array('es')); $this->default_sel = 'file'; $this->setTemplate('edit'); }
[ "public function executeUploadMaterials()\n {\n if (!$this->getRequestParameter('id'))\n {\n $material = new Material();\n }\n else\n {\n $material = MaterialPeer::retrieveByPk($this->getRequestParameter('id'));\n $this->forward404Unless($material);\n }\n $material->setMmId($this->getRequestParameter('mm', 0));\n $material->setDisplay($this->getRequestParameter('display', 0));\n $material->setMatTypeId($this->getRequestParameter('mat_type_id', 0));\n\n\n $langs = sfConfig::get('app_lang_array', array('es'));\n foreach($langs as $lang){\n $material->setCulture($lang);\n $material->setName($this->getRequestParameter('name_' . $lang, ' '));\n }\n\n\n if($this->getRequestParameter('file_type', 'url') == 'url'){\n if ($material->isNew()) $material->setUrl($this->getRequestParameter('url', 0));\n $material->save();\n\n $this->msg_info = 'Nueva material modificado.';\n }elseif($this->getRequestParameter('file_type', 'url') == 'file'){\n $currentDir = 'Video/' . $material->getMmId(); \n $absCurrentDir = sfConfig::get('sf_upload_dir').'/material/' . $currentDir;\n $fileName = $this->sanitizeFile($this->getRequest()->getFileName('file'));\n $this->getRequest()->moveFile('file', $absCurrentDir . '/' . $fileName);\n \n $material->setUrl('/uploads/material/' . $currentDir . '/' . $fileName);\n $material->save();\n\n $this->msg_info = 'Nueva material subido e insertado.';\n }\n\n $this->mm = $material->getMmId();\n $this->material = $material->getId();\n }", "public function addMaterial() {\n $permitAdmin = AuthHelper::checkPermits(); //Pregunta si el usuario es administrador\n if ($permitAdmin == 1) {\n //Si no se agrego titulo da error\n if (empty($_POST['title'])) {\n $this->errorView->showError(\"Faltan datos obligatorios\");\n die();\n }\n //Si hay titulo lo guarda en una variable y sigue la funcion\n $title = $_POST['title'];\n //pregunta si hay un archivo subido\n if(isset($_FILES['document']) && ($_FILES['document']['type'] == 'application/pdf' || $_FILES['input_name']['type'] == 'application/word' || $_FILES['input_name']['type'] == 'application/docx')) {\n //Pregunta si hay un link\n if (!empty($_POST['link'])) {\n $link = $_POST['link'];\n //Si hay archivo y link guarda el material en la DB con archivo y link\n $success = $this->model->save($title, $_FILES['document']['tmp_name'], $link);\n } else { //Si hay archivo pero no hay link guarda en la DB sin link\n $success = $this->model->save($title, $_FILES['document']['tmp_ name']);\n }\n }else{ //si no hay archivo pregunta si hay link\n if (!empty($_POST['link'])) {\n $link = $_POST['link'];\n //Si hay link guarda en la DB sin archivo y con link\n $success = $this->model->save($title, null, $link);\n }else{ //Si no hay archivo ni link guarda en la DB el material vacio para ser editado despues\n $success = $this->model->save($title);\n }\n }\n header('Location: ' . \"material\");\n }\n else{\n $this->error->error('Solo los administradores pueden agregar material de estudio.');\n }\n }", "public function executeUpload()\n {\n if (!$this->getRequestParameter('id'))\n {\n $material = new Material();\n }\n else\n {\n $material = MaterialPeer::retrieveByPk($this->getRequestParameter('id'));\n $this->forward404Unless($material);\n }\n $material->setMmId($this->getRequestParameter('mm', 0));\n $material->setDisplay($this->getRequestParameter('display', 0));\n $material->setMatTypeId($this->getRequestParameter('mat_type_id', 0));\n\n\n $langs = sfConfig::get('app_lang_array', array('es'));\n foreach($langs as $lang){\n $material->setCulture($lang);\n $material->setName($this->getRequestParameter('name_' . $lang, ' '));\n }\n\n\n if($this->getRequestParameter('file_type', 'url') == 'url'){\n if ($material->isNew()) $material->setUrl($this->getRequestParameter('url', 0));\n $material->save();\n\n $this->msg_info = 'Nueva material modificado.';\n }elseif($this->getRequestParameter('file_type', 'url') == 'file'){\n $currentDir = 'Video/' . $material->getMmId(); \n $absCurrentDir = sfConfig::get('sf_upload_dir').'/material/' . $currentDir;\n $fileName = $this->sanitizeFile($this->getRequest()->getFileName('file'));\n $this->getRequest()->moveFile('file', $absCurrentDir . '/' . $fileName);\n \n $material->setUrl('/uploads/material/' . $currentDir . '/' . $fileName);\n $material->save();\n\n $this->msg_info = 'Nueva material subido e insertado.';\n }\n\n $this->mm = $material->getMmId();\n }", "public function instancia_material()\n\t{\n\t\t$id_modelo = $this->input->post('elegido');\n\t\t$id_material = $this->Material->obtener_id_material($id_modelo);\n\t\t$this->Instancia_material->muestra_instancia_en_asociar($id_material);\n\t}", "public function addMod(){\n\t$imagen = '';\n\t$producto1 = '';\n\tif (isset($_GET[\"id\"])){\n\t\tif($_SESSION[\"nivel\"]=='6')\n\t\t\t$socio = '1';\n\t\telse\n\t\t\t$socio = '0';\n\t\t$db = $this->_db();\n\t\t$result = mysql_query(\"SELECT * FROM mitos WHERE id='{$_GET['id']}'\");\n\t\t$db = $this->_db();\n\t\tif(mysql_num_rows($result) == 0)\n\t\t\treturn '<span class=\"txtCont2\">No puedes navegar</span>';\n\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\n\t\t$tok=explode(\",\",$row[\"imagen\"]);\n\t\t$titulo = $row[\"titulo\"];\n\t\t$mito = $row[\"mito\"];\n\t\t$realidad = $row[\"realidad\"];\n\t\t$embed = $row[\"embed\"];\n\t\t$pf = $row[\"pf\"];\n\t\t$autor = $row[\"autor\"];\n\t} else {\n\t\t$_GET[\"id\"] = '0';\t\n\t\t$titulo = '';\n\t\t$introduccion = '';\n\t\t$mito = '';\n\t\t$realidad = '';\n\t\t$embed = '';\n\t\t$pf = '';\n\t\t$autor = '';\n\t}//if\n\t\n\t$video='';\n\tif($embed=='')\n\t \t\t$video='</td>';\n\t\telse\n\t \t\t$video='<iframe width=\"315\" height=\"266\" src=\"'. $embed .'?rel=0&amp;wmode=transparent\" frameborder=\"0\" allowfullscreen></iframe></td>';\n\t\n\treturn '<p class=\"txtTitles\">Agregar Mito</p>\n<p class=\"txtCont1\">Para dar de alta tu publicaci&oacute;n selecciona lo siguiente:</p>\n<p class=\"txtCont1\">&nbsp;</p>\n\n<form id=\"form\" name=\"form\" enctype=\"multipart/form-data\" method=\"post\" action=\"?F=mitos&amp;_f=addMito\">\n <input type=\"hidden\" name=\"id\" value=\"'. $_GET[\"id\"] .'\" />\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n <tr>\n <td width=\"150\" valign=\"top\" class=\"txtCont2\" bgcolor=\"#E0F0F0\">T&iacute;tulo:</td>\n <td valign=\"top\" bgcolor=\"#E0F0F0\"><input name=\"titulo\" type=\"text\" id=\"titulo\" size=\"100\" maxlength=\"255\" value=\"'. $titulo .'\" /></td>\n </tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">Mito:</td>\n <td valign=\"top\"><textarea name=\"mito\" id=\"mito\" cols=\"100\" rows=\"20\">'. $mito .'</textarea></td>\n </tr>\n\t <tr>\n <td valign=\"top\" class=\"txtCont2\">Realidad:</td>\n <td valign=\"top\"><textarea name=\"realidad\" id=\"realidad\" cols=\"100\" rows=\"20\">'. $realidad .'</textarea></td>\n </tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">Insertar video de <img src=\"imgs/youtube-icon.gif\" width=\"25\" height=\"25\" alt=\"\" /></td>\n <td valign=\"top\"><input name=\"embed\" type=\"text\" id=\"embed\" size=\"73\" maxlength=\"600\" value=\"'. htmlspecialchars($embed, ENT_QUOTES) .'\" /><br />\n\t '.$video.'\n </tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">&nbsp;</td>\n <td valign=\"top\"><input name=\"enviar3\" type=\"submit\" class=\"frmBtnIngresar\" id=\"enviar3\" value=\"Agregar-Modificar\" /></td>\n </tr>\n </table>\n</form>\n\t\t<script language=\"JavaScript\" type=\"text/javascript\">\n\t\t var frmvalidator = new Validator(\"form\");\n\t\t frmvalidator.addValidation(\"titulo\",\"req\",\"Ingrese el titulo de la publicacion\");\n\t </script>';\n}", "public function actionCreate()\n {\n $request = Yii::$app->request;\n $model = new Material();\n if(!$request->isPost)\n {\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n }else{\n $model->scenario = 'upload';\n if($model->validate()){\n $model->uploadFile = UploadedFile::getInstance($model, 'uploadFile');\n $ext = substr($model->uploadFile->name,-4);\n $temp = $model->uploadFile->tempName;\n $type =$model->uploadFile->type;\n $timeStamp = time();\n $model->format = $type;\n $model->created_at = $timeStamp;\n $model->uid = Yii::$app->user->id;\n $model->name = $_POST['Material']['name'];\n if($url = $model->upload($temp,$timeStamp.$ext))\n {\n Yii::$app->session->setFlash('success', '云端上传成功!');\n $model->url = $url;\n $model->scenario = 'addNew';\n if($model->validate() && $model->save()){\n Yii::$app->session->setFlash('success', '保存成功!');\n return $this->redirect('/material/index');\n }else{\n Yii::$app->session->setFlash('error', '保存失败,请稍后再试!');\n //TODO:联系网站管理人员\n }\n }else{\n Yii::$app->session->setFlash('error', '上传失败,请稍后再试!');\n //TODO:联系网站管理人员\n }\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "function crearMaterial($material){\n //no implementado por no requerimiento del proyecto\n }", "function add_multimedia($params)\n {\n $this->db->insert('Multimedias',$params);\n return $this->db->insert_id();\n }", "public function actionCreate()\n {\n $model = new Material();\n\n if (Yii::$app->request->isPost) {\n $model->load(Yii::$app->request->post());\n $model->preview_file = UploadedFile::getInstance($model, 'preview_file');\n $model->coloring_image_bw_file = UploadedFile::getInstance($model, 'coloring_image_bw_file');\n $model->coloring_image_file = UploadedFile::getInstance($model, 'coloring_image_file');\n\n if ($model->save()) {\n if (Yii::$app->request->getBodyParam('submit') === 'apply') {\n return $this->redirect('update?id=' . $model->id, 302);\n }\n\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function articulomultimediaAction(){\t\n\t\t$this->view->doctype('XHTML1_RDFA');\t\t\n\t\t$validador = new My_Validador_AztecaValidador();\n\t\t$BoJson\t\t= new My_Model_ProcesaJsonTraderBOMultimedia();\n\t\t$url \t= $validador->urlValida($this->getRequest()->getUserParam('url',''));\n\t\t$item \t= $validador->intValido($this->getRequest()->getUserParam('item',''));\t\t\n\t\n\t\t$dataJson \t= file_get_contents(\"http://uat.tv-azteca.psdops.com/appnoticias/json-fundacion-azteca-2020\");\n\t\t\n\t\t$data \t\t= json_decode($dataJson, true);\n\t\t\n\t\t$datosAutor\t\t= $BoJson->organizarDatosJson($data['items'], 2);//Traer el json organizado por autor\n\t\t$datosArticulos = $BoJson->consultaDatosArticulo($data['items']);//Traer el json original si organizar para buscar el articulo\n\t\t\n\t\t$articulo\t\t= \t\"\";\n\t\t$otrosArticulos =\t\"\";\n\t\t\n\t\tif(!empty($url)){//Busca los datos del articulo actual\n\t\t\t$resultado\t= array_search($url, array_column($datosArticulos, 'idBusqueda'));\n\t\t\tif(strlen($resultado) > 0){\n\t\t\t\tif(array_key_exists($resultado, $datosArticulos)){\n\t\t\t\t\t$articulo\t=\t$datosArticulos[$resultado];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Sino encontró el articulo es probable que la url esté mal y venga de alguna red social,le quito los últimos digitos...\n\t\tif (empty($articulo) ){\n\t\t\t$urlPartida = explode(\"-\", $url);\n\t\t\tarray_pop($urlPartida);//Le quito el ultimo elemento\n\t\t\t$urlNueva = implode(\"-\", $urlPartida);// El arreglo lo convierto de nuevo a texto sin el último elemento\n\t\t\t\t\n\t\t\tif(!empty($url)){//Busca los datos del articulo actual, con la nueva estructura de URL\n\t\t\t\t$resultado\t= array_search($urlNueva, array_column($datosArticulos, 'idBusqueda'));\n\t\t\t\tif(strlen($resultado) > 0){\n\t\t\t\t\tif(array_key_exists($resultado, $datosArticulos)){\n\t\t\t\t\t\t$articulo\t=\t$datosArticulos[$resultado];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t// Busca los contenidos relacionados...\n\t\t\n\t\t$datosRelacionados\t\t\t\t= $datosAutor[$articulo['autorC']];\n\t\tif (count($datosRelacionados) != 0){\n\t\t\t$otrosArticulos\t\t\t\t= $BoJson->eliminarElementoActual($datosRelacionados,$url);\n\t\t}\n\t\t//$aleatorio\t\t\t\t\t= array_rand($data);//array_rand($datos,10);\n\t\t//$this->view->otrosArticulos\t= $this->obtieneDatosAleatorios($aleatorio, $datosRelacionados,$item);\n\t\t$bandera = 0;\n\t\tif (count($articulo) != 0){\n\t\t\t\n\t\t\tif(count($otrosArticulos) == 0){//No tiene ningun contenido relacionado le traigo contenido de cualquier otro autor\n\t\t\t\t$otrosArticulos\t= $BoJson->consultaDatosArticulo($data['items'],1,12);\n\t\t\t\t$otrosArticulos\t= $BoJson->eliminarElementoActual($otrosArticulos,$url);\n\t\t\t\t$bandera \t\t= 1;\n\t\t\t}\n\t\t\t\n\t\t\tif($bandera == 0){//En caso que no requieran esta funcionalidad igualarlo a 2, $bandera == 2, muchas diran mejor quita el fragmento de codigo, pero como ya sabras luego dicen: Dice mi mamá que siempre SI....xD\n\t\t\t\t\n\t\t\t\tif(count($otrosArticulos) <= 2){//Tiene menos de 2 contenido, le anexo mas contenido de otros autores para que no se vea muy vacio...\n\t\t\t\t\t$nuevosArticulos\t= $BoJson->consultaDatosArticulo($data['items'],1,12);\n\t\t\t\t\t$nuevosArticulos\t= $BoJson->eliminarElementoActual($nuevosArticulos,$url);\n\t\t\t\t\t\n\t\t\t\t\tforeach ($otrosArticulos as $key => $valor){//Eliminar los repetidos de nuevos articulos, que coincidan con los relacionados\n\t\t\t\t\t\t\t$nuevosArticulos\t= $BoJson->eliminarElementoActual($nuevosArticulos,$valor['idBusqueda']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$uneArreglo\t\t\t= array_merge($otrosArticulos,$nuevosArticulos);\n\t\t\t\t\t$otrosArticulos\t\t= $uneArreglo;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->view->articulo\t\t= $articulo;\n\t\t$this->view->otrosArticulos\t= $otrosArticulos;\n\t\t$this->view->metadatos = \"\";\n\t\t$this->view->site\t\t= $BoJson->obtenerUrl();\n\t\t\t\n\n\t}", "public function addMod(){\n\t$imagen = '';\n\t$producto1 = '';\n\tif (isset($_GET[\"id\"])){\n\t\tif($_SESSION[\"nivel\"]=='6')\n\t\t\t$socio = '1';\n\t\telse\n\t\t\t$socio = '0';\n\t\t$db = $this->_db();\n\t\t$result = mysql_query(\"SELECT * FROM noticias WHERE id='{$_GET['id']}' AND socio='{$socio}'\");\n\t\t$db = $this->_db();\n\t\tif(mysql_num_rows($result) == 0)\n\t\t\treturn '<span class=\"txtCont2\">No puedes navegar</span>';\n\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\n\t\t$fechat = $row[\"fechapub\"];\n\t\t$fechatt = new DateTime($fechat);\n\t\t$fecha = date_format($fechatt, 'Y-m-j');\n\t\t$id = $row[\"id\"];\n\t\t$tok=explode(\",\",$row[\"imagen\"]);\n\t\t$titulo = $row[\"titulo\"];\n\t\t$introduccion = $row[\"introduccion\"];\n\t\t$contenido = $row[\"contenido\"];\n\t\t$embed = '';\n\t\t$imagen = ($tok[0] != '') ? '<br /><img src=\"../'. $tok[0] .'\" border=\"0\" /><input type=\"hidden\" name=\"imagen1\" value=\"'. $tok[0] .'\" />' : '';\n\t\t$pf = $row[\"pf\"];\n\t\t$autor = $row[\"autor\"];\n\t\t$idseccion = $row[\"id_seccion\"];\n\t\tunset($tok[0]);\n\t\t\t$productos = '<tr>\n\t\t\t\t\t <td valign=\"top\" class=\"txtCont2\">Imagenes:</td>\n\t\t\t\t\t <td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">';\n\t\t\t$i=2;\n\t\t\tforeach($tok as $c){ \n\t\t\t\t$productos .= '\n\t\t\t\t\t<tr>\n\t\t\t\t\t <td valign=\"top\"><input type=\"hidden\" name=\"MAX_FILE_SIZE1\" value=\"3000000\" /><input name=\"imagen'.$i.'\" type=\"file\" /><br /><img src=\"../'. $c .'\" border=\"0\" /><input type=\"hidden\" name=\"imagen'.$i.'\" value=\"'. $c .'\" />&nbsp;<br /></td>\n\t\t\t\t\t</tr>'; \n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tfor($x=(5-count($tok));$x>0;$x--){\n\t\t\t\t$productos .= '\n\t\t\t\t\t<tr>\n\t\t\t\t\t <td valign=\"top\"><input type=\"hidden\" name=\"MAX_FILE_SIZE1\" value=\"3000000\" /><input name=\"imagen'.$i.'\" type=\"file\" /><br /></td>\n\t\t\t\t\t</tr>'; \n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$productos .= '</table></td></tr>';\n\t} else {\n\t\t$_GET[\"id\"] = '0';\t\n\t\t$id = '0';\n\t\t$titulo = '';\n\t\t$introduccion = '';\n\t\t$contenido = '';\n\t\t$embed = '';\n\t\t$imagen = '';\n\t\t$pf = '';\n\t\t$autor = '';\n\t\t$idseccion = '';\n\t\t$productos = '<tr>\n\t\t\t\t\t <td valign=\"top\" class=\"txtCont2\">Imagenes:</td>\n\t\t\t\t\t <td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">';\n\t\t$i=2;\n\t\tfor($x=5;$x>0;$x--){\n\t\t\t\t$productos .= '\n\t\t\t\t\t<tr>\n\t\t\t\t\t <td valign=\"top\"><input type=\"hidden\" name=\"MAX_FILE_SIZE1\" value=\"3000000\" /><input name=\"imagen'.$i.'\" type=\"file\" /><br /></td>\n\t\t\t\t\t</tr>'; \n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$productos .= '</table></td></tr>';\n\t}//if\n\t$db = $this->_db();\n\t$resultS = mysql_query(\"SELECT * FROM seccion ORDER BY id DESC\");\n\twhile ($rowS = mysql_fetch_array($resultS, MYSQL_ASSOC)) { \n\t\tif($idseccion == $rowS[\"id\"])\n\t\t\t$seccionN .= '<option value=\"'.$rowS[\"id\"].'\" selected=\"selected\">'.$rowS[\"nombre\"].'</option>'; \n\t\telse\n\t\t\t$seccionN .= '<option value=\"'.$rowS[\"id\"].'\">'.$rowS[\"nombre\"].'</option>'; \n\t}\n\t$video='';\n\tif($embed=='')\n\t \t\t$video='</td>';\n\t\telse\n\t \t\t$video='<iframe width=\"315\" height=\"266\" src=\"'. $embed .'?rel=0&amp;wmode=transparent\" frameborder=\"0\" allowfullscreen></iframe></td>';\n\t//<input type=\"hidden\" name=\"id\" value=\"'. $_GET[\"id\"] .'\" />\n\treturn '<p class=\"txtTitles\">Agregar Noticia</p>\n<p class=\"txtCont1\">Para dar de alta tu publicaci&oacute;n selecciona lo siguiente:</p>\n<p class=\"txtCont1\">&nbsp;</p>\n\n<form id=\"form\" name=\"form\" enctype=\"multipart/form-data\" method=\"post\" action=\"?F=noticias&amp;_f=addNoticia\">\n <input type=\"hidden\" id=\"id2\" name=\"id2\" value=\"'. $_GET[\"id\"] .'\" />\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n <tr>\n <td width=\"150\" valign=\"top\" class=\"txtCont2\" bgcolor=\"#E0F0F0\">T&iacute;tulo:</td>\n <td valign=\"top\" bgcolor=\"#E0F0F0\"><input name=\"titulo\" type=\"text\" id=\"titulo\" size=\"100\" maxlength=\"255\" value=\"'. $titulo .'\" />\n </td>\n </tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">Secci&oacute;n:</td>\n <td valign=\"top\">\n\t \t\t<select name=\"seccion\" class=\"frmInputM\">\n\t\t\t <option value=\"0\">Sin secci&oacute;n</option>\n\t\t\t '.$seccionN.'\n\t\t\t </select>\n\t </td>\n </tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">Id:</td>\n <td valign=\"top\"><input name=\"id\" type=\"text\" id=\"id\" size=\"10\" maxlength=\"4\" value=\"'. $id .'\" /></td>\n </tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">Fecha:</td>\n <td valign=\"top\"><input type=\"text\" name=\"datepicker\" class=\"frmInputM\" id=\"datepicker\" size=\"58\" maxlength=\"255\" value=\"'. $fecha .'\" /></td>\n </tr>\n\t<tr>\n <td valign=\"top\" class=\"txtCont2\">Introducci&oacute;n:</td>\n <td valign=\"top\"><textarea name=\"introduccion\" id=\"introduccion\" cols=\"40\" rows=\"3\">'. $introduccion .'</textarea></td>\n </tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">Contenido:</td>\n <td valign=\"top\"><textarea name=\"contenido\" id=\"contenido\" cols=\"100\" rows=\"20\">'. $contenido .'</textarea></td>\n </tr>\n\t<tr>\n <td valign=\"top\" class=\"txtCont2\">Galer&iacute;a</td>\n <td>\n\t\t\t'.$this->slideGaleria().'\n\t\t</td>\n </tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">Imagen:</td>\n <td valign=\"top\"><input type=\"hidden\" name=\"MAX_FILE_SIZE1\" value=\"3000000\" /><input name=\"imagen1\" type=\"file\" />'. $imagen .'&nbsp;<br /><span class=\"txtCont2\">Pie de foto:</span><input name=\"pf\" type=\"text\" id=\"pf\" size=\"60\" maxlength=\"255\" value=\"'. $pf .'\" /></td>\n </tr>\n\t<tr>\n\t <td valign=\"top\" class=\"txtBold\">Galeria:</br>limitado a 5</td>\n\t\t <td valign=\"top\">\n\t\t \t\n\t\t\t'.$productos.'\n\t\t\t\n\t\t </td>\n\t</tr>\n <tr>\n <td valign=\"top\" class=\"txtCont2\">&nbsp;</td>\n <td valign=\"top\"><input name=\"enviar3\" type=\"submit\" class=\"frmBtnIngresar\" id=\"enviar3\" value=\"Agregar-Modificar\" /></td>\n </tr>\n </table>\n</form>\n\t\t<script language=\"JavaScript\" type=\"text/javascript\">\n\t\t var frmvalidator = new Validator(\"form\");\n\t\t frmvalidator.addValidation(\"titulo\",\"req\",\"Ingrese el titulo de la publicacion\");\n\t </script>\n\t <!-- DATAPICKER -->\n\t\t<link type=\"text/css\" href=\"../css/ui-lightness/jquery-ui-1.8.16.custom.css\" rel=\"stylesheet\" />\t\n\t\t<script type=\"text/javascript\" src=\"../js/jquery-1.6.2.min.js\"></script>\n\t\t<script type=\"text/javascript\" src=\"../js/jquery-ui-1.8.16.custom.min.js\"></script>\n\t\t<script type=\"text/javascript\">\n\t\t\t$(function(){\n\t\t\t\t\n\n\t\t\t\t// Datepicker\n\t\t\t\t$.datepicker.regional[\\'es\\'] = {\n\t\t\t\t\tcloseText: \\'Cerrar\\',\n\t\t\t\t\tprevText: \\'&#x3c;Ant\\',\n\t\t\t\t\tnextText: \\'Sig&#x3e;\\',\n\t\t\t\t\tcurrentText: \\'Hoy\\',\n\t\t\t\t\tmonthNames: [\\'Enero\\',\\'Febrero\\',\\'Marzo\\',\\'Abril\\',\\'Mayo\\',\\'Junio\\',\n\t\t\t\t\t\\'Julio\\',\\'Agosto\\',\\'Septiembre\\',\\'Octubre\\',\\'Noviembre\\',\\'Diciembre\\'],\n\t\t\t\t\tmonthNamesShort: [\\'Ene\\',\\'Feb\\',\\'Mar\\',\\'Abr\\',\\'May\\',\\'Jun\\',\n\t\t\t\t\t\\'Jul\\',\\'Ago\\',\\'Sep\\',\\'Oct\\',\\'Nov\\',\\'Dic\\'],\n\t\t\t\t\tdayNames: [\\'Domingo\\',\\'Lunes\\',\\'Martes\\',\\'Mi&eacute;rcoles\\',\\'Jueves\\',\\'Viernes\\',\\'S&aacute;bado\\'],\n\t\t\t\t\tdayNamesShort: [\\'Dom\\',\\'Lun\\',\\'Mar\\',\\'Mi&eacute;\\',\\'Juv\\',\\'Vie\\',\\'S&aacute;b\\'],\n\t\t\t\t\tdayNamesMin: [\\'Do\\',\\'Lu\\',\\'Ma\\',\\'Mi\\',\\'Ju\\',\\'Vi\\',\\'S&aacute;\\'],\n\t\t\t\t\tweekHeader: \\'Sm\\',\n\t\t\t\t\tdateFormat: \\'yy-mm-dd\\',\n\t\t\t\t\tfirstDay: 1,\n\t\t\t\t\tisRTL: false,\n\t\t\t\t\tshowMonthAfterYear: false,\n\t\t\t\t\tyearSuffix: \\'\\'};\n\t\t\t\t$.datepicker.setDefaults($.datepicker.regional[\\'es\\']);\n\t\t\t\t\n\t\t\t\t$( \"#datepicker\" ).datepicker({ \n\t\t\t\t\t//minDate: -0, \n\t\t\t\t\tmaxDate: 0, \n\t\t\t\t\tdayNamesMin: [\\'Di\\', \\'Lu\\', \\'Ma\\', \\'Me\\', \\'Je\\', \\'Ve\\', \\'Sa\\']\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t$(\\'#txtFechaLaborables\\').datepicker({\n\t\t\t\t\t\t minDate: -0,\n\t\t\t\t\t\t beforeShowDay: function (day) { \n\t\t\t\t\t\t var day = day.getDay(); \n\t\t\t\t\t\t if (day == 0) { \n\t\t\t\t\t\t\t return [false, \"somecssclass\"] \n\t\t\t\t\t\t } else { \n\t\t\t\t\t\t\t return [true, \"someothercssclass\"] \n\t\t\t\t\t\t } \n\t\t\t\t\t\t } \n\t\t\t\t\t}); \n\t\t\t\t });\n\t\t\t\t\n\t\t\t});\n\t\t</script>\n<!-- DATAPICKER -->';\n}", "public function addMaterialUrl(MultimediaObject $multimediaObject, $url, $formData)\n {\n $material = new Material();\n $material = $this->saveFormData($material, $formData);\n\n $material->setUrl($url);\n\n $multimediaObject->addMaterial($material);\n $this->dm->persist($multimediaObject);\n $this->dm->flush();\n\n return $multimediaObject;\n }", "public function actionCreate()\n {\n $model = new GalleryMedias;\n\n if ($model->load(Yii::$app->request->post())) {\n $language = Language::find()->where(['default' => 1])->one();\n $model->language = $language->id;\n if ($model->save()) {\n $model->saveImage('image');\n return $this->redirect([\n 'view',\n 'id' => $model->id\n ]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('materials.create');\n\t}", "function addMmaterials($materials_name,$mat_colors,$mat_type,$mat_unit,$c_stock,$remark,$added_by)\n\t{\n\t\t$materials_name\t\t\t=\tmysql_real_escape_string(trim($materials_name));\n\t\t$mat_colors\t\t\t\t=\tmysql_real_escape_string(trim($mat_colors));\n\t\t$mat_type\t\t\t \t= mysql_real_escape_string(trim($mat_type));\n\t\t$mat_unit\t\t\t\t=\tmysql_real_escape_string(trim($mat_unit));\n\t\t$c_stock\t \t=\ttrim($c_stock);\n\t\t$remark\t\t\t \t\t=\tmysql_real_escape_string(trim($remark));\n\t\t$added_by\t\t\t \t=\tmysql_real_escape_string(trim($added_by));\n\t\t//satement to insert in mmaterials table\n\t\t$insert\t\t= \"INSERT INTO mmaterials\n\t\t\t\t\t\t(materials_name,mat_colors,mat_type,mat_unit, c_stock, lastdate, remark, added_on,added_by)\n\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t('$materials_name','$mat_colors','$mat_type','$mat_unit', '$c_stock', now(), '$remark', now(),'$added_by')\n\t\t\t\t\t\t\";\n\t\t//execute quary\n\t\t$query\t\t= mysql_query($insert);\n\t\t//echo $insert.mysql_error();exit;\n\t\t//get the product id\n\t\t$id\t= mysql_insert_id();\n\t\t//return primary key\n\t\treturn $id;\n\n\t}", "public function actionCreate()\n {\n $model = new Media();\n $model->files = UploadedFile::getInstance($model, 'files');\n///slug, type_id\n\n if (Yii::$app->request->isPost) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n $new_name = 'media-' . Yii::$app->security->generateRandomString() . '.' . $model->files->extension;\n\n $model->files->saveAs(Yii::getAlias('@root')\n . Yii::$app->params['frontend_upload_path'] . Yii::$app->params['media'] . $new_name);\n $model->name = $new_name;\n $model->type_id = Yii::$app->session->get(\"type_id\");\n\n if ($model->save(false)) {\n $transaction->commit();\n \\Yii::$app->getSession()->setFlash('success',\n '<div class=\"alert d-alert-success\" role=\"alert\">\n <b>Thank you, your Media successfully saved!</b>\n </div>');\n\n// $searchModel = new MediaSearch();\n// $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n//\n// return $this->render('index', [\n// 'searchModel' => $searchModel,\n// 'dataProvider' => $dataProvider,\n// ]);\n return \"{}\";\n }\n } catch (Exception $ex) {\n $transaction->rollBack();\n }\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionAjaxCreate($escenario_id, $tipo) {\n if (Yii::app()->request->isAjaxRequest) {\n $model = new EscenarioMultimedia;\n $model->tipo = $tipo;\n $model->local = $tipo == Constants::MULTIMEDIA_TIPO_VIDEO ? 0 : 1;\n $model->scenario = $tipo == Constants::MULTIMEDIA_TIPO_VIDEO ? 'video' : 'insert';\n $model->escenario_id = $escenario_id;\n $this->ajaxValidation($model);\n $result = array();\n if (isset($_POST['EscenarioMultimedia'])) {\n $result['success'] = $model->save();\n if ($result['success'] && $tipo != Constants::MULTIMEDIA_TIPO_VIDEO) {\n $result['attr'] = $model->attributes;\n if (!file_exists(\"uploads/escenario/$model->escenario_id/\" . Constants::MULTIMEDIA_TIPO_IMAGEN)) {\n\n mkdir(\"uploads/escenario/$model->escenario_id/\" . Constants::MULTIMEDIA_TIPO_IMAGEN, 0777, true);\n }\n $path = realpath(Yii::app()->getBasePath() . \"/../uploads/escenario/$model->escenario_id/\" . Constants::MULTIMEDIA_TIPO_IMAGEN) . \"/\";\n $pathorigen = realpath(Yii::app()->getBasePath() . \"/../uploads/tmp/\") . \"/\";\n $publicPath = Yii::app()->getBaseUrl() . \"/uploads/escenario/$model->escenario_id/\" . Constants::MULTIMEDIA_TIPO_IMAGEN . '/';\n if (rename($pathorigen . $model->ubicacion, $path . $model->ubicacion)) {\n $model->ubicacion = $publicPath . $model->ubicacion;\n $model->save();\n }\n } else {\n $result['message'] = 'No se pudo registrar la imagen, porfavor intenet nuevamente';\n }\n echo CJSON::encode($result);\n } else {\n if ($tipo != Constants::MULTIMEDIA_TIPO_VIDEO) {\n $archivo = new XUploadForm;\n $this->renderPartial('_form_modal', array(\n 'model' => $model,\n 'archivo_modal' => $archivo,\n ), false, true);\n } else { // si es de tipo video\n $this->renderPartial('_form_modal_video', array(\n 'model' => $model,\n ), false, true);\n }\n }\n }\n }", "public function executeEditMateria()\n {\n $id = $this->getRequestParameter('idmateria');\n\n if ($id) {\n $materia = MateriaPeer::RetrieveByPk($id);\n $tipo= 'Modificaci&oacute;n';\n } else {\n $materia = new Materia();\n $tipo = 'Creaci&oacute;n';\n }\n $this->materia = $materia;\n\n $errores = array();\n $errores['materia'] = '';\n $errores['width'] = '';\n $errores['height'] = '';\n $errores['my_file'] = '';\n $errores['scorm'] = '';\n\n // Si se ha hecho submit procesamos el formulario\n if ($this->getRequest()->getMethod() == sfRequest::POST) {\n $nombremateria = $this->getRequestParameter('materia');\n $height = $this->getRequestParameter('height');\n $width = $this->getRequestParameter('width');\n $informacion = $this->getRequestParameter('informacion');\n $normativa = $this->getRequestParameter('normativa');\n $file = $this->getRequest()->getFileName('my_file');\n $nerrores = 0;\n\n if (!$nombremateria) {\n $errores['materia'] .= '&uarr; Debe indicar el nombre de la materia &uarr;<br>'; $nerrores++;\n }\n if (!$height) {\n $errores['height'] .= '&uarr; Debe proporcionar la altura de la ventana donde se visualizar&aacute; el contenido del curso &uarr;<br>'; $nerrores++;\n }\n if (!is_numeric($height)) {\n $errores['height'] .= '&uarr; La altura debe ser un n&uacute;mero &uarr;<br>'; $nerrores++;\n }\n if (!$width) {\n $errores['width'] .= '&uarr; Debe proporcionar la anchura de la ventana donde se visualizar&aacute; el contenido del curso &uarr;<br>'; $nerrores++;\n }\n if (!is_numeric($width)) {\n $errores['width'] .= '&uarr; La anchura debe ser un n&uacute;mero &uarr;<br>'; $nerrores++;\n }\n if (($file) && (\".zip\"!=substr($file,strlen($file)-4, 4))) {\n $errores['my_file'] .= '&uarr; El fichero con el contenido del curso debe ser un comprimido en formato zip &uarr;<br>'; $nerrores++;\n }\n if (!$nerrores) {\n // Iniciamos los parametros para transacciones seguras con la base de datos\n $con = Propel::getConnection();\n $fallo_bbdd = 0;\n\n try {\n $con->begin();\n $materia->setTemasTotales($this->numeroTemas);\n $materia->setNombre($nombremateria);\n $materia->setHeight($height);\n $materia->setWidth($width);\n $materia->setInformacion($informacion);\n $materia->setNormativa($normativa);\n $materia->setTemasTotales(0);\n if (!$id) {$materia->setTipo('vacia');}\n $materia->save($con);\n\n $administradores = $this->getUser()->getAdministradores();\n\t foreach ($administradores as $administrador) {\n $notificacion = new Notificacion();\n\t $notificacion->setInfo($administrador->getId(),null,$tipo.' materia',$tipo.' materia: <b>'.$materia->getNombre().'</b> por '.$this->getUser()->getAdministrador()->getNombreusuario(),date(\"Y-m-d H:j\"));\n\t }\n $con->commit();\n }\n catch (Exception $e) {\n $con->rollback();\n $fallo_bbdd = 1;\n throw $e;\n }\n $id = $materia->getId();\n\n ## process zip file (if applicable)\n $folderTempZip = sfConfig::get('sf_web_dir').DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR;\n $mayProcessZip = is_readable($_FILES['my_file']['tmp_name']) || is_readable($folderTempZip.$ftp_file) ? true : false;\n\n if ((!$fallo_bbdd) && $mayProcessZip) {\n // Si la consulta se realizo con exito y se subio un fichero... borramos los temas anteriores\n $c = new Criteria();\n $c->add(TemaPeer::ID_MATERIA, $id);\n TemaPeer::DoDelete($c);\n\n // Borramos los objetos SCO anteriores registrados en la plataforma (cuidado !!)\n if (!$this->hasRequestParameter('conservarcontenido')) {\n $c = new Criteria();\n $c->add(Sco12Peer::ID_MATERIA, $materia->getId());\n Sco12Peer::DoDelete($c);\n }\n $whereToUnzip = sfConfig::get('sf_web_dir').DIRECTORY_SEPARATOR.'materias'.DIRECTORY_SEPARATOR.$materia->getId().DIRECTORY_SEPARATOR;\n $materia->deleteContenido($whereToUnzip);\n\n if ($_FILES['my_file']['size'] > 0) { // --------------- upload zip\n $zipFile = $folderTempZip.$materia->getId().'.zip';\n if (file_exists($zipFile)) { unlink($zipFile) ; }\n copy($_FILES['my_file']['tmp_name'], $zipFile);\n } else { // -------------------------------------------- select from list\n $zipFile = $folderTempZip.$ftp_file;\n }\n $zip = zip_open($zipFile);\n\n if ($zip) {\n $result = self::unzip($zipFile, $whereToUnzip, true, true);\n $scorm = false;\n $compo = false;\n $ficheros = array();\n\n while ($zip_entry = zip_read($zip)) {\n $entrada = zip_entry_name($zip_entry);\n\n $extension = substr($entrada, -4);\n if (($extension == '.htm') || ($extension == 'html')) {$ficheros[] = $entrada;}\n if ($entrada == 'imsmanifest.xml') {$scorm = true;}\n if ($entrada == 'Content/Projects/Res/project.xml') {$compo = true;}\n }\n zip_close($zip);\n @unlink($zipFile);\n\n // Procesamiento de objetos SCO tanto para cursos SCORM como para Composica\n if ($scorm) {\n $scormh = new scormManifestHandler();\n $scormh->initialize($whereToUnzip, $materia->getId());\n if ($scormh->getLastError()) {$errores['scorm'] = 'El curso esta en formato SCORM pero contiene alg&uacute;n error y no se pudo cargar'; return;}\n $scormh->loadScos();\n if ($scormh->getLastError() > 50) {$errores['scorm'] = 'El curso esta en formato SCORM pero contiene alg&uacute;n error y no se pudo cargar'; return;}\n }\n // Procesamiento cursos solo scorm (temas)\n if ((!$compo) && $scorm) {\n $cs = new Criteria();\n $cs->add(Sco12Peer::ID_MATERIA, $materia->getId());\n $cs->addAscendingOrderByColumn(Sco12Peer::ID);\n $scs = Sco12Peer::DoSelect($cs);\n\n $zindex = 1;\n foreach ($scs as $sc) {\n $tema = new Tema();\n $tema->setIdMateria($materia->getId());\n $tema->setNombre($sc->getTitle());\n $tema->setNumeroTema($zindex);\n $tema->save();\n $zindex++;\n }\n }\n // Procesamiento cursos composica\n if ($compo && $scorm) {\n \n $materia->setTipo('compo');\n $materia->save();\n\n $ruta = $whereToUnzip.'Content/Projects/Res/project.xml';\n $xml = simplexml_load_file($ruta);\n $capitulos = $xml->structure;\n $indice = 1;\n\n $chapter = $capitulos->chapter?$capitulos->chapter:$capitulos->page;\n \n foreach ($chapter as $capitulo) {\n $titulo = (string)$capitulo['title'];\n $tema = new Tema();\n $tema->setIdMateria($id);\n $tema->setNombre($titulo);\n $tema->setNumeroTema($indice);\n $tema->save();\n $indice++;\n }\n }\n // Procesamiento cursos scorm\n if ($scorm && !$compo) {\n $materia->setTipo('scorm'.$scormh->getScormVersion());\n $materia->save();\n }\n // Procesamiento cursos no scorm\n if (!$scorm && !$compo) {\n $materia->setTipo('segmentada');\n $materia->save();\n }\n } else {\n $errores['fichero'] = 'La materia se cre&oacute; correctamente pero el fichero zip proporcionado no es v&aacute;lido. Vuelva a intentarlo con otro fichero para a&ntilde;adir el contenido te&oacute;rico de la materia. '; $nerrores++;\n }\n }\n } // Cierre del if !nerrores\n } // Cierre if (request=post...)\n $this->materia = $materia;\n\n if (($materia->getTipo() == 'compo') || ($materia->getTipo() == 'segmentada')) {\n $c = new Criteria();\n $c->add(TemaPeer::ID_MATERIA, $id);\n $c->addAscendingOrderByColumn(TemaPeer::NUMERO_TEMA);\n $this->temas = TemaPeer::DoSelect($c);\n $this->ntemas = TemaPeer::DoCount($c);\n }\n if ($materia->getTipo() == 'scorm1.2') {\n $c = new Criteria();\n $c->add(Sco12Peer::ID_MATERIA, $materia->getId());\n $c->addAscendingOrderByColumn(Sco12Peer::ID);\n $this->scos = Sco12Peer::DoSelect($c);\n $this->ntemas = Sco12Peer::DoCount($c);\n }\n $this->errores = $errores;\n }", "public function create($tipoMultimedia)\n {\n $query = 'INSERT INTO tipo_multimedia (id, nome)' .\n ' VALUES ('.$tipoMultimedia->getId.', \"'.$tipoMultimedia->getNome.'\")';\n\n $result = $this->conn->query($query);\n return $result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pass a call through to APC or APCu
private function call($call, ...$args) { $function = "{$this->apcModule}_{$call}"; return $function(...$args); }
[ "function callAlias($call) {\n $calls = tripal_ws_get_calls();\n $call = stripslashes($call);\n\n $ref_class = get_parent_class($this);\n if ($ref_class == 'TripalWebServiceSearchCall') {\n // Search call, drop search reference and use is_search flag.\n $call = str_replace('search/', '', $call);\n }\n\n if ($calls[ $call ]) {\n // Update call asset by replacing call name.\n $is_search_flag = $this->call_asset['is_search'];\n $base_call = $this->call_asset['call'];\n\n unset($this->call_asset['call']);\n // Replace the call asset to use the intended call.\n $this->call_asset['call'] = $calls[ $call ]['call'];\n // Replace call host module.\n unset($this->call_asset['host']);\n $this->call_asset['host'] = $calls[ $call ]['module'];\n // Reset call filter.\n unset($this->call_asset['configuration']['filter']);\n $key = $this->call_asset['host'] . '/v' . $this->call_asset['version'] . '/' . $this->call_asset['call'];\n $this->call_asset['configuration']['filter'] = variable_get($key);\n // Update class files.\n unset($this->call_asset['class']);\n $this->call_asset['class'] = $calls[ $call ]['class'];\n unset($calls);\n\n // Begin call processing.\n\n $call = tripal_ws_load_call($this->call_asset);\n\n if (class_exists($call)) {\n $response = new $call($this->call_asset);\n $response->prepareResponse();\n }\n }\n else {\n // Method not supported.\n $response = [\n 'code' => 501, // Not Implemented.\n 'message' => 'Call: Call ' . $call . ' not implemented.'\n ];\n TripalWebServiceResponse::errorResponse($response);\n }\n }", "abstract function callService();", "function context_call($call, $ctx='')\n{\n\tif (is_array($ctx)) \n\t{\n\t\tforeach($ctx as $postname)\n\t\t{\n\t\t \t$context[$postname] = get_post($postname);\n\t\t}\n\t} else \n\t\t$context = isset($_SESSION[$ctx]) ? $_SESSION[$ctx] : null;\n\n\tarray_unshift($_SESSION['Context'], array('name' => $ctx, \n\t\t'ctx' => $context,\n\t\t'caller' => $_SERVER['PHP_SELF'],\n\t\t'ret' => array()));\n\tmeta_forward($call);\n}", "function wb_call_function($address, $args) { }", "function call ($rpc_name, &$_STDIN, $options = '')\n {\n if (!isset($_STDIN)) $_STDIN = array();\n\n $context_path['system'] = '../core/rpc_calls/';\n $context_path['user'] = 'lib/rpc_calls/';\n\n /* TODO : checks for valid characters */\n $options = explode(',', $options);\n $rpc_path = explode('.', $rpc_name);\n $context = array_shift($rpc_path);\n $rpc_path = $context_path[$context].implode('.', $rpc_path).'.php';\n\n if (!is_file($rpc_path)) \n die(\"RPC not found : '\".$rpc_name.\"'\");\n\n /* imports RPC code */\n require $rpc_path;\n\n $this->rpcs[$rpc_name] = $rpc;\n $this->rpcs[$rpc_name]['name'] = $rpc_name;\n\n $self = $this->rpcs[$rpc_name];\n $function = $this->rpcs[$rpc_name][1]; \n\n /* checks inputs parameters rules */\n $rpc_check = $this->_call_param_check($_STDIN, $this->rpcs[$rpc_name]);\n\n if($rpc_check !== true) {\n $_STDIN['STDERR'] = $rpc_check;\n return false;\n }\n \n /* call the RPC */\n $rpc_status = $function($this, $_STDIN, $rpc_response);\n\n /* FAILURE BEHAVIOUR */\n\n /* in case of FAILURE do following dependig by choosen output option */\n if ($rpc_status == false) {\n \n /* directly die */\n if (in_array('die',$options))\n die(\"RPC '\".$rpc_name.\"' failed.\");\n\n /* try to use default error dialog */\n if (in_array('dialog',$options) && $_->ROOT)\n $_->ROOT->system_error(print_r($rpc_response['error']));\n\n /* else prints the error to the stdout (default behaviour)*/ \n else print_r($rpc_response['error']);\n }\n\n\n /* OUTPUT OPTIONS */\n\n /* put results in a custom labeled array */ \n if (in_array('label',$options)) {\n $label = array_search('label',$options);\n $output_buffer[$options[$label+1]] = $rpc_response;\n }\n\n /* put results in a labeled array with the class name as label */ \n if (in_array('path',$options))\n $output_buffer[$rpc_name] = $rpc_response;\n\n if (!isset($output_buffer)) $output_buffer = $rpc_response;\n\n /* merge input buffer with the call response */ \n if (in_array('stack',$options)) {\n if (!is_array($output_buffer)) $output_buffer = array($output_buffer);\n $_STDIN = array_merge($_STDIN, $output_buffer);\n }\n\n /* or returns only the call response */ \n else $_STDIN = $output_buffer;\n\n /* CALL END */ \n return $rpc_status; \n }", "function rate_engine_performcall ($agi, $destination, &$A2B, $typecall=0){\n\t\t$max_long = 2147483647; //Maximum value for long type in C++. This will be used to avoid overflow when sending large numbers to Asterisk \n\n\t\t$old_destination = $destination;\n\t\t\n\t\tfor ($k=0;$k<count($this -> ratecard_obj);$k++){\n\t\t\t\t\n\t\t\t$destination=$old_destination;\n\t\t\tif ($this -> ratecard_obj[$k][34]!='-1'){\n\t\t\t\t$usetrunk=34;\n\t\t\t\t$this -> usedtrunk = $this -> ratecard_obj[$k][34];\n\t\t\t\t$usetrunk_failover=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$usetrunk=29;\n\t\t\t\t$this -> usedtrunk = $this -> ratecard_obj[$k][29];\n\t\t\t\t$usetrunk_failover=0;\n\t\t\t}\n\t\t\t\n\t\t\t$prefix\t\t\t= $this -> ratecard_obj[$k][$usetrunk+1];\n\t\t\t$tech \t\t\t= $this -> ratecard_obj[$k][$usetrunk+2];\n\t\t\t$ipaddress \t\t= $this -> ratecard_obj[$k][$usetrunk+3];\n\t\t\t$removeprefix \t= $this -> ratecard_obj[$k][$usetrunk+4];\n\t\t\t$timeout\t\t= $this -> ratecard_obj[$k]['timeout'];\n\t\t\t$musiconhold\t= $this -> ratecard_obj[$k][39];\n\t\t\t$failover_trunk\t= $this -> ratecard_obj[$k][40+$usetrunk_failover];\n\t\t\t$addparameter\t= $this -> ratecard_obj[$k][42+$usetrunk_failover];\n\t\t\t$cidgroupid\t\t= $this -> ratecard_obj[$k][44];\n\n\t\t\tif (strncmp($destination, $removeprefix, strlen($removeprefix)) == 0) \n\t\t\t\t$destination= substr($destination, strlen($removeprefix));\n\t\t\t\t\n\t\t\tif ($typecall==1) $timeout = $A2B -> config[\"callback\"]['predictivedialer_maxtime_tocall']; \n\t\t\t\t\n\t\t\t$dialparams = str_replace(\"%timeout%\", min($timeout * 1000, $max_long), $A2B->agiconfig['dialcommand_param']);\n\t\t\t//$dialparams = \"|30|HS($timeout)\"; // L(\".$timeout*1000.\":61000:30000)\n\t\t\t\t\n\t\t\tif (strlen($musiconhold)>0 && $musiconhold!=\"selected\"){\n\t\t\t\t$dialparams.= \"m\";\n\t\t\t\t$myres = $agi->exec(\"SETMUSICONHOLD $musiconhold\");\n\t\t\t\t$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, \"EXEC SETMUSICONHOLD $musiconhold\");\n\t\t\t}\n\t\t\t\t\n\t\t\tif ($A2B -> agiconfig['record_call'] == 1){\n\t\t\t\t$myres = $agi->exec(\"MixMonitor {$A2B->uniqueid}.{$A2B->agiconfig['monitor_formatfile']}|b\");\n\t\t\t\t$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, \"EXEC MixMonitor {$A2B->uniqueid}.{$A2B->agiconfig['monitor_formatfile']}|b\");\n\t\t\t}\n\n\t\t\t\t\n\t\t\t$pos_dialingnumber = strpos($ipaddress, '%dialingnumber%' );\n\t\t\t\t\n\t\t\t$ipaddress = str_replace(\"%cardnumber%\", $A2B->cardnumber, $ipaddress);\n\t\t\t$ipaddress = str_replace(\"%dialingnumber%\", $prefix.$destination, $ipaddress);\n\t\t\t\t\n\t\t\t\t\n\t\t\tif ($pos_dialingnumber !== false){\t\t\t\t\t \n\t\t\t\t $dialstr = \"$tech/$ipaddress\".$dialparams;\n\t\t\t}else{\n\t\t\t\tif ($A2B->agiconfig['switchdialcommand'] == 1){\n\t\t\t\t\t$dialstr = \"$tech/$prefix$destination@$ipaddress\".$dialparams;\n\t\t\t\t}else{\n\t\t\t\t\t$dialstr = \"$tech/$ipaddress/$prefix$destination\".$dialparams;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//ADDITIONAL PARAMETER \t\t\t%dialingnumber%,\t%cardnumber%\t\n\t\t\tif (strlen($addparameter)>0){\n\t\t\t\t$addparameter = str_replace(\"%cardnumber%\", $A2B->cardnumber, $addparameter);\n\t\t\t\t$addparameter = str_replace(\"%dialingnumber%\", $prefix.$destination, $addparameter);\n\t\t\t\t$dialstr .= $addparameter;\n\t\t\t}\n\t\t\t\n\t\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"app_callingcard: Dialing '$dialstr' with timeout of '$timeout'.\\n\");\n\t\t\t\n\t\t\t//# Channel: technology/number@ip_of_gw_to PSTN\n\t\t\t//# Channel: SIP/3465078XXXXX@11.150.54.xxx / SIP/phone1@192.168.1.6\n\t\t\t// exten => 1879,1,Dial(SIP/34650XXXXX@255.XX.7.XX,20,tr)\n\t\t\t// Dial(IAX2/guest@misery.digium.com/s@default) \n\t\t\t//$myres = $agi->agi_exec(\"EXEC DIAL SIP/3465078XXXXX@254.20.7.28|30|HL(\" . ($timeout * 60 * 1000) . \":60000:30000)\");\n\n\t\t\tif ($A2B->config[\"database\"]['dbtype'] == \"postgres\"){\n\t\t\t\t$QUERY = \"SELECT cid FROM cc_outbound_cid_list WHERE activated = 1 AND outbound_cid_group = $cidgroupid ORDER BY RANDOM() LIMIT 1\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$QUERY = \"SELECT cid FROM cc_outbound_cid_list WHERE activated = 1 AND outbound_cid_group = $cidgroupid ORDER BY RAND() LIMIT 1\";\t\n\t\t\t}\n\t\t\t\n\t\t\t$A2B->instance_table = new Table();\n\t\t\t$cidresult = $A2B->instance_table -> SQLExec ($A2B -> DBHandle, $QUERY);\n\t\t\t$outcid = 0;\n\t\t\tif (is_array($cidresult) && count($cidresult)>0){\n\t\t\t\t$outcid = $cidresult[0][0];\n\t\t\t\t$A2B -> CallerID = $outcid;\n\t\t\t\t$agi -> set_callerid($outcid);\n\t\t\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"[EXEC SetCallerID : $outcid]\");\n\t\t\t}\n\t\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"app_callingcard: CIDGROUPID='$cidgroupid' OUTBOUND CID SELECTED IS '$outcid'.\");\n\t\t\t\n\t\t\t$myres = $agi->exec(\"Dial $dialstr\");\t\n \t\t//exec('Dial', trim(\"$type/$identifier|$timeout|$options|$url\", '|'));\n\t\t\t\n\t\t\t$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, \"DIAL $dialstr\");\n\t\t\t\t\n\t\t\tif ($A2B -> agiconfig['record_call'] == 1){\n\t\t\t\t// Monitor(wav,kiki,m)\t\t\t\t\t\n\t\t\t\t$myres = $agi->exec(\"StopMixMonitor\");\n\t\t\t\t$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, \"EXEC StopMixMonitor (\".$A2B->uniqueid.\"-\".$A2B->cardnumber.\")\");\n\t\t\t}\n\t\t\t\n\t\t\t$answeredtime = $agi->get_variable(\"ANSWEREDTIME\");\n\t\t\t$this->answeredtime = $answeredtime['data'];\n\t\t\t$dialstatus = $agi->get_variable(\"DIALSTATUS\");\n\t\t\t$this->dialstatus = $dialstatus['data'];\n\t\t\t\n\t\t\t//$this->answeredtime='60';\n\t\t\t//$this->dialstatus='ANSWERED';\n\t\t\t\n\t\t\t// LOOOOP FOR THE FAILOVER LIMITED TO failover_recursive_limit\n\t\t\t$loop_failover = 0;\n\t\t\twhile ( $loop_failover <= $A2B->agiconfig['failover_recursive_limit'] && is_numeric($failover_trunk) && $failover_trunk>=0 && (($this->dialstatus == \"CHANUNAVAIL\") || ($this->dialstatus == \"CONGESTION\")) ){\n\t\t\t\t$loop_failover++;\n\t\t\t\t$this->answeredtime=0;\n\t\t\t\t$this -> usedtrunk = $failover_trunk;\n\t\t\t\t\n\t\t\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"[K=$k]:[ANSWEREDTIME=\".$this->answeredtime.\"-DIALSTATUS=\".$this->dialstatus.\"]\");\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$destination=$old_destination;\n\t\t\t\t\n\t\t\t\t$QUERY = \"SELECT trunkprefix, providertech, providerip, removeprefix, failover_trunk FROM cc_trunk WHERE id_trunk='$failover_trunk'\";\n\t\t\t\t$A2B->instance_table = new Table();\n\t\t\t\t$result = $A2B->instance_table -> SQLExec ($A2B -> DBHandle, $QUERY);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (is_array($result) && count($result)>0){\n\t\t\t\t\t\n\t\t\t\t\t//DO SELECT WITH THE FAILOVER_TRUNKID\n\t\t\t\t\t$prefix\t\t= $result[0][0];\n\t\t\t\t\t$tech \t\t= $result[0][1];\n\t\t\t\t\t$ipaddress \t= $result[0][2];\n\t\t\t\t\t$removeprefix \t= $result[0][3];\n\t\t\t\t\t$next_failover_trunk = $result[0][4];\n\t\t\t\t\t\n\t\t\t\t\t$pos_dialingnumber = strpos($ipaddress, '%dialingnumber%' );\n\t\t\t\t\t\n\t\t\t\t\t$ipaddress = str_replace(\"%cardnumber%\", $A2B->cardnumber, $ipaddress);\n\t\t\t\t\t$ipaddress = str_replace(\"%dialingnumber%\", $prefix.$destination, $ipaddress);\n\t\t\t\t\t\t\n\t\t\t\t\tif (strncmp($destination, $removeprefix, strlen($removeprefix)) == 0){\n\t\t\t\t\t\t$destination= substr($destination, strlen($removeprefix));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$dialparams = str_replace(\"%timeout%\", min($timeout * 1000, $max_long), $A2B->agiconfig['dialcommand_param']);\n\t\t\t\t\t\n\t\t\t\t\tif ($pos_dialingnumber !== false){\t\t\t\t\t \n\t\t\t\t\t\t$dialstr = \"$tech/$ipaddress\".$dialparams;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif ($A2B->agiconfig['switchdialcommand'] == 1){\n\t\t\t\t\t\t\t$dialstr = \"$tech/$prefix$destination@$ipaddress\".$dialparams;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dialstr = \"$tech/$ipaddress/$prefix$destination\".$dialparams;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"FAILOVER app_callingcard: Dialing '$dialstr' with timeout of '$timeout'.\\n\");\n\t\t\t\t\t\n\t\t\t\t\t$myres = $agi->exec(\"DIAL $dialstr\");\n\t\t\t\t\t$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, \"DIAL FAILOVER $dialstr\");\n\t\t\t\t\t\n\t\t\t\t\t$answeredtime = $agi->get_variable(\"ANSWEREDTIME\");\n\t\t\t\t\t$this->answeredtime = $answeredtime['data'];\n\t\t\t\t\t$dialstatus = $agi->get_variable(\"DIALSTATUS\");\n\t\t\t\t\t$this->dialstatus = $dialstatus['data'];\n\t\t\t\t\t\n\t\t\t\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"[FAILOVER K=$k]:[ANSTIME=\".$this->answeredtime.\"-DIALSTATUS=\".$this->dialstatus.\"]\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// IF THE FAILOVER TRUNK IS SAME AS THE ACTUAL TRUNK WE BREAK \n\t\t\t\tif ($next_failover_trunk == $failover_trunk) break;\n\t\t\t\telse $failover_trunk = $next_failover_trunk;\n\t\t\t\t\n\t\t\t} // END FOR LOOP FAILOVER \n\n\t\t\t//# Ooh, something actually happened!\n\t\t\tif ($this->dialstatus == \"BUSY\") {\n\t\t\t\t$this->answeredtime=0;\n\t\t\t\t//$agi->agi_exec(\"STREAM FILE prepaid-isbusy #\");\n\t\t\t\t$agi-> stream_file('prepaid-isbusy', '#');\n\t\t\t} elseif ($this->dialstatus == \"NOANSWER\") {\n\t\t\t\t$this->answeredtime=0;\n\t\t\t\t//$agi->agi_exec(\"STREAM FILE prepaid-noanswer #\");\n\t\t\t\t$agi-> stream_file('prepaid-noanswer', '#');\n\t\t\t} elseif ($this->dialstatus == \"CANCEL\") {\n\t\t\t\t$this->answeredtime=0;\n\t\t\t} elseif (($this->dialstatus == \"CHANUNAVAIL\") || ($this->dialstatus == \"CONGESTION\")) {\n\t\t\t\t$this->answeredtime=0;\n\t\t\t\tcontinue;\n\t\t\t} elseif ($this->dialstatus == \"ANSWER\") {\n\t\t\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"-> dialstatus : \".$this->dialstatus.\", answered time is \".$this->answeredtime.\" \\n\");\n\t\t\t}\n\n\t\t\t$this->usedratecard = $k;\n\t\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"[USEDRATECARD=\".$this->usedratecard.\"]\");\n\t\t\treturn true;\n\t\t} // End for\n\t\t\n\t\t$this->usedratecard=$k-1;\n\t\t$A2B -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, \"[USEDRATECARD - FAIL =\".$this->usedratecard.\"]\");\n\t\treturn false;\n\n\t}", "public function api_call();", "public function callOrderRequest();", "public function getCall();", "private function send_cli(string $action, $vars = array())\n{ \n\n // Get app\n if (!$app = app::get_instance()) { \n $app = new app('test');\n }\n\n // Process action\n $response = $app->call([apex_cli::class, $action], ['vars' => $vars]);\n\n // Return\n return $response;\n\n}", "function TransferCall($callref, $analystid,$suppgroup)\r\n\t{\r\n\t\t//-- clear errors and create a helpdesk connection for the appropriate type of connection\r\n\t\t$this->clearerror();\r\n\t\t$con = $this->open_hd_connection();\r\n\t\tif($con < CS_HDCON_OK)\r\n\t\t{\r\n\r\n\t\t\tif (!swhd_sendcommand($con, \"ASSIGN CALL \" .$callref. \" TO \".$suppgroup.\":\".$analystid))\r\n\t\t\t{\r\n\t\t\t\t$this->seterror(\"Command ASSIGN CALL failed.\");\r\n\t\t\t\tswhd_close($con);\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\tswhd_close($con);\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "function sysCallRegister ($app, $service) {\r\n // they are prepared to receive. This function adds the named srvice\r\n // to the list of those accepted by the application app.\r\n $_SESSION['apps'][$app]['syscall'] .= ', ' . strtolower ($service); \t \r\n }", "function rate_engine_performcall ($agi, $destination, &$A2B, $typecall=0) {\n\n\t\t$max_long = 2147483647; //Maximum value for long type in C++. This will be used to avoid overflow when sending large numbers to Asterisk\n\t\t$old_destination = $destination;\n\n\t\tfor ($k=0;$k<count($this -> ratecard_obj);$k++) {\n\n\t\t\t$destination=$old_destination;\n\t\t\tif ($this -> ratecard_obj[$k][34]!='-1') {\n\t\t\t\t$usetrunk=34;\n\t\t\t\t$this -> usedtrunk = $this -> ratecard_obj[$k][34];\n\t\t\t\t$usetrunk_failover=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$usetrunk=29;\n\t\t\t\t$this -> usedtrunk = $this -> ratecard_obj[$k][29];\n\t\t\t\t$usetrunk_failover=0;\n\t\t\t}\n\n\t\t\t$prefix\t\t\t= $this -> ratecard_obj[$k][$usetrunk+1];\n\t\t\t$tech \t\t\t= $this -> ratecard_obj[$k][$usetrunk+2];\n\t\t\t$ipaddress \t\t= $this -> ratecard_obj[$k][$usetrunk+3];\n\t\t\t$removeprefix \t= $this -> ratecard_obj[$k][$usetrunk+4];\n\t\t\t$timeout\t\t= $this -> ratecard_obj[$k]['timeout'];\n\t\t\t$musiconhold\t= $this -> ratecard_obj[$k][39];\n\t\t\t$failover_trunk\t= $this -> ratecard_obj[$k][40+$usetrunk_failover];\n\t\t\t$addparameter\t= $this -> ratecard_obj[$k][42+$usetrunk_failover];\n\t\t\t$cidgroupid\t\t= $this -> ratecard_obj[$k][44];\n\t\t\t$inuse \t\t\t= $this -> ratecard_obj[$k][48+$usetrunk_failover];\n\t\t\t$maxuse \t\t= $this -> ratecard_obj[$k][50+$usetrunk_failover];\n\t\t\t$ifmaxuse \t\t= $this -> ratecard_obj[$k][52+$usetrunk_failover];\n\n\t\t\tif (strncmp($destination, $removeprefix, strlen($removeprefix)) == 0)\n\t\t\t\t$destination= substr($destination, strlen($removeprefix));\n\n\t\t\tif ($typecall==1) $timeout = $A2B -> config[\"callback\"]['predictivedialer_maxtime_tocall'];\n\n\t\t\t//$dialparams = \"|30|HS($timeout)\"; // L(\".$timeout*1000.\":61000:30000)\n\t\t\t$dialparams = str_replace(\"%timeout%\", min($timeout * 1000, $max_long), $A2B->agiconfig['dialcommand_param']);\n\t\t\t$dialparams = str_replace(\"%timeoutsec%\", min($timeout, $max_long), $dialparams);\n\n\t\t\tif (strlen($musiconhold)>0 && $musiconhold!=\"selected\") {\n\t\t\t\t$dialparams.= \"m\";\n\t\t\t\t$myres = $agi->exec(\"SETMUSICONHOLD $musiconhold\");\n\t\t\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"EXEC SETMUSICONHOLD $musiconhold\");\n\t\t\t}\n\t\t\t\n\t\t\tif ($A2B -> agiconfig['record_call'] == 1) {\n\t\t\t\t$myres = $agi->exec(\"MixMonitor {$A2B->uniqueid}.{$A2B->agiconfig['monitor_formatfile']}|b\");\n\t\t\t\t$A2B -> debug( INFO, $agi, __FILE__, __LINE__, \"EXEC MixMonitor {$A2B->uniqueid}.{$A2B->agiconfig['monitor_formatfile']}|b\");\n\t\t\t}\n\n\t\t\t$pos_dialingnumber = strpos($ipaddress, '%dialingnumber%' );\n\n\t\t\t$ipaddress = str_replace(\"%cardnumber%\", $A2B->cardnumber, $ipaddress);\n\t\t\t$ipaddress = str_replace(\"%dialingnumber%\", $prefix.$destination, $ipaddress);\n\n\n\t\t\tif ($pos_dialingnumber !== false) {\n\t\t\t\t $dialstr = \"$tech/$ipaddress\".$dialparams;\n\t\t\t} else {\n\t\t\t\tif ($A2B->agiconfig['switchdialcommand'] == 1) {\n\t\t\t\t\t$dialstr = \"$tech/$prefix$destination@$ipaddress\".$dialparams;\n\t\t\t\t} else {\n\t\t\t\t\t$dialstr = \"$tech/$ipaddress/$prefix$destination\".$dialparams;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t//ADDITIONAL PARAMETER \t\t\t%dialingnumber%,\t%cardnumber%\n\t\t\tif (strlen($addparameter)>0) {\n\t\t\t\t$addparameter = str_replace(\"%cardnumber%\", $A2B->cardnumber, $addparameter);\n\t\t\t\t$addparameter = str_replace(\"%dialingnumber%\", $prefix.$destination, $addparameter);\n\t\t\t\t$dialstr .= $addparameter;\n\t\t\t}\n\n\t\t\t$A2B -> debug( INFO, $agi, __FILE__, __LINE__, \"app_callingcard: Dialing '$dialstr' with timeout of '$timeout'.\\n\");\n\n\t\t\t//# Channel: technology/number@ip_of_gw_to PSTN\n\t\t\t//# Channel: SIP/3465078XXXXX@11.150.54.xxx / SIP/phone1@192.168.1.6\n\t\t\t// exten => 1879,1,Dial(SIP/34650XXXXX@255.XX.7.XX,20,tr)\n\t\t\t// Dial(IAX2/guest@misery.digium.com/s@default)\n\t\t\t//$myres = $agi->agi_exec(\"EXEC DIAL SIP/3465078XXXXX@254.20.7.28|30|HL(\" . ($timeout * 60 * 1000) . \":60000:30000)\");\n\n\t\t\t$QUERY = \"SELECT cid FROM cc_outbound_cid_list WHERE activated = 1 AND outbound_cid_group = $cidgroupid ORDER BY RAND() LIMIT 1\";\n\n\t\t\t$A2B->instance_table = new Table();\n\t\t\t$cidresult = $A2B->instance_table -> SQLExec ($A2B -> DBHandle, $QUERY);\n\t\t\t$outcid = 0;\n\t\t\tif (is_array($cidresult) && count($cidresult)>0) {\n\t\t\t\t$outcid = $cidresult[0][0];\n\t\t\t\t$A2B -> CallerID = $outcid;\n\t\t\t\t$agi -> set_callerid($outcid);\n\t\t\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"[EXEC SetCallerID : $outcid]\");\n\t\t\t}\n\t\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"app_callingcard: CIDGROUPID='$cidgroupid' OUTBOUND CID SELECTED IS '$outcid'.\");\n\n\t\t\tif ($maxuse == -1 || $inuse < $maxuse) {\n\t\t\t\t// Count this call on the trunk\n\t\t\t\t$this -> trunk_start_inuse($agi, $A2B, 1);\n\n\t\t\t\t$myres = $A2B -> run_dial($agi, $dialstr);\n\t \t\t//exec('Dial', trim(\"$type/$identifier|$timeout|$options|$url\", '|'));\n\n\t \t\t$A2B -> debug( INFO, $agi, __FILE__, __LINE__, \"DIAL $dialstr\");\n\t\t\t\t\n\t\t\t\t// check connection after dial(long pause) \n\t\t\t\t$A2B -> DbReConnect($agi); \n\t\t\t\t\n\t\t\t\t// Count this call on the trunk\n\t\t\t\t$this -> trunk_start_inuse($agi, $A2B, 0);\n\t\t\t} else {\n\t\t\t\tif ($ifmaxuse == 1) {\n\t\t\t\t\t$A2B -> debug( WARN, $agi, __FILE__, __LINE__, \"This trunk cannot be used because maximum number of connections is reached. Now use next trunk\\n\");\n\t\t\t\t\tcontinue 1;\n\t\t\t\t} else {\n\t\t\t\t\t$A2B -> debug( WARN, $agi, __FILE__, __LINE__, \"This trunk cannot be used because maximum number of connections is reached. Now use failover trunk\\n\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($A2B -> agiconfig['record_call'] == 1) {\n\t\t\t\t$myres = $agi->exec(\"StopMixMonitor\");\n\t\t\t\t$A2B -> debug( INFO, $agi, __FILE__, __LINE__, \"EXEC StopMixMonitor (\".$A2B->uniqueid.\")\");\n\t\t\t}\n\n\t\t\t$answeredtime = $agi->get_variable(\"ANSWEREDTIME\");\n\t\t\t$this -> real_answeredtime = $this -> answeredtime = $answeredtime['data'];\n\t\t\t$dialstatus = $agi->get_variable(\"DIALSTATUS\");\n\t\t\t$this -> dialstatus = $dialstatus['data'];\n\n\t\t\t//$this->answeredtime='60';\n\t\t\t//$this->dialstatus='ANSWERED';\n\n\t\t\t// LOOOOP FOR THE FAILOVER LIMITED TO failover_recursive_limit\n\t\t\t$loop_failover = 0;\n\t\t\twhile ( $loop_failover <= $A2B->agiconfig['failover_recursive_limit'] && is_numeric($failover_trunk) && $failover_trunk>=0 && (($this->dialstatus == \"CHANUNAVAIL\") || ($this->dialstatus == \"CONGESTION\") || ($inuse>=$maxuse && $maxuse!=-1)) ) {\n\t\t\t\t$loop_failover++;\n\t\t\t\t$this -> real_answeredtime = $this -> answeredtime = 0;\n\t\t\t\t$this -> usedtrunk = $failover_trunk;\n\n\t\t\t\t$A2B -> debug( INFO, $agi, __FILE__, __LINE__, \"[K=$k]:[ANSWEREDTIME=\".$this->answeredtime.\"-DIALSTATUS=\".$this->dialstatus.\"]\");\n\n\t\t\t\t$destination=$old_destination;\n\n\t\t\t\t$QUERY = \"SELECT trunkprefix, providertech, providerip, removeprefix, failover_trunk, status, inuse, maxuse, if_max_use FROM cc_trunk WHERE id_trunk='$failover_trunk'\";\n\t\t\t\t$A2B->instance_table = new Table();\n\t\t\t\t$result = $A2B->instance_table -> SQLExec ($A2B -> DBHandle, $QUERY);\n\n\n\t\t\t\tif (is_array($result) && count($result)>0) {\n\n\t\t\t\t\t//DO SELECT WITH THE FAILOVER_TRUNKID\n\t\t\t\t\t$prefix\t\t\t\t\t= $result[0][0];\n\t\t\t\t\t$tech\t\t\t\t\t= $result[0][1];\n\t\t\t\t\t$ipaddress\t\t\t\t= $result[0][2];\n\t\t\t\t\t$removeprefix\t\t\t= $result[0][3];\n\t\t\t\t\t$next_failover_trunk\t= $result[0][4];\n\t\t\t\t\t$status\t\t\t\t\t= $result[0][5];\n\t\t\t\t\t$inuse\t\t\t\t\t= $result[0][6];\n\t\t\t\t\t$maxuse\t\t\t\t\t= $result[0][7];\n\t\t\t\t\t$ifmaxuse\t\t\t\t= $result[0][8];\n\t\t\t\t\t\n\t\t\t\t\t// Check if we will be able to use this route:\n\t\t\t\t\t// if the trunk is activated and\n\t\t\t\t\t// if there are less connection than it can support or there is an unlimited number of connections\n\t\t\t\t\t// If not, use the next failover trunk or next trunk in list\n\t\t\t\t\tif ($status == 0) {\n\t\t\t\t\t\t$A2B -> debug( WARN, $agi, __FILE__, __LINE__, \"Failover trunk cannot be used because it is disabled. Now use next trunk\\n\");\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($maxuse!=-1 && $inuse >= $maxuse) {\n\t\t\t\t\t\t$A2B -> debug( WARN, $agi, __FILE__, __LINE__, \"Failover trunk cannot be used because maximum number of connections on this trunk is already reached.\\n\");\n\n\t\t\t\t\t\t// use failover trunk\n\t\t\t\t\t\tif ($ifmaxuse == 0) {\n\t\t\t\t\t\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"Now using its failover trunk\\n\");\n\t\t\t\t\t\t\tcontinue 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"Now using next trunk\\n\");\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$pos_dialingnumber = strpos($ipaddress, '%dialingnumber%');\n\n\t\t\t\t\t$ipaddress = str_replace(\"%cardnumber%\", $A2B->cardnumber, $ipaddress);\n\t\t\t\t\t$ipaddress = str_replace(\"%dialingnumber%\", $prefix.$destination, $ipaddress);\n\t\t\t\t\t\n\t\t\t\t\tif (strncmp($destination, $removeprefix, strlen($removeprefix)) == 0) {\n\t\t\t\t\t\t$destination= substr($destination, strlen($removeprefix));\n\t\t\t\t\t}\n\n\t\t\t\t\t$dialparams = str_replace(\"%timeout%\", min($timeout * 1000, $max_long), $A2B->agiconfig['dialcommand_param']);\n\n\t\t\t\t\tif ($pos_dialingnumber !== false) {\n\t\t\t\t\t\t$dialstr = \"$tech/$ipaddress\".$dialparams;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($A2B->agiconfig['switchdialcommand'] == 1) {\n\t\t\t\t\t\t\t$dialstr = \"$tech/$prefix$destination@$ipaddress\".$dialparams;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$dialstr = \"$tech/$ipaddress/$prefix$destination\".$dialparams;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$A2B -> debug( INFO, $agi, __FILE__, __LINE__, \"FAILOVER app_callingcard: Dialing '$dialstr' with timeout of '$timeout'.\\n\");\n\n\t\t\t\t\t// Count this call on the trunk\n\t\t\t\t\t$this -> trunk_start_inuse($agi, $A2B, 1);\n\t\t\t\t\t\n\t\t\t\t\t$myres = $A2B -> run_dial($agi, $dialstr);\n\t\t\t\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"DIAL FAILOVER $dialstr\");\n\t\t\t\t\t\n\t\t\t\t\t// check connection after dial(long pause) \n\t\t\t\t\t$A2B -> DbReConnect(); \n\n\t\t\t\t\t// Count this call on the trunk\n\t\t\t\t\t$this -> trunk_start_inuse($agi, $A2B, 0);\n\n\t\t\t\t\t$answeredtime = $agi->get_variable(\"ANSWEREDTIME\");\n\t\t\t\t\t$this -> real_answeredtime = $this -> answeredtime = $answeredtime['data'];\n\t\t\t\t\t\n\t\t\t\t\t$dialstatus = $agi -> get_variable(\"DIALSTATUS\");\n\t\t\t\t\t$this -> dialstatus = $dialstatus['data'];\n\n\t\t\t\t\t$A2B -> debug( INFO, $agi, __FILE__, __LINE__, \"[FAILOVER K=$k]:[ANSTIME=\".$this->answeredtime.\"-DIALSTATUS=\".$this->dialstatus.\"]\");\n\n\t\t\t\t}\n\t\t\t\t// IF THE FAILOVER TRUNK IS SAME AS THE ACTUAL TRUNK WE BREAK\n\t\t\t\tif ($next_failover_trunk == $failover_trunk) break;\n\t\t\t\telse $failover_trunk = $next_failover_trunk;\n\n\t\t\t} // END FOR LOOP FAILOVER\n\t\t\t\n\t\t\t//# Ooh, something actually happened!\n\t\t\tif ($this->dialstatus == \"BUSY\") {\n\t\t\t\t$this -> real_answeredtime = $this -> answeredtime = 0;\n\t\t\t\tif ($this->agiconfig['busy_timeout'] > 0)\n\t\t\t\t\t$res_busy = $agi->exec(\"Busy \".$this->agiconfig['busy_timeout']);\n\t\t\t\t$agi-> stream_file('prepaid-isbusy', '#');\n\t\t\t} elseif ($this->dialstatus == \"NOANSWER\") {\n\t\t\t\t$this -> real_answeredtime = $this -> answeredtime = 0;\n\t\t\t\t$agi-> stream_file('prepaid-noanswer', '#');\n\t\t\t} elseif ($this->dialstatus == \"CANCEL\") {\n\t\t\t\t$this -> real_answeredtime = $this -> answeredtime = 0;\n\t\t\t} elseif (($this->dialstatus == \"CHANUNAVAIL\") || ($this->dialstatus == \"CONGESTION\")) {\n\t\t\t\t$this -> real_answeredtime = $this -> answeredtime = 0;\n\t\t\t\t// Check if we will failover for LCR/LCD prefix - better false for an exact billing on resell\n\t\t\t\tif ($A2B->agiconfig['failover_lc_prefix']) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} elseif ($this->dialstatus == \"ANSWER\") {\n\t\t\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"-> dialstatus : \".$this->dialstatus.\", answered time is \".$this->answeredtime.\" \\n\");\n\t\t\t}\n\n\t\t\t$this->usedratecard = $k;\n\t\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"[USEDRATECARD=\".$this -> usedratecard.\"]\");\n\t\t\treturn true;\n\t\t} // End for\n\n\t\t$this -> usedratecard = $k-$loop_failover;\n\t\t$A2B -> debug( DEBUG, $agi, __FILE__, __LINE__, \"[USEDRATECARD - FAIL =\".$this -> usedratecard.\"]\");\n\t\treturn false;\n\n\t}", "function checkOverrideCode($Code, $Order, $Line, $Machine){\n $db_conn = new DataAccess(); \n $Supervisor = $db_conn ->checkOverrideCode($Code); // Return True if the name of supervisor.\n if( $Supervisor) {\n\n \n // Start call RPG\n callCL( $Order, $Line, $Machine ); //Calling RPG Program\n\n // include(\"FLEXLIB\");\n \n // $query = \"CALL TRSHSHRTPR('658666' ' 1' 'MACH01')\";\n // $result = $db_conn -> CLCommand(CALL PGM( TRSHSHRTPR('658666' ' 1' 'MACH01') ) ); // odbc_exec($connection, $query);\n // \t$result = $db_conn -> CLCommand($query);\n /*\n if ($result) {\n if (odbc_fetch_into($result,$row)!=FALSE)\n echo $row[0];\n }\n */\n\n // End call RPG\n\n\n\n\n echo json_encode($Supervisor);\n } else {\n echo \"\";\n }\n}", "function call($hook_name, $arguments=array())\n {\n $thiis =& SE_Hook::create();\n \n // Prioritize\n if( $thiis->_needs_prioritize ) $thiis->prioritize();\n \n // Iterate over each callback\n $hook_index = $thiis->_hooks[$hook_name];\n foreach( $thiis->_callbacks[$hook_index] as $callback_index=>$callback )\n {\n if( !is_callable($callback) ) continue;\n // TODO: Capture output\n call_user_func($callback, $arguments);\n }\n \n return;\n }", "protected function _call() {\n\n\t\t$argList = func_get_args();\n\n\t\t$method \t= $argList[0];\n\t\t$methodArgList \t= array_slice($argList, 1);\n\n\t\t//print $method;\n\t\t//print var_dump($argList);\n\t\t//print var_dump($methodArgList);\n\n\t\treturn $this->_request($method, $methodArgList);\n\t}", "public function call() {\r\n $req = $this->app->request();\r\n $res = $this->app->response();\r\n $authUser = $req->headers('PHP_AUTH_USER');\r\n $authPass = $req->headers('PHP_AUTH_PW');\r\n \r\n if ($this->authenticate($authUser, $authPass)) {\r\n $this->next->call();\r\n } else {\r\n $this->deny_access();\r\n }\r\n }", "function LT_call($proc, $args = array(), $die = TRUE) {\n\n\t// if $args is not an array, then assume all arguments after $proc\n\t// are arguments to the stored procedure and $die is true.\n\tif (!is_array($args)) {\n\t\t$args = array_slice(func_get_args(), 1);\n\t\t$die = TRUE;\n\t}\n\n\t// build the query\n\t$query = \"CALL $proc(\";\n\tfor ($i = 0; $i < count($args); $i++) {\n\t\tif ($i != 0) $query .= \", \";\n\t\tif (is_int($args[$i]) || is_float($args[$i])) $query .= \"{$args[$i]}\";\n\t\telse if (is_null($args[$i])) $query .= \"NULL\";\n\t\telse $query .= \"'{$args[$i]}'\";\n\t}\n\t$query .= \");\";\n\n\t// query the database and return the result;\n\treturn LT_query($query, $die);\n}", "abstract public function invoke($method,$params);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }